working L4 GPU with 8 core CPU 32G memory
This commit is contained in:
parent
5a5c2038bb
commit
75bffc1310
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue