ComfyUI on Mac: how do you fix memory failures?
Reduce the workload first, then use the official memory control that matches the failure. Black images are a separate symptom and do not prove an out-of-memory error.
Lower resolution or batch size and close other memory consumers. If the problem persists, try the documented controls one at a time and keep the exact model, app version and error in your notes.
Get the local AI newsletter for your Mac
One practical Thursday email with new local AI models, memory requirements and Mac setup guides.
For: MacBook Air M5 16 GB
You'll also get the weekly ModelFit email. By signing up you agree to our Privacy Policy. Unsubscribe from either email anytime, in one click.
What should you try first for an MPS allocation failure?
The official troubleshooting guide starts with a smaller workload and fewer competing applications. Its memory options reduce different costs, so change one thing and rerun the same workflow.
Run text encoders on CPU when DynamicVRAM is not active
python main.py --lowvramAggressively offload models to regular RAM
python main.py --disable-smart-memoryReduce cached node results at the cost of re-execution
python main.py --cache-noneUse CPU only as a last resort
python main.py --cpu--novram is available when low VRAM mode is not enough, and --cpu-vae moves the VAE to CPU. Neither guarantees that an oversized workflow will fit.
Should you disable the MPS memory limit?
Not as a routine fix. PyTorch documents PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 as a way to disable the allocator upper limit, but its own error text warns that this may cause system failure.
The limit does not create memory. An allocation can also fail because physical memory is exhausted or a contiguous block cannot be found.
Why can ComfyUI produce black images without an OOM?
ComfyUI's own --fp16-vae help warns that it might cause black images; --fp32-vae runs the VAE in full precision. An invalid-value warning during image conversion points to a different failure from an allocation exception.
Current ComfyUI automatically upcasts FP16 attention to FP32 on macOS 14.5 and later. Therefore --force-upcast-attention is not a new universal remedy on those systems.
Issue reports are version-specific evidence, not general rules. A closed M4 Pro report on macOS 15.3.1 involved black images with several scheduler combinations and received a maintainer fix. An older M1 report on macOS 13.6.3 said the upcast flag helped. Neither proves that Karras is broken on every Mac.
What should you record before reporting a failure?
- Mac model, chip, unified memory and macOS version.
- ComfyUI, frontend and PyTorch versions.
- Exact model files, workflow, resolution, batch size and custom nodes.
- The first relevant exception or invalid-value warning, plus the command-line flags already used.
- Whether a clean install or disabled custom nodes changes the result.
A report with custom nodes still enabled does not isolate a core ComfyUI defect.
Frequently asked questions
How do I fix ComfyUI MPS out of memory on Mac?
Lower resolution or batch size, close other applications, then try the official memory controls individually. Use CPU only as a last resort and do not disable the MPS allocator limit as a routine fix.
Does --lowvram reduce all ComfyUI memory use?
No. Its current help says it runs text encoders on CPU when DynamicVRAM is not active. Other components, activations and caches can still consume memory.
Are black images always caused by low memory?
No. Black images can occur without an allocation error. ComfyUI documents FP16 VAE and attention-upcasting paths related to black-image failures.
Is Karras broken on every Mac?
No. Some version-specific issue reports mention Karras or other schedulers, but they do not establish a general Mac compatibility rule.
Should I downgrade PyTorch to fix ComfyUI?
Not as a general recommendation. Follow the current ComfyUI requirements and investigate the exact failure. Old version-specific issue advice does not establish a current universal fix.
Sources
Official documentation and source code unless the label identifies an individual issue report.
- ComfyUI official troubleshooting guide
- ComfyUI command-line memory and VAE options
- ComfyUI MPS memory and attention-upcasting source
- PyTorch MPS allocator source
- Issue #6911, individual M4 Pro black-image report
- Issue #4799, individual M1 black-image report
- Issue #7171, individual M4 MPS out-of-memory report