> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-comfy-docs-comfyapi-search.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# PerturbedAttentionGuidance - ComfyUI Built-in Node Documentation

> The PerturbedAttentionGuidance node applies perturbed attention guidance to a diffusion model to improve generation quality.

The PerturbedAttentionGuidance node applies perturbed attention guidance to a diffusion model to improve generation quality. During sampling it makes an extra prediction in which the middle block's self-attention is replaced by a simplified version that passes the value projections straight through, then adds the scaled difference between the normal conditional prediction and this perturbed prediction to the denoised result. Setting `scale` to 0 disables the effect entirely.

## Inputs

| Parameter | Description                                                                                                                                                       | Data Type | Required | Range                    |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | ------------------------ |
| `model`   | The diffusion model to apply perturbed attention guidance to                                                                                                      | MODEL     | Yes      | -                        |
| `scale`   | The strength of the perturbed attention guidance effect (default: 3.0). When set to 0, the node has no effect and returns the original denoised result unchanged. | FLOAT     | Yes      | 0.0 - 100.0 (step: 0.01) |

## Outputs

| Output Name | Description                                                                                     | Data Type |
| ----------- | ----------------------------------------------------------------------------------------------- | --------- |
| `model`     | The modified model with the perturbed attention guidance patch attached to its sampling process | MODEL     |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/PerturbedAttentionGuidance/en.md)

***

**Source fingerprint (SHA-256):** `1cf824486ae695a9e563c70a4798aaf4c9c067ae3b53172c9767e3c5093d0096`
