Ep 6: Subgraphs
7 min
why subgraphs workflows get messy even a 15 node workflow can feel like a tangle when you're scrolling around looking for one setting subgraphs let you select a group of nodes and collapse them into a single block the workflow runs exactly the same the canvas just gets cleaner creating a subgraph select nodes by dragging a box around them, or hold ctrl (cmd on mac) and click each one right click any selected node and choose "convert to subgraph" done the selected nodes collapse into one block editing inside click the icon on the subgraph node to open it all your original nodes are still there with the same connections along the edges you'll see "plug" nodes these are the boundary between inside and outside left plugs data coming in from the rest of your canvas right plugs data going out promoted widgets settings highlighted in purple are "promoted " they show up on the outside of the subgraph node so you can edit them without opening it right click inside and select "unpromote widget" to hide a setting from the outside right click and select "promote widget" to expose one promote only the settings you change often prompt text, seed, image size keep everything else inside this is especially useful when building workflows for others who don't need to see every setting faq does collapsing nodes into a subgraph change how the workflow runs? no it's purely visual same nodes, same connections, same results can i put subgraphs inside subgraphs? yes useful for very complex workflows, but keep it reasonable two levels deep is usually the limit before it gets harder to navigate, not easier
