🎯 CubicJ LTX2 Explicit NAG
Bring negative prompts back without touching CFG
- model
- nag_cond_video
- nag_cond_audio
- MODEL
Here's the problem this node solves: LTX-2, like most of the 2026 guidance-distilled generation, wants to run at CFG 1. And at CFG 1, your negative prompt does literally nothing - there's no unconditional pass for it to steer, so ComfyUI doesn't even compute it. People burn hours discovering this, because the negative box still renders and happily accepts your typing while quietly discarding it.
NAG (Normalized Attention Guidance) is the workaround: instead of extrapolating in the guidance term, it intervenes in attention space, which means it can steer the model away from something without needing CFG above 1. The catch with classic NAG is that it derives its "negative" from the positive prompt itself. This node is the "explicit" variant - it takes the negative conditioning as a separate input, so you control exactly what's being pushed against. And it's built for LTX-2's multimodal transformer, patching both the video and audio cross-attention paths.
How it works
Mechanically, it clones your model and patches the attn2 cross-attention forward pass in every transformer block (and audio_attn2, if you feed an audio negative). On each step it re-runs attention for the positive-conditioned queries against your explicit negative context, then combines them:
guided = scale * positive − (scale − 1) * negative
then it normalizes using L1 norms, clips the ratio at nag_tau, and blends the result back with the original positive output by nag_alpha. The normalization and clip are the "normalized" part - they stop the guidance from blowing out and producing oversaturated garbage. If nag_scale is 0, the whole thing short-circuits and returns your model untouched, which is a handy way to A/B it without rewiring.
The optional conditioning inputs matter. nag_cond_video feeds the video cross-attention and nag_cond_audio feeds the audio path - so you can push, say, "mumbling, tinny, echo" against the audio while the video negative targets artifacts. The code runs those through LTX's own connector/projection machinery, so you feed it standard CONDITIONING and it handles the rest.
The dials
- nag_scale - the strength, default 11. This is aggressive. The original NAG author's published caveat is not to exceed ~3; this implementation is structured differently (explicit context, separate audio/video), but the default still reads as "a lot." Start lower if the output looks overcooked.
- nag_alpha - how much of the guided result to blend back in, default 0.25. 0.25 is a conservative, sane default.
- nag_tau - the normalization cap, default 2.5. Raise it to allow stronger correction before the clip kicks in.
- inplace - mutates tensors in place for speed. It's on by default and generally fine; flip it off if you ever see strange cross-node corruption.
- debug - prints how many video/audio blocks got patched, so you can confirm it actually engaged.
Output is a single patched MODEL. Wire it wherever your LTX-2 model goes.
Installing it
It lives in cubicj-comfy-nodes. ComfyUI Manager: search "CubicJ Comfy Nodes", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/cubicj/cubicj-comfy-nodes
# restart ComfyUI
No dependencies. But this node has a real requirement the README won't tell you: it reaches deep into ComfyUI's LTX internals (comfy.ldm.lightricks - GuideAttentionMask, apply_rotary_emb, the audio/video connector machinery). That means LTX-2-family models only, and a recent ComfyUI. Don't feed it an LTXV 0.9.x or a Wan model; it will not do the thing.
Troubleshooting
The failure mode to watch for is a shape mismatch between your negative context and the model's cross-attention - the code detects it, prints a skipped shape mismatch warning in the console, and passes that block through unpatched, so you get unsteered output rather than a crash. That's graceful, but it's also silent steering loss, so check the console if your negative seems to have no effect. Keep debug on until you've seen the patch-count line confirming both video and audio engaged. And if the output gets that classic NAG overdrive look - too crisp, burned, oversaturated - lower nag_scale before you touch anything else. One more honest note: this is a fresh, small pack with zero community discussion so far, so the defaults are your only tuning lore - but the debug output means you can find the right values yourself.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| nag_scale | FLOAT | 11.0000–100 | — |
| nag_alpha | FLOAT | 0.2500–1 | — |
| nag_tau | FLOAT | 2.5000–10 | — |
| inplace | BOOLEAN | true | — |
| debug | BOOLEAN | false | — |
| nag_cond_videoopt | CONDITIONING | — | |
| nag_cond_audioopt | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |