GPU & Model Presets
ComfyUI Headless /prompt API Worker Queue Preset (Production)
Run headless ComfyUI workers behind a Redis / webhook job dispatcher with strict VRAM pinning, NVMe output cleanup, and zero UI overhead.
Zero WebSocket UI Idle · 99.4% Queue Uptime · 1 Worker/GPU
One Process Per GPU Is Non-Negotiable
PyTorch CUDA contexts cannot safely share 24 GB VRAM across concurrent ComfyUI processes under burst load. Dispatch jobs sequentially through ComfyUI /prompt or one worker per GPU.
Headless Prompt Enrichment Offload
Running prompt expansion via Xiaomi MiMo API in your pre-queue worker guarantees the GPU spends 100% of its memory and compute budget on diffusion sampling.
Measured Thresholds & ComfyUI Configuration Matrix
| Parameter / Setting | Recommended Value | Operational Reason |
|---|---|---|
| Concurrency Rule | 1 ComfyUI Process per CUDA GPU | Prevents two Python processes colliding on 24 GB VRAM |
| Queue Caching | --cache-lru 2 --disable-metadata | Speeds API throughput while cutting PNG write overhead |
| Prompt Preprocessing | Xiaomi MiMo API pre-hook | Expands user tags to structured Flux prompts off-GPU |
| Crash Guard | systemd Restart=always + CUDA Alloc | Recovers cleanly from malformed custom node payloads |