Transition-Point Guidance (Jain et al. 2024)
Say nothing until the model has made up its mind
- model
- MODEL
There's a real problem this node is built for, and it isn't an aesthetic one. Highly-guided diffusion models don't just follow prompts better - they also regurgitate training images. Crank cfg and a specific prompt, and you can get a near-copy of something the model memorized, layout and all. Transition-Point Guidance (Jain et al., CVPR 2025) is a defense: let the model choose its own composition early, and only turn guidance on once the trajectory has settled.
The mechanism is about as simple as a schedule gets. Track the size of the guidance difference, ||c - u||², step by step. Ignore the first few steps entirely. When the difference passes a local minimum - it was falling, and now it's rising - that's the transition point. From there on, full CFG.
The mechanism, in the node
Before the transition, the scale is -opposite: with the default opposite = 0 that means no guidance at all, so each step just takes the unconditional prediction. Set opposite above 0 and you get actual opposite guidance early - steering along u - lambda (c - u), which pushes toward the model's generic prior and away from whatever the prompt is suggesting. That's the "opposite guidance" variant of the paper.
After the transition, straight CFG at your scale. The state is per-sample, resets when a new run starts, and costs nothing at runtime.
Layout and palette come from the unguided phase, so an image from this node looks measurably different from your usual cfg 7 render: less prompt-driven composition, fewer of the telltale high-guidance artefacts. That's the point, not a bug. If you like the unguided layout, this node is for you; if you wanted tighter prompt adherence, you've just made the model freer, not more obedient.
Inputs and output
model- between the loader and the sampler.scale- thewused after the transition; -1 takes the sampler's cfg.opposite- default 0.0. "Opposite guidance before the transition (0 = the unconditional prediction)." Nonzero makes the early steps actively steer away from the prompt direction; keep it small, and understand you're asking for a less faithful image.space-auto (the method's own), which for this paper is the noise prediction.
Output: MODEL. No extra forward pass, no extra memory.
Practical notes
This is one of the handful of methods here where the payoff depends on your model and your corpus. On a heavily-finetuned checkpoint with a narrow dataset, memorization is a real risk and the unguided early phase genuinely helps. On a broad modern base it's mostly a stylistic choice with a plausible safety story attached.
It also pairs well with the pack's measurement nodes: install CFG Measure: Per-Step Probe and you'll see the difference size and the push ratio per step in output/cfg_probe/, which is how you confirm the transition actually fired rather than assuming it did.
If your goal is the opposite - more prompt control in the middle steps - you want a rising schedule or a mid-run peak (CFG When, TV-CFG) rather than this.
Install
Manager → search CFG Megapack → install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/AbstractEyes/comfy-cfg-megapack
Zero dependencies, zero downloads - the pack uses torch and the standard library and ships no requirements.txt. What it does need is a current ComfyUI: the nodes are written against comfy_api.latest and the README reports testing on 0.38.0 with torch 2.11, GPU and CPU. If the pack doesn't import, check your ComfyUI version before anything else.
Where people get burned
"It does nothing." Either the transition never fires in the steps you gave it - the difference has to make a local minimum, which it does early but not always - or you're looking at a differently-composed image and reading that as no change. Probe it. Not every prompt produces a clean transition, and an image that looks "basically the same" is often the unguided layout quietly doing its thing.
Turning opposite up. It is not a strength knob for the method. At opposite 2 or 3, the early steps actively fight the prompt, which is what the paper does to escape memorization but is a terrible default for normal use.
Combining it with another "when" node. Schedule and window rules all write the same stage, and the later node replaces the earlier. Pick one.
Expecting a speed-up. Even in the unguided phase, CFG still needs both predictions to compute the difference it's monitoring - so this is not a cheaper render. (If you want the skip-the-unconditional optimization, that's the CFG When node, which can genuinely drop a forward pass outside its window.)
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| scale | FLOAT | -1.0-1–100 | The guidance scale w for this rule. -1 uses the sampler's cfg value. |
| opposite | FLOAT | 0.00–10 | Opposite guidance before the transition (0 = the unconditional prediction). |
| space | COMBO | auto (the method's own) | Where the rule is computed. Linear rules give the same image in any space; nonlinear ones do not. 'auto' uses the space the method was published in (noise for most, denoised for APG and the angle rule, velocity for flow models). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |