Home / Crash & Error Fixes / comfyui-flux-1-dev-allocation-on-device-oom

Fix: ComfyUI Flux.1-dev: Allocation on device 0 out of memory

Immediate copy-paste workaround + permanent hardware bottleneck fix.

// STEP 1: IMMEDIATE CLI / CONFIG WORKAROUND
python main.py --lowvram --fp8_e4m3fn-unet
[ APPLE SILICON UNIFIED MEMORY & 40GBPS NVME FIX ]

Eliminate macOS Swap Throttling & Metal Wired-Limit Crashes

Raising Metal wired allocation via `python main.py --lowvram --fp8_e4m3fn-unet` unlocks unified RAM, but storing 40GB-130GB GGUF weights on internal Mac SSDs fills storage fast. Stream models at 3,700+ MB/s over a 40Gbps USB4 ASM2464PD enclosure + DRAM-buffered Gen4 NVMe.

Root-Cause Engineering Analysis: ComfyUI Flux.1-dev: Allocation on device 0 out of memory

On Apple Silicon, macOS caps default GPU-wired unified memory at ~66-75% of physical RAM to protect WindowServer. Overriding `iogpu.wired_limit_mb` lets Ollama and llama.cpp pin larger quantized layers directly in unified memory without immediate Metal OOM aborts, provided your scratch drive sustains high random read IOPS.

// STEP 2: VERIFY TELEMETRY & HARDWARE STATE
sysctl iogpu.wired_limit_mb && vm_stat | head -n 10

Want to model exact VRAM, PCIe lane speeds, and power spikes before ordering? Open this configuration in the SheerAI Interactive Architect ->

Why This Happens & How to Verify

Related Diagnostic & Hardware Guides

As an Amazon Associate I earn from qualifying purchases.