Nodes/ComfyUI Inspire Pack/Regional CFG (Inspire)
ComfyUI Node Runs on cloud

Regional CFG (Inspire)

Different CFG in different parts of the image

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Regional CFG (Inspire)
  • model
  • mask
  • MODEL

CFG is a global dial - turn it up and the whole image gets pushed harder toward the prompt, including the parts that don't want it. High CFG sharpens adherence but also fries faces, blows out skin, and generally over-cooks anything delicate. Regional CFG lets you escape that all-or-nothing by making CFG vary across the frame: crank it where you need adherence, ease off where high CFG causes damage. You control which is which with a mask.

It's a small, focused node in Inspire's Regional group. Not something most beginners reach for on day one, but a clean tool once you've felt CFG fight you.

How it works

Per the pack's docs, it applies the mask as a multiplier on the configured CFG - so different areas end up with different effective CFG settings. You patch your MODEL through this node, hand it a mask, and the result is a MODEL where CFG is scaled down (or up) inside the masked region relative to the rest. Wire that patched MODEL into your sampler and sample normally; the CFG you set on the sampler is what gets modulated per-pixel by the mask.

The classic use is the "high CFG everywhere except the face" case: mask the face, let its region ride at a gentler CFG so it doesn't turn plasticky, while the background and clothing keep the punchy adherence a high global CFG gives you. It's a cousin of regional prompting - same instinct of "treat this area differently" - but it acts on guidance strength rather than on the prompt itself.

The inputs and outputs

Just two inputs:

  • model (MODEL) - the model to patch. The node returns a modified MODEL you send to your KSampler.
  • mask (MASK) - defines where the CFG multiplier applies. White/black and soft gradients in the mask translate to how strongly CFG is scaled across the image.

Output is a single MODEL. Everything else - your actual CFG value, sampler, steps - stays on the sampler node as usual.

How to install it

ComfyUI Manager: Install Custom Nodes → search ComfyUI Inspire Pack → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack

Then restart. The pack is Dr.Lt.Data's - ComfyUI Manager and Impact Pack author - so it's reliable and installs without extras. No model downloads for this node.

Common issues

The result depends entirely on the mask, so a soft-edged mask matters: a hard-edged mask can leave a visible seam where the CFG changes abruptly, so feather the mask edge if you see a boundary artifact. Second, remember the sampler's CFG is still doing the driving - this node modulates it, it doesn't set an absolute value, so if your global CFG is already low there's little for the multiplier to pull down. And it patches the model, not the conditioning; make sure the patched MODEL output is what feeds your sampler, not the original model wire, or the node quietly does nothing.

CategoryInspirePack/Regional

Inputs (2)

NameTypeDefaultDescription
modelMODEL
maskMASK

Outputs (1)

NameTypeDescription
MODELMODEL