修改部署脚本

This commit is contained in:
yp 2025-09-12 07:30:42 +08:00
parent 7396e08a3e
commit 029d41a327
2 changed files with 10 additions and 4 deletions

View File

@ -37,7 +37,7 @@ image = (
.run_commands("rm -rf /root/comfy/ComfyUI/input&&ln -s /models/input /root/comfy/ComfyUI/input")
.run_commands("rm -rf /root/comfy/ComfyUI/output&&ln -s /models/output /root/comfy/ComfyUI/output")
)
app = modal.App(image=image, name='cf-video-api')
app = modal.App(image=image, name='comfyui-video-agent')
custom_secret = modal.Secret.from_name("comfyui-custom-secret", environment_name="dev")
vol = modal.Volume.from_name("comfy_model", environment_name="dev", create_if_missing=True)
@ -55,9 +55,9 @@ vol = modal.Volume.from_name("comfy_model", environment_name="dev", create_if_mi
@modal.concurrent(
max_inputs=10
)
@modal.web_server(8000, startup_timeout=120, label='image-video-agent-1')
@modal.web_server(8000, startup_timeout=600, label='image-video-agent-1')
def ui_1():
process = subprocess.Popen("comfy launch -- --cpu --listen 0.0.0.0 --port 8001", shell=True)
process = subprocess.Popen("comfy launch -- --cpu --listen 0.0.0.0 --port 8000", shell=True)
@app.function(
@ -73,6 +73,6 @@ def ui_1():
@modal.concurrent(
max_inputs=10
)
@modal.web_server(8000, startup_timeout=120, label='image-video-agent-2')
@modal.web_server(8000, startup_timeout=600, label='image-video-agent-2')
def ui_2():
subprocess.Popen("comfy launch -- --cpu --listen 0.0.0.0 --port 8000", shell=True)

6
utils/__init__.py Normal file
View File

@ -0,0 +1,6 @@
# -*- coding:utf-8 -*-
"""
File __init__.py
Author silence
Date 2025/9/8 10:08
"""