NAG
https://chendaryen.github.io/NAG.github.io/Project
https://github.com/ChenDarYen/Normalized-Attention-GuidanceChenDarYen/Normalized-Attention-Guidance
https://arxiv.org/abs/2505.21179Normalized 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-WanVideoWrapperComfyUI-WanVideoWrapper
https://github.com/pamparamm/sd-perturbed-attentionpamparamm/sd-perturbed-attention
https://github.com/ChenDarYen/ComfyUI-NAGChenDarYen/ComfyUI-NAG
Stable Diffusion(SD1.5〜XL?)、Stable Diffusion 3、🦊Chroma、FLUX.1、HiDream-I1、HunyuanVideo、Wan2.1/Wan2.2に対応
KSamplerWithNAGノードに加えて公式のKSamplerAdvancedノードに該当するKSamplerWithNAG (Advanced)ノードが新たに追加された。