NAG
https://chendaryen.github.io/NAG.github.io/
Project
https://github.com/ChenDarYen/Normalized-Attention-Guidance
ChenDarYen/
Normalized-Attention-Guidance
https://arxiv.org/abs/2505.21179
Normalized Attention Guidance: Universal Negative Guidance for Diffusion Models
https://gyazo.com/b3f52eca451f0c405b9115497fa19086
attention空間で
CFG
と同様の計算
$ \tilde{Z} = (1 + \phi) Z^+ - \phi Z^-
をし、L1ベースの
正規化
をしたのちそれをスカラー(α)倍して調整する
似たようなのがあったような気もするし無かったような気もする
nomadoor.icon
NegPiP
の亜種(一部の実装でWan2.1版)と言ったところ?かも?
morisoba65536.icon
実装
https://github.com/kijai/ComfyUI-WanVideoWrapper
ComfyUI-WanVideoWrapper
https://github.com/pamparamm/sd-perturbed-attention
pamparamm/sd-perturbed-attention
https://github.com/ChenDarYen/ComfyUI-NAG
ChenDarYen/
ComfyUI-NAG
Stable Diffusion
(SD1.5〜XL?)、
Stable Diffusion 3
、
🦊Chroma
、
FLUX.1
、
HiDream-I1
、
HunyuanVideo
、
Wan2.1
/
Wan2.2
に対応
KSamplerWithNAGノード
に加えて公式の
KSamplerAdvancedノード
に該当する
KSamplerWithNAG (Advanced)ノード
が新たに追加された。