Nodes/ComfyUI-Inference-Core-Nodes/Inference_Core_TonemapNoiseWithRescaleCFG
ComfyUI Node

Inference_Core_TonemapNoiseWithRescaleCFG

Two burn-fixers in one model patch

By LykosAI·Created 2 years ago·Updated about a year ago· 33
Inference_Core_TonemapNoiseWithRescaleCFG
  • model
  • MODEL
tonemap_multiplier1.00
rescale_multiplier1.00

This one's not a preprocessor - it's a model patch that fuses two separate CFG-fixing tricks into a single node. The pack itself files it under custom_node_experiments rather than a polished category, which is the author being upfront: treat it as a utility to reach for when CFG is misbehaving, not a headline feature you build a workflow around.

The two problems it's solving

Tonemapping the noise prediction is how you make CFG values above 1 usable on guidance-distilled models like Flux, which are trained to run at CFG 1 and blur or burn out fast the moment you push higher. The trick - first popularized as a standalone ComfyUI node - compresses the classifier-free-guidance signal the way HDR tonemapping compresses blown highlights in a photo, using a Reinhard-style operator, so you can turn CFG up (for stronger prompt adherence) without the image collapsing into noise.

Rescale CFG is the older, better-known fix from the "Common Diffusion Noise Schedules and Sample Steps are Flawed" paper - it renormalizes the guided prediction's variance back toward the unguided prediction's, which stops colors from saturating and contrast from blowing out at higher CFG. It matters most on v-prediction / zero-terminal-SNR checkpoints (NoobAI-XL vpred is the model people actually use this on), where the community's standard recipe is CFG 1.5–2.0 with a CFG++ sampler, or a higher CFG paired with a RescaleCFG multiplier around 0.7.

This node runs both at once, as one model patch, each with its own strength dial.

Inputs and output

  • model (required) - the model to patch. Wire it in right after your checkpoint loader, before the sampler.
  • tonemap_multiplier (required, default 1, range 0–100) - how hard the noise prediction gets compressed. Higher lets you push CFG further before things fall apart; 0 disables the tonemap half entirely.
  • rescale_multiplier (required, default 1, range 0–1) - how much of the rescale correction gets blended in. If you've used ComfyUI's own core RescaleCFG node, this behaves the same way; for vpred models the community's sweet spot for that half sits closer to 0.7 than to the 1 default here.

Output is a single MODEL, patched, ready to go straight into your KSampler.

When you'd actually reach for it

Two cases: you're running Flux (or another guidance-distilled model) and want more than the default CFG 1 obedience without the usual blur, or you're running a v-prediction/zsnr checkpoint like NoobAI-XL vpred and getting the classic oversaturated, blown-out look at normal CFG values. Both are "CFG is fighting me" symptoms, and this node is a single stop for both fixes instead of chaining two separate nodes.

Installing it

ComfyUI Manager: search ComfyUI-Inference-Core-Nodes, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes

Then run install.py, or pick the pip extra for your hardware (.[cuda], .[cuda12], .[rocm], .[directml], .[cpu]) for the accelerated onnxruntime wheel other nodes in the pack use. This particular node needs no model weights of its own - it's pure math over the model's sampling function, so unlike the preprocessor nodes in this pack there's no first-run download and no network dependency once it's installed. Restart ComfyUI and it's ready.

Where people get burned

Because both multipliers act on the same prediction, cranking them together makes it hard to tell which one is causing a given artifact. If your output looks worse after adding this node, isolate: set rescale_multiplier to 0 first and see if the tonemap half alone behaves, then bring it back up. Don't just nudge both dials at once and hope. On the install side, this pack shares the same dependency gotchas as its siblings - a ModuleNotFoundError: No module named 'inference_core_nodes' after cloning almost always means the install step ran against the wrong Python (use the embedded interpreter on portable builds), and there are scattered reports of the whole pack failing to import on Mac, where pip install -e .[cpu] is the correct extra to use.

Categorycustom_node_experiments

Inputs (3)

NameTypeDefaultDescription
modelMODEL
tonemap_multiplierFLOAT1.000–100
rescale_multiplierFLOAT1.000–1

Outputs (1)

NameTypeDescription
MODELMODEL