Skip to content

Conversation

@webfiltered
Copy link
Contributor

@webfiltered webfiltered commented Jan 16, 2025

Summary

Subgraphs separate sections of workflows (graphs) into distinct, logical entities. This separation provides re-usability and modularity, and can drastically reduce visual and cognitive complexity.

  • A subgraph has its own inputs and outputs, which can be used to connect nodes on the parent graph to those in the subgraph.
  • Subgraphs added to a graph multiple times only need to be edited once to update all instances

Basic example

Simple design mock-ups.

Main workflow

A simple mock-up of the parent / primary workflow, as opened normally.

Parent workflow example

Subgraph

A simple mock-up of the contents of the subgraph, as displayed after opening.

Subgraph example

Links


Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.

@webfiltered webfiltered marked this pull request as ready for review January 16, 2025 12:47
@webfiltered webfiltered self-assigned this Jan 16, 2025
@Comfy-Org Comfy-Org locked as resolved and limited conversation to collaborators Jan 16, 2025
@webfiltered webfiltered added rfc pending When the RFC is still in comments phase labels Jan 16, 2025
@huchenlei huchenlei changed the title Subgraph RFC: Subgraph Jan 16, 2025
@christian-byrne christian-byrne added active when an RFC is accepted and undergoing implementation. The feature may be shipped as experimental and removed pending When the RFC is still in comments phase labels May 19, 2025
@robinjhuang
Copy link
Member

@webfiltered Can we update this file number and merge this PR?

@webfiltered webfiltered merged commit 40db878 into main Jun 7, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

active when an RFC is accepted and undergoing implementation. The feature may be shipped as experimental rfc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants