GraphBuilder
class when creating subgraphs. It isn’t mandatory, but it prevents you from making many easy mistakes.model2
, you don’t have to reload model1
).
result
: A tuple of the outputs of the node. This may be a mix of finalized values (like you would return from a normal node) and node outputs.expand
: The finalized graph to perform expansion on. See below if you are not using the GraphBuilder
.expand
key is the same as the ComfyUI API format. The following requirements are handled by the GraphBuilder
, but must be handled manually if you choose to forego it:
GraphBuilder
for actually building the graph (e.g. because you’re loading the raw json of the graph from a file), you can use the GraphBuilder.alloc_prefix()
function to generate a prefix and comfy.graph_utils.add_graph_prefix
to fix existing graphs to meet these requirements.
rawLink
within the input’s Additional Parameters to do this easily.)