Reference only

CUDA out of memory: separate model loading, sampling and VAE decoding

Identify the stage that requested GPU memory before reducing the workload. Advertised VRAM, weight-file size and the memory available to this particular task are different quantities.

Symptoms and scope

Identify the stage that requested GPU memory before reducing the workload. Advertised VRAM, weight-file size and the memory available to this particular task are different quantities.

Error fragments for search; IDs, values and filenames may vary:

CUDA out of memory
torch.OutOfMemoryError

Source-supported context

Official troubleshooting discusses resolution, batch size and memory strategies. PyTorch states that empty_cache releases unused cache; it does not increase the total memory available to Torch or remove live tensors. Source 1 Source 2

Cases to distinguish

1. Other generation processes or ComfyUI instances occupy the same GPU.

2. Resolution, batch size, video length or simultaneous model residency exceeds the available peak capacity.

3. Workspaces, retained tensors or custom-node caches increase a particular stage's peak usage.

Diagnostic sequence

The sequence below is an editorial procedure based on the cited context, not a diagnosis already confirmed for your environment.

Step 1. Record the last executing node, requested allocation, GPU, dimensions, batch size, frame count and concurrency.

Step 2. Stop only tasks you know are unnecessary. Start with one queued task. If the particular workflow and model support a smaller input or batch size of one, use that as a baseline without changing every algorithm parameter.

Step 3. For sampling failures, reduce spatial or temporal load only where the workflow and model permit it; use the dedicated VAE guide for decoding failures; check accidentally oversized or multiple models for load failures.

Step 4. Check model/version support before testing offload, quantization or low-memory settings. Change one setting at a time in a copy and record the result.

Completion check

A supported smaller baseline completes repeatedly, and changing one supported parameter has an explainable effect. Success with that baseline does not guarantee the original workload will work.

Limitations and cautions

Cache clearing, restarting and arbitrary allocator variables are not universal repairs. Offload can move the bottleneck to system RAM, and altered settings may change output.

Original sources

Localization prepared: 2026-09-22. The source-check dates above were inherited from the existing article; this translation does not claim they were all rechecked today. No GPU run, minimum-memory measurement or runtime guarantee is supplied.

Didn't solve it?

Check the next possible cause

The same symptom can come from a different cause. Work through these related entries in order.

  1. VAE out of memory after sampling finishes: diagnose decoding separatelyVAEDecodeCompleted sampling still leaves latent data that must be decoded into pixels. A VAE failure after sampling therefore differs from memory exhaustion at the start of sampling.
  2. Windows error 1455: paging-file exhaustion is not CUDA out of memoryThe paging file is too small for this operation to completeThis Windows error concerns committed system memory. It should not be treated as VRAM exhaustion or proof that a safetensors file is corrupt merely because it appears during model loading.
Paste your full log into the error finder

Was this page helpful?

Anonymous. Only a yes/no counter is stored; no account, IP address or device details.

Sources & references

Localized from the existing Chinese research draft. Original source-check dates are retained; this translation is not new technical verification or a runtime test.

01ComfyUI troubleshooting overviewSource checked: 2026-09-2102torch.cuda.memory.empty_cacheSource checked: 2026-09-21

Report an issue · 78af577c-c297-5597-844d-2cd1bec61c58