Nunchaku FLUX.2 Klein Text/Ref Balance (Direct K/V)
The Direct K/V text/ref balance, for when the substitute isn't enough
- model
- conditioning
- MODEL
- CONDITIONING
Same dial as the compat Text/Ref Balance - one slider that decides whether the text prompt or the reference images win - but this version does it the honest way: it balances the text and reference tokens directly at the attention K/V level instead of approximating with prediction residuals. The trade-off is the same as the rest of the Direct K/V family: it requires the extended Nunchaku fork, and if you don't have it, the node tells you so.
This is the version to reach for when you've actually hit the compat node's limit. Its cousin is flagged "experimental, use 0.50-1.00" in the README, and the low end of the balance range is where the approximation wobbles. If you need fine control right around "mostly text, just a touch of reference" - balances down near 0.2-0.3 - the real K/V scaling here behaves far more predictably than the substitute. The one visible difference in the schema: balance steps at 0.001 instead of 0.005, which is the pack telling you this version is meant to be tuned, not swept.
Inputs and wiring
model, conditioning, and balance (0-1, default 0.5). Outputs MODEL and CONDITIONING, both to the sampler. References attach upstream via Multi Reference Latent. Same stacking rule as its sibling: it can't coexist with a Ref Latent Weight on the same branch - the source enforces one active spec.
Installing - the fork again
cd ComfyUI/custom_nodes
git clone https://github.com/tom-m-2020/ComfyUI-Nunchaku-Klein
Backend: install tom-m-2020/vitoom-nunchaku-extended, or repack an exact-matching pre-built Vitoom wheel with the pack's script (the versions must match precisely - check the supported list). Then tonera's Klein checkpoint into diffusion_models/.
Common issues
- "Requires the callback-capable Nunchaku backend" - stock Vitoom Nunchaku. Fork or fall back to the compat version.
- Balance fine-tuning doesn't change the image - verify
reference_index/reference wiring first; a missing reference means there's nothing to balance against. - Over-sharpened text - with direct K/V scaling, pushing balance hard toward text can over-emphasize tokens. Dial back in 0.05 steps; the finer step exists so you can.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| conditioning | CONDITIONING | — | |
| balance | FLOAT | 0.5000–1 | — |
| debugopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CONDITIONING | CONDITIONING | — |