Skip to main content
The NAGuidance node applies Normalized Attention Guidance to a model. This technique enables the use of negative prompts with distilled or schnell models by modifying the model’s attention mechanism during the sampling process to steer the generation away from undesired concepts.

Inputs

ParameterDescriptionData TypeRequiredRange
modelThe model to apply Normalized Attention Guidance to.MODELYes-
nag_scaleThe guidance scale factor. Higher values push the generation further from the negative prompt. (default: 5.0)FLOATYes0.0 - 50.0
nag_alphaThe blending factor for the normalized attention. A value of 1.0 fully replaces the original attention, while 0.0 has no effect. (default: 0.5)FLOATYes0.0 - 1.0
nag_tauA scaling factor used to limit the normalization ratio. (default: 1.5)FLOATYes1.0 - 10.0

Outputs

Output NameDescriptionData Type
modelThe patched model with Normalized Attention Guidance enabled.MODEL
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 42b4d601312dcbb1c934c6a79bbb5e9fd6598fa5f32b18f5c0affcb596672cba