Nodes/Diffusion CG/Disable CG
ComfyUI Node

Disable CG

The kill switch for a global color effect

By Haoming02·Created 3 years ago·Updated 9 months ago· 103
Disable CG
  • latent
  • LATENT

Diffusion CG is great at what it does, but it has one structural quirk you need to know about: the effect is global. The recenter and normalization values it sets aren't attached to a specific sampler - they're module-level state that applies to every sampling pass in the run. That's exactly what Disable CG exists for. It's the reset button.

What it does

Disable CG is a dead-simple latent-in/latent-out node with a single job: set the pack's recenter and normalization values back to 0.0 and pass the latent through untouched. No sliders, no settings, no way to get it wrong. It's the companion to the main Diffusion CG node in the same pack.

Why you need it

The textbook case is a two-pass workflow. You run a full denoise pass with Diffusion CG active to get your balanced, vibrant base image. Then you hit a hires-fix pass - a second sampling pass at a higher resolution. If Diffusion CG is still "on" in the global state, that second pass re-applies the color grading, and you get oversaturated, over-normalized mush instead of a clean upscale.

So the pattern is:

Empty Latent → Diffusion CG → KSampler (denoise 1.0) → Disable CG → Latent Upscale → KSampler (hires, denoise ~0.4) → VAE Decode

Dropping Disable CG right after the first pass means the hires pass samples with neutral settings. The README calls out this exact use case - "if you want to disable it during other parts of the workflow, e.g. during Hires. Fix".

It's also a handy habit for debugging. If you've been tweaking Diffusion CG and suddenly every workflow looks graded, a Disable CG in the pipeline tells you in one click whether the global state is what's biting you. (For what it's worth, the pack auto-resets the globals whenever it validates a prompt with no Diffusion CG node in it - but within a single workflow that has multiple sampling passes, only an explicit reset works.)

The inputs and outputs

There's one input, latent, and one output, LATENT. Wire your latent in, wire it out, done. It doesn't modify the tensor - it only flips two global numbers before passing the latent along.

Install

Same pack as the main node:

# ComfyUI Manager → search "Diffusion CG"
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/Haoming02/comfyui-diffusion-cg

Restart ComfyUI and both nodes appear. No extra dependencies, no model downloads - the pack ships with zero requirements.

A fair warning if you're reading this after installing the current release: recenter and normalization state only exist because a Diffusion CG node set them. So if you add Disable CG without a Diffusion CG anywhere in the graph, it's a no-op pass-through - harmless, but doing nothing. Use it as the off switch in a graded workflow, and it earns its keep every time.

Categorysampling

Inputs (1)

NameTypeDefaultDescription
latentLATENT

Outputs (1)

NameTypeDescription
LATENTLATENT