diff --git a/comfyui_v2.py b/comfyui_v2.py index 7ffb69e..d9dfe0d 100644 --- a/comfyui_v2.py +++ b/comfyui_v2.py @@ -15,8 +15,9 @@ image = ( "comfy --skip-prompt install --fast-deps --nvidia --version 0.3.40" ) .pip_install_from_pyproject("./pyproject_comfyui.toml") - .run_commands("comfy node install https://gitea.bowongai.com/bowong/ComfyUI-CustomNode.git") + .run_commands("comfy node install https://e.coding.net/g-ldyi2063/dev/ComfyUI-CustomNode.git") .run_commands("comfy node install https://github.com/yolain/ComfyUI-Easy-Use.git") + .run_commands("cp -f /root/comfy/ComfyUI/custom_nodes/ComfyUI-CustomNode/ext/nodes_bfl.py /root/comfy/ComfyUI/comfy_api_nodes/nodes_bfl.py") ) app = modal.App(image=image) custom_secret = modal.Secret.from_name("comfyui-custom-secret", environment_name="dev") @@ -30,5 +31,38 @@ custom_secret = modal.Secret.from_name("comfyui-custom-secret", environment_name max_inputs=10 ) @modal.web_server(8000, startup_timeout=60) -def ui(): +def ui_1(): + subprocess.Popen("comfy launch -- --cpu --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( + max_containers=1, + secrets=[custom_secret] +) +@modal.concurrent( + max_inputs=10 +) +@modal.web_server(8000, startup_timeout=60) +def ui_3(): + subprocess.Popen("comfy launch -- --cpu --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_4(): subprocess.Popen("comfy launch -- --cpu --listen 0.0.0.0 --port 8000", shell=True)