Nodes/Krea2 NAG Negative Prompt/Krea2 Normalized Attention Guidance
ComfyUI Node

Krea2 Normalized Attention Guidance

Negative prompts for Krea 2, the way that actually works at CFG 1

By iljung1106·Created about a month ago·Updated about a month ago· 19
Krea2 Normalized Attention Guidance
  • model
  • nag_negative
  • model
phi4.0
tau2.50
alpha0.25
sigma_start1000.0
sigma_end0.0

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 CLIPTextEncode using 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 Krea2EditModelPatch wrapper, 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.
Categoryadvanced/guidance

Inputs (7)

NameTypeDefaultDescription
modelMODEL
nag_negativeCONDITIONING
phiFLOAT4.00–20
tauFLOAT2.500.01–20
alphaFLOAT0.250–1
sigma_startFLOAT1000.00–1000
sigma_endFLOAT0.00–1000

Outputs (1)

NameTypeDescription
modelMODEL