update to v6 modal pipeline
This commit is contained in:
parent
05ff0a42d5
commit
5a5c2038bb
|
|
@ -83,8 +83,9 @@ output_dir = "/root/comfy/ComfyUI/output"
|
||||||
concurrency_limit=50,
|
concurrency_limit=50,
|
||||||
container_idle_timeout=120,
|
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
|
# 5 minute container keep alive after it processes an input; increasing this value is a great way to reduce ComfyUI cold start times
|
||||||
timeout=800,
|
timeout=600,
|
||||||
gpu="T4",
|
gpu="L4",
|
||||||
|
memory=(32768, 32768),
|
||||||
secrets=[secret],
|
secrets=[secret],
|
||||||
volumes={
|
volumes={
|
||||||
"/root/comfy/ComfyUI/models": vol,
|
"/root/comfy/ComfyUI/models": vol,
|
||||||
|
|
@ -125,7 +126,7 @@ class ComfyUI:
|
||||||
node["inputs"]["default_value"] = node["inputs"]["default_value"].replace("input_s3", "input")
|
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:
|
with open(f"/root/{session_id}.json", "w", encoding="utf-8") as f:
|
||||||
f.write(json.dumps(workflow, ensure_ascii=False))
|
f.write(json.dumps(workflow, ensure_ascii=False))
|
||||||
cmd = f"comfy run --workflow /root/{session_id}.json --wait --timeout 1200"
|
cmd = f"comfy run --workflow /root/{session_id}.json --wait --timeout 600 --verbose"
|
||||||
# TODO 接收返回值
|
# TODO 接收返回值
|
||||||
subprocess.run(cmd, shell=True, check=True)
|
subprocess.run(cmd, shell=True, check=True)
|
||||||
|
|
||||||
|
|
@ -157,9 +158,7 @@ class ComfyUI:
|
||||||
|
|
||||||
# run inference on the currently running container
|
# run inference on the currently running container
|
||||||
fname = self.infer.local(new_workflow_file)
|
fname = self.infer.local(new_workflow_file)
|
||||||
j = {
|
j = {"file_name": fname}
|
||||||
"file_name": fname
|
|
||||||
}
|
|
||||||
print("json", j)
|
print("json", j)
|
||||||
|
|
||||||
return Response(content=json.dumps(j), media_type="application/json")
|
return Response(content=json.dumps(j), media_type="application/json")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue