ComfyUI > Nodes > ComfyUI > Normalized Attention Guidance

ComfyUI Node: Normalized Attention Guidance

Class Name

NAGuidance

Category
advanced/guidance
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Normalized Attention Guidance Description

Specialized node enhancing AI models with normalized attention guidance for refined artistic control.

Normalized Attention Guidance:

NAGuidance, or Normalized Attention Guidance, is a specialized node designed to enhance AI models by applying a technique that allows for the integration of negative prompts, particularly on distilled or schnell models. This node is part of the advanced guidance category and is marked as experimental, indicating its cutting-edge nature in the realm of AI art generation. The primary goal of NAGuidance is to refine the model's output by adjusting the attention mechanism, thereby enabling more nuanced and controlled artistic expressions. By leveraging normalized attention, this node provides a mechanism to influence the model's focus, allowing for a more precise alignment with the desired artistic intent. This can be particularly beneficial in scenarios where the artist wishes to emphasize or de-emphasize certain elements within the generated artwork, thus offering a higher degree of creative control.

Normalized Attention Guidance Input Parameters:

model

This parameter represents the AI model to which the Normalized Attention Guidance will be applied. It is crucial as it determines the base capabilities and characteristics that the guidance will influence. The model serves as the canvas upon which the guidance techniques are applied, and selecting the appropriate model is essential for achieving the desired artistic outcomes.

nag_scale

The nag_scale parameter is a float value that dictates the guidance scale factor, with a default value of 5.0, a minimum of 0.0, and a maximum of 50.0. This parameter controls how strongly the guidance pushes the model away from the negative prompt. Higher values result in a more pronounced effect, allowing for greater deviation from undesired elements, thus enabling more precise artistic direction.

nag_alpha

nag_alpha is a float parameter with a default value of 0.5, ranging from 0.0 to 1.0, and it serves as the blending factor for the normalized attention. A value of 1.0 indicates full replacement of the model's attention mechanism, while 0.0 means no effect. This parameter allows you to fine-tune the extent to which the normalized attention influences the model, providing a balance between the original model behavior and the guided adjustments.

nag_tau

This parameter, nag_tau, is a float with a default value of 1.5, a minimum of 1.0, and a maximum of 10.0. It is used to adjust the sensitivity of the guidance mechanism. By modifying nag_tau, you can control the responsiveness of the model to the guidance inputs, allowing for either subtle or more aggressive adjustments to the model's attention.

Normalized Attention Guidance Output Parameters:

model

The output parameter is the modified model with NAG enabled. This patched model incorporates the effects of the Normalized Attention Guidance, reflecting the adjustments made based on the input parameters. The output model is expected to exhibit enhanced control over attention, allowing for more refined and targeted artistic outputs that align with the specified guidance.

Normalized Attention Guidance Usage Tips:

  • Experiment with different nag_scale values to find the optimal level of guidance for your specific artistic goals. Higher values can help in significantly altering the model's focus, while lower values maintain more of the original model's characteristics.
  • Adjust nag_alpha to control the blend between the original model's attention and the guided attention. This can be particularly useful when you want to retain some of the model's inherent style while still applying guidance.
  • Use nag_tau to fine-tune the sensitivity of the guidance. This can help in achieving either subtle or more pronounced effects, depending on the desired outcome.

Normalized Attention Guidance Common Errors and Solutions:

Model not compatible with NAG

  • Explanation: The selected model may not support the application of Normalized Attention Guidance due to its architecture or pre-existing configurations.
  • Solution: Ensure that the model is compatible with NAG by checking its documentation or selecting a model known to support this type of guidance.

Guidance parameters out of range

  • Explanation: One or more of the guidance parameters (nag_scale, nag_alpha, nag_tau) may have been set outside their allowable range.
  • Solution: Verify that all parameters are within their specified ranges and adjust them accordingly to ensure proper functionality.

Unexpected output from model

  • Explanation: The output may not align with expectations due to inappropriate parameter settings or model selection.
  • Solution: Re-evaluate the input parameters and consider adjusting them incrementally. Additionally, ensure that the chosen model is suitable for the intended artistic style and guidance application.

Normalized Attention Guidance Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Normalized Attention Guidance