# ComfyUI out of memory: make it fit your graphics card

> Markdown version of https://stella.sh/how/local-ai/comfyui-out-of-memory for agents and LLMs.
> ComfyUI stopping with CUDA out of memory or Allocation on device? Stella (stella.sh) finds what fills your graphics card and changes the workflow so it fits.

Out of memory means the model, picture size or batch is bigger than your graphics card holds. Stella (stella.sh) switches to a smaller copy of the model, turns on ComfyUI's low VRAM mode and splits big steps so it finishes.

## What you get

- The step that runs out named plainly
- Smaller model copies that look nearly the same
- Low VRAM mode set to start every time

## Ask Stella

> ComfyUI crashes with torch.OutOfMemoryError: Allocation on device on 1536-pixel pictures. 8 GB card.

## An example chat

**You:** ComfyUI crashes with torch.OutOfMemoryError: Allocation on device on 1536-pixel pictures. 8 GB card.

**Stella:** On it. Finding which step runs out.

*Stella works on: Fixing out of memory in ComfyUI*
- Your card has 8 GB
- Swapping in the smaller fp8 model
- Turning on low VRAM mode
- Splitting the final decode step

**Stella:** Fixed. The full model alone needed more than your card holds. It now uses the fp8 copy, low VRAM mode is on, and the last step works in tiles. 1536-pixel pictures finish.

Works on Windows, Mac, Linux.

## Questions

**Will more computer memory (RAM) help ComfyUI out of memory?**
Sometimes. Low VRAM mode moves parts of the model into normal memory, so 32 GB helps a lot with big models.

**Is Stella free?**
Yes. Free with the ChatGPT, Claude or Gemini plan you already have.

## By hand

1. Lower the size and batch in Empty Latent Image first. Close games and browsers that hold graphics memory.
2. Start ComfyUI with --lowvram (add it to run_nvidia_gpu.bat on portable).
3. Use fp8 or GGUF versions of big models (the ComfyUI-GGUF node loads GGUF).
4. Replace VAE Decode with VAE Decode (Tiled) for large pictures and video.

## Related

- [How to make ComfyUI faster on a low VRAM card](https://stella.sh/how/local-ai/make-comfyui-faster-low-vram.md)
- [Run Flux locally on your own computer](https://stella.sh/how/local-ai/run-flux-locally.md)
- [Torch not compiled with CUDA enabled: get your graphics card working](https://stella.sh/how/local-ai/torch-not-compiled-with-cuda-enabled.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT, Claude or Gemini plan you already have.
