Skip to main content
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
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

ParameterData TypeRequiredRangeDescription
modelMODELYes-The model to apply Normalized Attention Guidance to.
nag_scaleFLOATYes0.0 - 50.0The guidance scale factor. Higher values push the generation further from the negative prompt. (default: 5.0)
nag_alphaFLOATYes0.0 - 1.0The 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)
nag_tauFLOATYes1.0 - 10.0A scaling factor used to limit the normalization ratio. (default: 1.5)

Outputs

Output NameData TypeDescription
modelMODELThe patched model with Normalized Attention Guidance enabled.