Nodes/ComfyUI-Creepy_nodes/Chain Workflow (API)
ComfyUI Node

Chain Workflow (API)

Chain Two Workflows End to End and Beat the VRAM Wall

By Creepybits·Created about a year ago·Updated 2 months ago· 32
Chain Workflow (API)
  • trigger_image
  • status
json_pathC:\path\to\workflow_B.json

You want a Flux image, then a Wan video of it, and you don't have the VRAM to hold both models at once. The classic workaround is two separate ComfyUI workflows run one after another - but manually. This node automates the handoff: at the end of workflow A it tells your local ComfyUI API to queue workflow B. When A finishes and unloads its models, B starts on freed VRAM. The docs call it a "relay baton," which is exactly right.

It lives in the pack's delightfully-named "MadScience" category, and it's the answer to the chained-image-to-video workflows the pack ships examples for.

How it works

The mechanism is a local HTTP call. You give it the path to a workflow JSON file, and when the node runs it posts that workflow to http://127.0.0.1:8188/prompt - ComfyUI's standard queue API. The API responds, the node hands back a status string, done.

The clever bit is the second input, trigger_image. It's not used for anything image-related - it's a dummy that forces execution order. You connect the output of your Save Image node into it, which guarantees the save finishes before the next workflow is queued. Without that wire, the chain could fire before your image actually hits disk.

The inputs and outputs

  • json_path - full local path to the next workflow's JSON file.
  • trigger_image - connect your Save Image output here to force ordering.
  • Output: status - a string like "Successfully queued next workflow!" or an error.

Installing it

Part of ComfyUI-Creepy_nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/Creepybits/ComfyUI-Creepy_nodes

restart, done. ComfyUI Manager users: search "Creepy_nodes". No models to download.

Where it bites

The critical gotcha, straight from the author's docs: the target workflow must be saved using "Save (API Format)" - found in ComfyUI's settings under Dev Mode options. A normal UI workflow JSON will be rejected by the server. Save the second workflow correctly before you wire the chain, or you'll chase a confusing error.

Three more practical notes. It posts to port 8188, so if you run ComfyUI on a different port you'll need to edit the node's source. The path must be absolute and the file must exist - it returns a "File not found" status otherwise. And the node returns before the second workflow finishes; it just queues it, so your first workflow's run is done while B runs in the background. Also worth repeating the ecosystem's standard warning: the ComfyUI API is unauthenticated by default, so don't expose the server to the internet while you're chaining like this.

CategoryCreepybits/MadScience

Inputs (2)

NameTypeDefaultDescription
json_pathSTRINGC:\path\to\workflow_B.json
trigger_imageIMAGE

Outputs (1)

NameTypeDescription
statusSTRING