Fit FLUX hot swap within 16 GiB VRAM

This commit is contained in:
Mikei386
2026-08-22 18:10:07 +02:00
parent 364ac6b83e
commit b00e882063
3 changed files with 25 additions and 4 deletions
@@ -106,7 +106,9 @@ def set_image_worker(running: bool) -> dict:
if status not in (204, 304):
raise RuntimeError(f"failed to start image worker: HTTP {status}")
else:
stop_container(item)
# CUDA/PyTorch may not react promptly to SIGTERM after an OOM.
# Bound recovery time and let Docker issue SIGKILL afterwards.
stop_container(item, timeout=20)
return {"image_worker": "running" if running else "stopped"}