diff --git a/server_with_s3.py b/server_with_s3.py index 5a65a92..a23bd04 100644 --- a/server_with_s3.py +++ b/server_with_s3.py @@ -83,9 +83,11 @@ output_dir = "/root/comfy/ComfyUI/output" concurrency_limit=50, container_idle_timeout=120, # 5 minute container keep alive after it processes an input; increasing this value is a great way to reduce ComfyUI cold start times - timeout=600, + timeout=900, gpu="L4", - memory=(32768, 32768), + cpu=8, + # memory=(32768, 32768), # (内存预留量, 内存使用上限) + memory=32768, secrets=[secret], volumes={ "/root/comfy/ComfyUI/models": vol, @@ -126,8 +128,7 @@ class ComfyUI: node["inputs"]["default_value"] = node["inputs"]["default_value"].replace("input_s3", "input") with open(f"/root/{session_id}.json", "w", encoding="utf-8") as f: f.write(json.dumps(workflow, ensure_ascii=False)) - cmd = f"comfy run --workflow /root/{session_id}.json --wait --timeout 600 --verbose" - # TODO 接收返回值 + cmd = f"comfy run --workflow /root/{session_id}.json --wait --timeout 900 --verbose" subprocess.run(cmd, shell=True, check=True) # looks up the name of the output image file based on the workflow