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 Self-Attention Guidance node applies guidance to diffusion models by modifying the attention mechanism during the sampling process. It captures attention scores from unconditional denoising steps and uses them to create blurred guidance maps that influence the final output. This technique helps guide the generation process by leveraging the model’s own attention patterns.

Inputs

ParameterData TypeRequiredRangeDescription
modelMODELYes-The diffusion model to apply self-attention guidance to
scaleFLOATNo-2.0 to 5.0The strength of the self-attention guidance effect (default: 0.5)
blur_sigmaFLOATNo0.0 to 10.0The amount of blur applied to create the guidance map (default: 2.0)

Outputs

Output NameData TypeDescription
modelMODELThe modified model with self-attention guidance applied
Note: This node is currently experimental and has limitations with chunked batches. It can only save attention scores from one UNet call and may not work properly with larger batch sizes.