> ## 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.

# ModelAttentionBackend - ComfyUI Built-in Node Documentation

> This node selects the dense attention implementation for a model, clones the model, applies the chosen backend, and returns the patched clone.

This node selects the dense attention implementation for a model, clones the model, applies the chosen backend, and returns the patched clone. When used with Block Sparse Attention, this backend is used whenever sparse attention is inactive or unsupported. If the selected backend is unavailable, the node automatically falls back to PyTorch attention.

## Inputs

| Parameter   | Description                                                                                                                                                                                                                                              | Data Type | Required | Range                                              |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | -------------------------------------------------- |
| `model`     | The model to patch.                                                                                                                                                                                                                                      | MODEL     | Yes      |                                                    |
| `attention` | The dense attention backend to apply. Comfy Kitchen attention uses quantized INT8 attention and is available only on Nvidia and AMD GPUs. Default: "pytorch attention". If the selected backend is unavailable, PyTorch attention is used as a fallback. | COMBO     | Yes      | "pytorch attention"<br />"comfy kitchen attention" |

Note: The "comfy kitchen attention" option is only listed when the Comfy Kitchen INT8 attention module is available in the current environment.

## Outputs

| Output Name | Description                                                             | Data Type |
| ----------- | ----------------------------------------------------------------------- | --------- |
| `model`     | A clone of the input model with the selected attention backend applied. | 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/ModelAttentionBackend/en.md)

***

**Source fingerprint (SHA-256):** `4f6e4800c2a3bb09b47b7c8f0481e1b6de3070f57234e610df5d3ce60dfdb309`
