CFG Clear Plan
The undo button for a guidance chain
- model
- MODEL
This is the least glamorous node in the CFG Megapack and the one you'll be glad exists the third time you've chained six guidance nodes and can't tell which one is ruining your image.
It takes a model and removes every CFG Megapack stage from it. No inputs besides the model, no
settings, one MODEL out. What you get back is the sampler's plain classifier-free guidance - the
u + w(c - u) you started with - with the pack's hook and its whole stage plan stripped off.
Why that's more useful than it sounds
The pack is built as a plan attached to the model. Each node you chain writes one stage into that plan (when to guide, weak branch, how the predictions combine, where guidance acts, magnitude correction, the angle governor, measurement), and the stages run in a fixed order regardless of the order you chain them. A later node of the same stage replaces an earlier one - but corrections stack, which means a chain you built ten minutes ago and forgot about is still in there, doing things.
That's the context bus problem in miniature: one wire, contents invisible. With forty explicit wires
you can see that the LoRA isn't connected to the sampler; with a plan on a model object you can't see
what's installed without asking. Two nodes answer that question - this one, which wipes the plan, and
CFG Plan Readout, which prints it stage by stage in the order it will run.
Inputs and output
- model - any model on the wire, patched or not.
- MODEL out - the same model with the plan cleared.
Wire it after the loader and before your guidance chain, and you get a clean slate. Wire it in the middle of a chain, and everything upstream of it is discarded. That second usage is the interesting one: it lets you build one branch of a workflow that's heavily guided and another that isn't, from a single checkpoint load, without duplicating the loader.
Install
# ComfyUI Manager: search "CFG Megapack" -> Install -> restart
# or:
comfy node install comfy-cfg-megapack
# or by hand:
cd ComfyUI/custom_nodes && git clone https://github.com/AbstractEyes/comfy-cfg-megapack
No dependencies, nothing to download (the pack ships no requirements.txt because it needs only
torch and the standard library), and ComfyUI 0.38+ for the node API.
What it does and doesn't undo
It removes the pack's own plan and its CFG hook. It does not reset the model's other patches: your LoRAs stay loaded, other packs' model patches stay applied. The name means what it says - the plan, not the model.
It also won't rescue you from the shared-slot problem. ComfyUI gives a model exactly one CFG function, and other packs' nodes (RescaleCFG, Mahiro, RenormCFG) write to the same slot, last-chained-wins. If a foreign CFG node took the slot, clearing the pack's plan doesn't remove it - and conversely, chaining a foreign CFG node after your Megapack chain is the most common cause of "this node does nothing", which is exactly the situation where you'd reach for Clear Plan to find out.
Practical uses
- A/B testing. One workflow, two sampler branches: one fed through three guidance nodes, one fed through Clear Plan. Same seed, same everything else. This is the fairest comparison available in ComfyUI, and it's the reason the pack ships its examples as plain-CFG-versus-variant pairs.
- Bisecting a bad render. Drop Clear Plan in after each node in turn. The first one that fixes the image is the node that broke it.
- Reusing a shared model wire. If a workflow hands one patched model to several samplers, Clear Plan lets each branch decide for itself whether it wants the plan.
One caveat, since it's the kind of thing that costs an hour: the plan lives on the model object, so anything that re-clones the model upstream is fine (clones carry the model options), but a branch built from a different loader - a second checkpoint node, a refiner path - starts clean anyway and needs no clearing. If you can't figure out why a node's effect vanished, check which loader that wire came from.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |