Fit FLUX hot swap within 16 GiB VRAM
This commit is contained in:
@@ -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"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user