Skip to content

Support for chaining ComfyUI workflows together #1130

@Proryanator

Description

@Proryanator

Feature Idea

Hey there! I was playing around with connecting unrelated ComfyUI workflows (in my own little play gradio app that calls ComfyUI) by chaining them into a pipeline. This is not something ComfyUI supports as far as I can tell. My tool also abstracted away the nodes and noodles.

Essentially, chaining of workflows together into a "pipeline" without copying nodes between them.

Reference feature request to ComfyUI from someone else with the same idea: comfyanonymous/ComfyUI#2513 (comment)

I think this could be a core feature of ComfyUI but, seeing as how SwarmUI already has a handful of similar features that I added to my tool it could also go here. This still goes along with abstracting the noodles and mess away from the user, but allowing that power on multiple workflows together.

An example of a pipeline (the connected workflows) I made with my tool:

text-2-img -> img-to-multiview -> img-to-pixel-art-style

These can be as small, or large as you like.

Benefits:

  • each workflow can be updated, maintained, or improved separately
  • you can connect/use any unrelated workflow with another (assuming they have the same input/output types) with minimal/no workflow updates
  • you can see and modify input parameters of each workflow like you can in ComfyUI, but at a high level across all workflows in one place

Things to learn

This worked well on a single machine with 1 ComfyUI instance. I'd need to fully understand the way that multi-GPU and server setups work today in SwarmUI and think of how this would work with pipelines. Probably similar but taking into account that "pipelines" need to execute workflows in order as a constraint.

Changes to SwarmUI

My tool also auto-fetches inputs for each workflow and exposes them to you in a cleaner UI, which is great to see that here already, that will save me some work.

I'd make a few changes:

  • add the ability to select multiple ComfyUI workflows to chain together
  • ability to pull in all inputs for each workflow (probably a list of workflows with their inputs below)
  • logic to chain call the workflows
  • nicely integrate this with multi-GPU/server support somehow

I'll share if I make any good progress. This would probably end up being a SwarmUI extension most likely.

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or requestMaybe ExtensionMaybe this would be better as an extension than core feature?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions