Nodes/cgem156-ComfyUI๐ŸŒ/LCM Sampler RCFG ๐ŸŒ
ComfyUI Node

LCM Sampler RCFG ๐ŸŒ

Pushing LCM past its usual CFG 1-2 ceiling without the usual burn

By laksjdjfยทCreated 2 years agoยทUpdated about a month agoยท 93
LCM Sampler RCFG ๐ŸŒ
  • original_latent
  • SAMPLER
โ—„enabletrueโ–บ
โ—„delta1.00โ–บ
โ—„cfg1.00โ–บ

LCM (Latent Consistency Models) is a distilled sampler built to jump to a finished image in 2-8 steps instead of the usual 20-50 - but distillation bakes a fixed amount of guidance into the model, so bolting on normal CFG on top double-applies it and burns the image, the same failure mode every distilled checkpoint has. The standard workaround is just to keep CFG at 1-2 and accept that you can't push prompt adherence much further. This node is a custom LCM sampler built specifically to try to get past that ceiling.

What it's doing, as best the schema tells it

There's no README section or tooltip explaining the exact mechanism here, so this is a read from the parameters rather than documented behavior - worth knowing going in. The enable toggle and the optional original_latent input are the interesting pair: having an explicit on/off switch alongside an optional reference latent suggests this sampler can fall back to normal LCM behavior when disabled or when no reference is supplied, and does something extra when both are active - most plausibly using original_latent as an anchor to correct or regularize the prediction as delta and cfg push guidance harder than LCM's distillation was trained for. That's consistent with the general family of techniques (dynamic thresholding, rescaled CFG) built to let a model tolerate more guidance strength without the standard oversaturation and detail collapse that comes from naively cranking CFG on a distilled checkpoint.

Take that as an informed read rather than a guarantee - if you want the exact math, the pack's custom_samplers folder in the GitHub repo is the ground truth.

Inputs and outputs

Required:

  • enable - boolean, default true. Toggles whether the RCFG behavior is active at all.
  • delta - 0-5, default 1. The knob most likely controlling how strongly the correction/anchoring effect is applied.
  • cfg - 0-5, default 1. Note the range tops out at 5, not the 100 a normal CFG guider allows - this is scaled for LCM's usual low-CFG regime, not a general-purpose CFG value.

Optional:

  • original_latent - a LATENT to use as a reference/anchor point.

Output is a single SAMPLER, wired into KSampler (Advanced) or SamplerCustom the same as any sampler.

Installing it

ComfyUI Manager, search "cgem156-ComfyUI". Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI

Restart ComfyUI. No model download - you'll need an actual LCM-compatible checkpoint or LCM-LoRA loaded separately, same as running stock LCM sampling.

Common issues

Since this node has essentially no community footprint to draw troubleshooting wisdom from, treat experimentation here as genuinely exploratory. A few sane starting points regardless: this is still an LCM sampler underneath, so pair it with an actual LCM-distilled checkpoint or LCM-LoRA and a low step count (4-8) - it's not a way to run real CFG on a non-LCM model. If cfg above 1 still produces the familiar burned, oversaturated look, try leaving enable on and feeding a real original_latent before assuming the technique doesn't work - an unanchored run and an anchored one are, per the schema, plausibly quite different behaviors. And because delta and cfg interact, change one at a time on a fixed seed rather than tuning both together, or you won't be able to tell which knob is actually responsible for what you're seeing.

Categorycgem156 ๐ŸŒ/custom_samplers

Inputs (4)

NameTypeDefaultDescription
enableBOOLEANtrueโ€”
deltaFLOAT1.000โ€“5โ€”
cfgFLOAT1.000โ€“5โ€”
original_latentoptLATENTโ€”

Outputs (1)

NameTypeDescription
SAMPLERSAMPLERโ€”