Nodes/ComfyUI-Nunchaku-Klein/Nunchaku FLUX.2 Klein Ref Latent Controller (Direct K/V)
ComfyUI Node

Nunchaku FLUX.2 Klein Ref Latent Controller (Direct K/V)

A spatial controller for Klein references — with strength to spare

By tom-m-2020·Created 2 months ago·Updated 17 days ago· 2
Nunchaku FLUX.2 Klein Ref Latent Controller (Direct K/V)
  • model
  • conditioning
  • MODEL
  • CONDITIONING
strength1.00
reference_index0
spatial_fadenone
spatial_fade_strength0.50
debugfalse

Most reference-weight nodes give you one number. The NunchakuKleinRefLatentControllerDirectKV gives you that number with a range of 0 to 1000 - and a set of spatial fades so you can make a reference's influence stronger in one part of the frame and weaker in another. It's the most flexible reference-steering node in this pack, and accordingly it's Direct K/V only: it needs the extended Nunchaku fork and will error out on stock Vitoom Nunchaku.

What the strength range means

strength defaults to 1.0 but runs to 1000. That's not a typo. The compat family caps reference control at 5.0 and behaves like a gentle volume knob; this node's scale is calibrated for a different job - forcing a reference to dominate, hard, when nothing else worked. In practice: 1.0 is "normal influence," single digits nudge, and values in the hundreds are "make this reference the entire composition." Start low; the range invites you to be stupid with it, and you will be.

Spatial control is the interesting part

  • spatial_fade - none, center_out, edges_out, top_down, or left_right. This modulates the reference's influence across the image. Want a product reference to control the center while the prompt fills the borders? center_out. Keeping a sky reference alive only near the top? top_down.
  • spatial_fade_strength - how hard the fade applies, 0-1, default 0.5.

Pairing this with Mask Ref Controller starts to feel redundant - the mask node constrains a reference by region using an explicit mask, this one uses directional gradients. Mask for arbitrary shapes, fade for smooth directional control.

Inputs and wiring

model and conditioning in, reference_index (0-7) to pick which reference, plus the strength and fade knobs. Outputs both MODEL and CONDITIONING to the sampler. Same one-active-spec rule as the family: don't stack it with a Ref Latent Weight or Text/Ref Balance on the same branch.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/tom-m-2020/ComfyUI-Nunchaku-Klein

The backend is the gate: install tom-m-2020/vitoom-nunchaku-extended, or repack an exact-matching Vitoom wheel. Tonera's Klein checkpoint into diffusion_models/ either way.

Common issues

  • "Requires the callback-capable Nunchaku backend" - the usual fork gate. Install it or pick a compat node.
  • Image collapses into the reference at strength 50 - expected, honestly. This range is for when you mean it. Use single digits unless you don't.
  • Fade has no visible effect - spatial_fade_strength at 0.5 is gentle; raise it, and confirm reference_index points at the reference you're actually fading.
CategoryNunchaku/FLUX.2 Klein/Enhancer/Reference

Inputs (7)

NameTypeDefaultDescription
modelMODEL
conditioningCONDITIONING
strengthFLOAT1.000–1000
reference_indexINT00–7
spatial_fadeoptCOMBOnone5 options: none, center_out, edges_out, top_down, left_right
spatial_fade_strengthoptFLOAT0.500–1
debugoptBOOLEANfalse

Outputs (2)

NameTypeDescription
MODELMODEL
CONDITIONINGCONDITIONING