Krea2 Normalized Attention Guidance
Negative prompts for Krea 2, the way that actually works at CFG 1
- model
- nag_negative
- model
You got Krea 2 dialed in - Raw with the Turbo LoRA, 12 steps, CFG 1 - and then you hit the wall every guidance-distilled model ships with: the negative prompt box does nothing. Not weak, nothing. At CFG 1 ComfyUI doesn't even compute the unconditional pass, so there's no second prediction for your negative to steer. This node is the workaround that doesn't cost you the CFG-1 speed: it implements Normalized Attention Guidance (the NAG paper, arXiv 2505.21179) inside Krea 2's SingleStreamDiT, steering attention directly instead of through classifier-free guidance.
How it works
NAG's trick is that you don't need a whole second denoising pass to get negative steering - you need a second text context. Inside every Krea 2 attention block the node runs attention twice: once with your positive text, once with the NAG negative. Both calls start from byte-identical image tokens, so the image Q/K/V are identical and only the text K/V differs. It then takes the positive and negative attention outputs for the image tokens, extrapolates them (positive + phi × (positive − negative)), and normalizes - the math is the paper's equations 7–10, run in FP32 and cast back to FP16/BF16 so it doesn't drag precision through the noise.
Three dials do the work. phi (default 4.0) is how hard you push away from the negative - this is the "nag scale" of the original ComfyUI-NAG, where the author's standing advice was don't crank it past 3. tau (default 2.5) caps the normalization ratio so the push can't blow up a single step. alpha (default 0.25) blends the guided result back toward the plain positive attention, which is your safety net against overcorrecting. sigma_start/sigma_end (1000 → 0) just gate when the patch is active; leave them unless you want NAG to stop partway through denoising.
What you actually wire up
- model - your Krea 2 MODEL. Raw + Turbo LoRA is the setup that behaves at CFG 1.
- nag_negative - a CONDITIONING, not a text box. Encode it with
CLIPTextEncodeusing the same Qwen3-VL encoder, and put the concept you want to suppress in it ("big wings", if you're trying to un-wings your llama-bird). - The node's single model output is a patched clone - feed it into your sampler exactly where the stock Krea 2 model went.
Keep the sampler at CFG 1.0. That's the whole deal: NAG steers, CFG stays off, and you don't double your step cost.
Install
Easy - this pack is pure Python (pyproject.toml lists zero dependencies beyond what ComfyUI already ships). In ComfyUI Manager search ComfyUI-Krea2-NAG, or:
cd ComfyUI/custom_nodes
git clone https://github.com/iljung1106/ComfyUI-Krea2-NAG
Restart ComfyUI. The included workflows/Krea2 NAG - Raw FP8 Turbo.json expects three files: krea2_raw_fp8_scaled.safetensors, the Turbo LoRA krea2_raw_to_turbo_r256_comfy.safetensors, and the Qwen3-VL text encoder qwen3vl_4b_fp8_scaled.safetensors - plus the Qwen-Image VAE underneath. If you're new to Krea 2, the encoder (~8GB) and VAE are the files people routinely forget and then report the model as broken.
Gotchas
- Don't stack it. If you pipe in a model that already has a
Krea2EditModelPatchwrapper, the node raises an error and tells you to use its Krea2Edit sibling instead. Same if you chain two of these. - A negative that overlaps your subject will suppress the subject. NAG is powerful because it's specific - name the one thing you want gone, not a forty-keyword wall.
- It won't fix Krea 2's trained-in alignment filter. NAG steers attention; it's not an uncensor.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| nag_negative | CONDITIONING | — | |
| phi | FLOAT | 4.00–20 | — |
| tau | FLOAT | 2.500.01–20 | — |
| alpha | FLOAT | 0.250–1 | — |
| sigma_start | FLOAT | 1000.00–1000 | — |
| sigma_end | FLOAT | 0.00–1000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |