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

# QwenImage21Cache - ComfyUI Built-in Node Documentation

> The QwenImage21Cache node configures the KV prefix cache of the Qwen-Image 2.1 model: where the cached keys and values are stored and at what precision.

The QwenImage21Cache node configures the KV prefix cache of the Qwen-Image 2.1 model: where the cached keys and values are stored and at what precision. Text and reference tokens are computed once and reused across sampling steps, which is where most of the speedup on edit workflows comes from, and this node lets you trade memory for speed or rule the cache out entirely. This node is marked as experimental.

## Inputs

| Parameter | Description                                                                                                                                                                                                                                                                                                                     | Data Type | Required | Range                                           |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | ----------------------------------------------- |
| `model`   | The Qwen-Image 2.1 model whose prefix cache is configured.                                                                                                                                                                                                                                                                      | MODEL     | Yes      | -                                               |
| `device`  | Where the cached keys and values are stored. `"auto"` (default) uses spare VRAM first and then RAM; `"gpu"` stores the cache in VRAM; `"cpu"` stores it in RAM and prefetches it behind compute, which costs little speed; `"off"` recomputes the prefix every step, which is slower but is the only way to rule the cache out. | COMBO     | Yes      | `"auto"`<br />`"gpu"`<br />`"cpu"`<br />`"off"` |
| `dtype`   | Storage precision of the cache. `"default"` is lossless; `"int8"` halves the cache at about bf16 accuracy; `"int4"` quarters it but roughly doubles the per-step error.                                                                                                                                                         | COMBO     | Yes      | `"default"`<br />`"int8"`<br />`"int4"`         |

When the cache does not fit, the model recomputes the prefix instead of evicting the other branch's slot, so an oversized setting degrades speed rather than failing the run.

## Outputs

| Output Name | Description                                                                 | Data Type |
| ----------- | --------------------------------------------------------------------------- | --------- |
| `MODEL`     | The model with the cache device and precision applied, ready to be sampled. | 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/QwenImage21Cache/en.md)

***

**Source fingerprint (SHA-256):** `0c10cdb465d1ee4063273ffbb4913def3830f7e329694cd0a2e292d6f3c37ae4`
