Free | No tracking | Every fact with a source|German and English

Error / Memory

CUDA out of memory (VRAM full)

Your graphics card’s VRAM is not enough for the current step.

The message

torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 2.00 GiB. GPU 0 has a total capacity of …

Affects: ComfyUI

Why is this happening?

The model, image size, batch size, and intermediate results all have to fit in VRAM at the same time. Large models like Flux, SDXL at high resolution, or video models can quickly exceed 8 to 12 GB. Other programs that use the graphics card too (games, browsers, other AI tools) also use VRAM.

How to fix it

  1. Close all other programs that use the graphics card, for example games, other AI programs, or browsers with many tabs.
  2. Check the batch size in the workflow (batch_size in the “Empty Latent Image” node) and set it to 1. Also reduce the resolution.
  3. If the error only appears during decoding at the end, replace the “VAE Decode” node with “VAE Decode (Tiled)”. This processes the image in tiles.
  4. Start ComfyUI with --lowvram. Portable: Open run_nvidia_gpu.bat with the editor and add the option to the start line, for example .\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --lowvram. Desktop app: Manage → Startup Args. Manual installation: python main.py --lowvram.
  5. If that’s not enough, use --novram instead. With --reserve-vram 2 you also keep 2 GB free for Windows and other programs.
  6. Use a smaller version of the model (for example, an fp8 version) if the provider offers one.
  7. Only as a last resort: --cpu. Then everything runs on the processor and is very slow.

Better not: Don’t rely on --cpu long term: it fixes the error, but it often makes image generation many times slower.

Set up from scratch again

If it still doesn’t work after that, a fresh setup step by step often helps:

Terms for this

Similar errors

Sources

Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.