Nodes/advanced-cfg-controller/❌ CFG Controller Unpatch
ComfyUI Node

❌ CFG Controller Unpatch

Strip a CFG patch off a model

By FlareAI-Studios·Created 8 months ago·Updated 8 months ago· 1
❌ CFG Controller Unpatch
  • model
  • MODEL

Every node in the Advanced CFG Controller pack works by cloning your model and stuffing patches into the clone's model_options - a CFG function here, a "skip the negative pass" hook there. That's elegant until you want one patch and not the other, or you inherit a workflow with a patch you didn't ask for. That's the whole job of CFG Controller Unpatch: it takes a model in and hands back a fresh clone with the pack's sampling-optimization hook removed.

What it strips (and what it doesn't)

If you read the source, the unpatch is blunt but honest: it clones the model and pops sampler_pre_cfg_function from model_options. That's the hook the pack uses to skip the negative pass and to disable the positive prompt inside sigma windows - the "speed boost" machinery of the Easy and Expert nodes. So this node is exactly the antidote when you've chained a CFG Controller in front of a sampler and want to neutralize the skip/disable behavior without rewiring the whole graph.

Here's the part that surprises people: it only removes that one pre-CFG hook. The clone can still carry a custom sampler_cfg_function (the step-by-step CFG engine) and any post-CFG color fixes from the Expert node, because unpatch doesn't touch those keys. If you need a totally clean model, the reliable path is to not patch it in the first place - this node is for disabling the speed-optimization half of the pack, not for factory-resetting everything.

How to use it

Simple enough that there's no real trick:

# install once for the whole pack, then restart ComfyUI
cd ComfyUI/custom_nodes
git clone https://github.com/FlareAI-Studios/advanced-cfg-controller

Drop the node anywhere between your patched model and the KSampler, connect model in and MODEL out, done. It's in the model_patches/Advanced_CFG_Controller/utils category, right next to CFG Post-Processing Only. The whole pack needs nothing beyond what ComfyUI already has - no model downloads.

When you'd actually reach for it

Two real scenarios. First, debugging: a workflow where the CFG Controller is behaving like it's skipping steps it shouldn't - the classic "my output looks unguided" complaint - and you want to prove the patch is the culprit by bypassing just that part. Second, reuse: you've got a shared base workflow with a CFG Controller feeding a sampler, and for one branch you want plain old CFG behavior. Slap an unpatch on the branch instead of forking the graph.

Honest caveats, since this is a young pack with no community footprint: the unpatch is scoped to the pack's own hook and won't undo other packs' model patches, and because it works on a clone, any node upstream that keeps a reference to the original patched model is still patched. It's a scalpel, not a sledgehammer - which is exactly why it's useful, as long as you remember the blade only cuts one thing.

Categorymodel_patches/Advanced_CFG_Controller/utils

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
MODELMODEL