comfyui(irv-ml1): add PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True

Native-allocator expandable segments to cut Qwen-Image-Edit fragmentation
OOMs on the A6000 (a ~2 GB alloc failing with 1.75 GB free while 45 GB sat
allocated + reserved-but-unallocated). Cache-preserving — packs better
without unloading the checkpoint, so no edit-latency hit. Paired with the
existing --disable-cuda-malloc (incompatible with cudaMallocAsync).

Deployed + recreated on irv-ml1; verified env present, PyTorch reads it,
container healthy. comfy-dev request 2026-06-25.
This commit is contained in:
2026-06-25 07:30:12 -07:00
parent 30c883be5d
commit 3239b0a613
+8
View File
@@ -57,6 +57,14 @@ services:
# sm_86 build (rebuilt against the pinned torch 2.12.1). Global speedup
# across Flux/SDXL/Wan (comfy-dev benchmarking, 2026-06-18).
- COMFY_CMDLINE_EXTRA=--disable-cuda-malloc --fp8_e4m3fn-text-enc --use-sage-attention
# Let PyTorch's native caching allocator grow segments instead of
# pre-carving fixed blocks — cuts fragmentation OOMs on long-lived
# Qwen-Image-Edit sessions (a ~2 GB alloc failing with 1.75 GB free while
# 45 GB sat allocated + reserved-but-unallocated). Cache-preserving: packs
# better WITHOUT unloading the checkpoint, so no edit-latency hit. Only
# valid under the native allocator (paired with --disable-cuda-malloc
# above; incompatible with cudaMallocAsync). comfy-dev request 2026-06-25.
- PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
volumes:
- ${COMFYUI_BASEDIR}:/basedir
# models/ overlaid from storetank. The ~325 GB model tree was migrated