# Faster Video in ComfyUI

> ComfyUI has a faster way to do the heaviest part of making a video, called kitchen attention. It is off unless you turn it on. Turning it on takes about a minute and the video comes out practically the same.

Measured on one 8 second Person Swap clip, same seed both ways: 23.0 s per step normal, 11.0 s per step with kitchen attention. The whole run went from 152 s to 78 s.

This page for people, with the comparison clips and the full table of measurements: https://ausboss-examples.vercel.app/speed/

## Who can use it

- NVIDIA RTX 20, 30, 40 or 50 series, or a GTX 16 series card.
- AMD Radeon RX 7000 series or newer.
- ComfyUI 0.32 or newer.
- Not older NVIDIA cards (GTX 10 series and before), Mac, or CPU only.

If the card can't use it, ComfyUI quietly keeps the normal way and nothing breaks. So trying it is safe.

## Way 1: add one node

Works on every install, the Desktop app too.

1. Update ComfyUI.
2. Add the node **Model Attention Backend** (`ModelAttentionBackend`).
3. Put it on the model wire that goes into the sampler or guider: model in, model out. It goes after the LoRA loaders, right before the sampler.
4. Set `backend` to **comfy kitchen attention**.
5. Run, then save the workflow so it stays on.

```
Load model → LoRA Loader → Model Attention Backend → Sampler / Guider
```

It only changes how the model does its math, not what the model is.

## Way 2: turn it on for everything

Add `--use-ck-attention` to the line that starts ComfyUI, then restart it.

```bash
python main.py --use-ck-attention
```

On Windows portable, add it to the end of the first line of `run_nvidia_gpu.bat` (`run_amd_gpu.bat` on AMD). The Desktop app has no option for this yet: use Way 1.

One known problem: with the launch setting, nodes that write text with a Qwen 3.5 model (an auto prompt or prompt upsampler, for example) can fail with an error about "tensor strides" on some ComfyUI versions. If that happens, take the setting out and use Way 1, which only touches the video model.

## How to tell it is working

Watch the console while it samples. The time per step (the `s/it` number on the progress bar) drops to about half.

## Technical details

Kitchen attention is ComfyUI's own attention code from its comfy-kitchen package, which ComfyUI installs. It runs attention in 8-bit integer math, which is where the speed comes from. The node patches only the model wired through it. The launch setting switches every model, text encoders included, which is why the Qwen 3.5 problem (comfy-kitchen issue #274) only shows up with the launch setting.
