PC: Save Expanded Workflow (for debug)
Save Expanded Workflow (for debug): seeing the graph Prompt Control builds behind your back
- any
Prompt Control's lazy nodes - PCLazyTextEncode, PCLazyLoraLoader - don't run your prompt through a fixed pipeline. They generate a graph from your text at runtime: a chain of PCTextEncode and SetConditioningTimestepRange nodes for a scheduled text prompt, or LoraLoader/CreateHookLora nodes for scheduled LoRAs. That generated graph never appears anywhere on your visible ComfyUI canvas. PCSaveExpandedWorkflow exists to show it to you anyway, by writing it out to a JSON file.
Its own display name says exactly what it's for: "(for debug)." This isn't a node you leave wired into a production workflow.
What it does
The node description is blunt about the mechanism: it "expands lazy prompt control nodes in the prompt and saves the expanded prompt into a JSON file." Point it at your lazy-generated output, run the graph, and you get a file showing precisely what Prompt Control built from your text - every intermediate node it created, not just the final result.
When you'd actually reach for it
Three real reasons: your syntax parsed differently than you expected and you want to see exactly what nodes it generated to figure out why; you're trying to understand the caching behavior the README warns about (ComfyUI sometimes invalidates more than it should, especially with filtering) and want to see how many nodes actually got regenerated; or you're filing a bug report and the maintainer needs the expanded graph to diagnose it properly, not just your source prompt.
The input
any(required, wildcard type) - accepts literally anything. There's no output at all; this is an output node by design (is_output_node: true), meaning it terminates the branch it's on rather than feeding anything downstream.
Treat it as a tap point wired off to the side of your real graph, not something in the main path.
How to install it
- ComfyUI Manager - search "ComfyUI Prompt Control", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/asagi4/comfyui-prompt-control, restart ComfyUI.
Requires ComfyUI v0.8.0+.
Common issues & troubleshooting
You wired it in and nothing seems to happen visibly. That's expected - it writes a JSON file, it doesn't render anything in the UI or feed a downstream node. Check your ComfyUI output directory (or wherever the pack writes debug output) for the file after running the graph, not the canvas.
You left it wired into a workflow you're sharing or reusing. Don't. It's a debug-only node by its own naming, and since it's an output node with no downstream connections, leaving it in doesn't break anything functionally - but it's dead weight cluttering the graph for the next person who opens it. Strip it out once you've got the answer you were looking for.
You're trying to feed its output somewhere. You can't - there isn't one. If you need the expanded structure to use rather than just inspect, this is the wrong node; it's strictly a one-way debug dump.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | — |
Outputs (0)
No outputs