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

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

The real Ref Latent Weight — if you're willing to install the fork

By tom-m-2020·Created 2 months ago·Updated 17 days ago· 2
Nunchaku FLUX.2 Klein Ref Latent Weight (Direct K/V)
  • model
  • MODEL
reference_index0
weight1.00

This is the version of Ref Latent Weight that does what the name promises: it directly scales one reference's projected attention K/V tokens before attention runs. No prediction-residual approximation, no "close enough" substitute - the reference's keys and values get physically weighted in every attention layer. The catch, stated right in the source and the README: it requires the callback-capable Nunchaku backend derivative - specifically the author's extended fork of Vitoom Nunchaku (tom-m-2020/vitoom-nunchaku-extended). Without it, the node refuses to run.

Which one should you use?

Honest answer: if you're on stock Vitoom Nunchaku and just want to de-emphasize one of three references, the compatibility NunchakuKleinRefLatentWeight is probably fine and you shouldn't rebuild your backend for it. Install the fork and use this one when the compat version's approximation actually bothers you - when a reference's influence bleeds through despite a low weight, or you're chasing precise per-reference control for a serious multi-ref composite. The Direct K/V family (this node, the Direct K/V Text/Ref Balance, the Ref Latent Controller, and Identity Feature Transfer Final) is the author's "full control over FLUX.2 Klein" tier, and they all gate on the same fork.

Inputs and setup

Identical shape to the compat version: model, reference_index (0-7), weight (0-5, default 1.0). Output MODEL. Same wiring - references from Multi Reference Latent, model through this node to the sampler.

Installing - the fork, carefully

This is the one place the pack install genuinely differs:

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

For the backend you have two options per the README: install tom-m-2020/vitoom-nunchaku-extended, or use the pack's "repack" script against a pre-built Vitoom wheel. The repack only works if the versions match exactly - e.g. nunchaku-1.3.0.dev20260629+cu13.0torch2.11-cp313-cp313-win_amd64 needs its exact-matching script. The supported-wheel list is deliberately short; check it before you commit. Then the tonera Klein checkpoint in diffusion_models/ as usual.

Common issues

  • "Requires the callback-capable Nunchaku backend" error - you're on stock Vitoom Nunchaku. Install the extended fork or use the compat version.
  • Weight does nothing at the extremes - at weight 0 a reference should vanish; if it still leaks, verify reference_index and that the conditioning actually carries the reference.
  • Pairing errors with Text/Ref Balance - the Direct K/V family shares the one-active-spec rule; the error message names the offending node.
CategoryNunchaku/FLUX.2 Klein/Enhancer/Reference

Inputs (3)

NameTypeDefaultDescription
modelMODEL
reference_indexINT00–7
weightFLOAT1.000–5

Outputs (1)

NameTypeDescription
MODELMODEL