This commit is contained in:
kyj@bowong.ai 2025-07-25 19:09:03 +08:00
parent 2f38db1af5
commit e3773e29d7
2 changed files with 22 additions and 11 deletions

View File

@ -27,6 +27,9 @@ image = (
.run_commands("comfy node install https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git")
.run_commands("comfy node install https://github.com/jamesWalker55/comfyui-various.git")
.run_commands("comfy node install https://gitea.bowongai.com/Polaris/ComfyUI-CustomNode.git")
.run_commands("comfy node install https://github.com/rgthree/rgthree-comfy.git")
.run_commands("comfy node install https://github.com/yuvraj108c/ComfyUI-Dwpose-Tensorrt")
.run_commands("comfy node install https://github.com/kijai/ComfyUI-DepthAnythingV2")
.pip_install("sageattention")
.run_commands("rm -rf /root/comfy/ComfyUI/models&&ln -s /models /root/comfy/ComfyUI/models")
.run_commands("rm -rf /root/comfy/ComfyUI/input&&ln -s /models/input /root/comfy/ComfyUI/input")
@ -58,16 +61,25 @@ vol = modal.Volume.from_name("comfy_model", environment_name="dev", create_if_mi
def ui_1():
subprocess.Popen("comfy launch -- --listen 0.0.0.0 --port 8000", shell=True)
# @app.function(
# max_containers=1,
# secrets=[custom_secret]
# )
# @modal.concurrent(
# max_inputs=10
# )
# @modal.web_server(8000, startup_timeout=60)
# def ui_2():
# subprocess.Popen("comfy launch -- --cpu --listen 0.0.0.0 --port 8000", shell=True)
@app.function(
cpu=(4, 64),
memory=(4096, 131072),
min_containers=0,
buffer_containers=0,
max_containers=1,
gpu="L40S:3",
scaledown_window=600,
secrets=[custom_secret],
volumes={
"/models": vol
}
)
@modal.concurrent(
max_inputs=20
)
@modal.web_server(8000, startup_timeout=60)
def ui_2():
subprocess.Popen("comfy launch -- --listen 0.0.0.0 --port 8000", shell=True)
#
# @app.function(
# max_containers=1,

View File

@ -1,6 +1,5 @@
import io
import json
import traceback
from time import sleep
import folder_paths