diff --git a/cmd/modal deploy.run.xml b/cmd/modal deploy.run.xml
index 3f70d48..dc905b8 100644
--- a/cmd/modal deploy.run.xml
+++ b/cmd/modal deploy.run.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/src/BowongModalFunctions/api.py b/src/BowongModalFunctions/api.py
index a2bf2a6..fb3a9fc 100644
--- a/src/BowongModalFunctions/api.py
+++ b/src/BowongModalFunctions/api.py
@@ -678,7 +678,7 @@ async def comfyui_v1(item: ComfyTaskRequest, headers: Annotated[SentryTransactio
sentry_trace = SentryTransactionInfo(x_trace_id=headers.x_trace_id, x_baggage=headers.x_baggage)
cls = modal.Cls.from_name(config.modal_app_name, "ComfyUI", environment_name=config.modal_environment)
fn_call = cls().api.spawn(item.video_path.path, item.start_time, item.filename_prefix, item.tts_text1,
- item.tts_text2, item.tts_text3, item.tts_text4, item.anchor_id, item.speed, sentry_trace)
+ item.tts_text2, item.tts_text3, item.tts_text4, item.anchor_id, item.speed, sentry_trace, item.webhook)
return ModalTaskResponse(success=True, taskId=fn_call.object_id)
@@ -725,7 +725,7 @@ async def comfyui_v2(item: ComfyTaskRequest, headers: Annotated[SentryTransactio
sentry_trace = SentryTransactionInfo(x_trace_id=headers.x_trace_id, x_baggage=headers.x_baggage)
cls = modal.Cls.from_name(config.modal_app_name, "ComfyUILatentSync15", environment_name=config.modal_environment)
fn_call = cls().api.spawn(item.video_path.path, item.start_time, item.filename_prefix, item.tts_text1,
- item.tts_text2, item.tts_text3, item.tts_text4, item.anchor_id, item.speed, sentry_trace)
+ item.tts_text2, item.tts_text3, item.tts_text4, item.anchor_id, item.speed, sentry_trace, item.webhook)
return ModalTaskResponse(success=True, taskId=fn_call.object_id)
diff --git a/src/BowongModalFunctions/models/web_model.py b/src/BowongModalFunctions/models/web_model.py
index 6603cf1..2d27301 100644
--- a/src/BowongModalFunctions/models/web_model.py
+++ b/src/BowongModalFunctions/models/web_model.py
@@ -316,7 +316,7 @@ class ComfyTaskStatusResponse(BaseModel):
code: Optional[int] = Field(description="任务错误原因代码", default=None)
result: Optional[str] = Field(description="任务运行结果", default=None)
-class ComfyTaskRequest(BaseModel):
+class ComfyTaskRequest(BaseFFMPEGTaskRequest):
video_path: MediaSource = Field(default=MediaSource.from_str("s3://modal-media-cache/comfyui-input/markers/1016.mp4"), description="视频源")
start_time: str = Field(default="00:00:01.600", description="开始时间")
filename_prefix:str = Field(default=str(uuid.uuid4()), description="生成文件名前缀")
diff --git a/src/cluster/comfyui_v1.py b/src/cluster/comfyui_v1.py
index b3dfb18..fa346fd 100644
--- a/src/cluster/comfyui_v1.py
+++ b/src/cluster/comfyui_v1.py
@@ -6,15 +6,15 @@ comfyui_image = (
modal.Image.debian_slim(
python_version="3.10"
)
- .pip_install_from_pyproject("pyproject_comfyui.toml")
+ .pip_install_from_pyproject("../pyproject_comfyui.toml")
.apt_install("wget", "software-properties-common")
.run_commands("add-apt-repository -y contrib "
"&& wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb&&dpkg -i cuda-keyring_1.1-1_all.deb")
.apt_install("git", "gcc", "libportaudio2", "cuda-toolkit", "ffmpeg")
- .add_local_file("whl/comfy_cli-0.0.0-py3-none-any.whl", "/root/comfy_cli-0.0.0-py3-none-any.whl",copy=True)
+ .add_local_file("../whl/comfy_cli-0.0.0-py3-none-any.whl", "/root/comfy_cli-0.0.0-py3-none-any.whl",copy=True)
.pip_install("/root/comfy_cli-0.0.0-py3-none-any.whl")
.run_commands("comfy --skip-prompt install --nvidia --version 0.3.10")
- .env(dotenv_values(".runtime.env"))
+ .env(dotenv_values("../.runtime.env"))
.workdir("/root/comfy")
)
@@ -50,9 +50,9 @@ comfyui_image = (
).run_commands(
"rm -rf /root/comfy/ComfyUI/models"
)
- .add_local_file("config/config.yaml", "/root/comfy/ComfyUI/custom_nodes/ComfyUI-CustomNode/config.yaml",copy=True)
- .add_local_file("config/config.py","/root/comfy/ComfyUI/custom_nodes/cosyvoice_comfyui/pretrained_models/tools/config.py",copy=True)
- .add_local_file("src/BowongModalFunctions/template/template_v1.json", "/root/src/BowongModalFunctions/template/template_v1.json", copy=True)
+ .add_local_file("../config/config.yaml", "/root/comfy/ComfyUI/custom_nodes/ComfyUI-CustomNode/config.yaml",copy=True)
+ .add_local_file("../config/config.py","/root/comfy/ComfyUI/custom_nodes/cosyvoice_comfyui/pretrained_models/tools/config.py",copy=True)
+ .add_local_file("BowongModalFunctions/template/template_v1.json", "/root/src/BowongModalFunctions/template/template_v1.json", copy=True)
.add_local_python_source('BowongModalFunctions')
.add_local_python_source('cluster')
)
diff --git a/src/cluster/comfyui_v2.py b/src/cluster/comfyui_v2.py
index 03ffd57..632b775 100644
--- a/src/cluster/comfyui_v2.py
+++ b/src/cluster/comfyui_v2.py
@@ -6,15 +6,15 @@ comfyui_latentsync_1_5_image = (
modal.Image.debian_slim(
python_version="3.10"
)
- .pip_install_from_pyproject("pyproject_comfyui.toml")
+ .pip_install_from_pyproject("../pyproject_comfyui.toml")
.apt_install("wget", "software-properties-common")
.run_commands("add-apt-repository -y contrib "
"&& wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb&&dpkg -i cuda-keyring_1.1-1_all.deb")
.apt_install("git", "gcc", "libportaudio2", "cuda-toolkit", "ffmpeg")
- .add_local_file("whl/comfy_cli-0.0.0-py3-none-any.whl", "/root/comfy_cli-0.0.0-py3-none-any.whl", copy=True)
+ .add_local_file("../whl/comfy_cli-0.0.0-py3-none-any.whl", "/root/comfy_cli-0.0.0-py3-none-any.whl", copy=True)
.pip_install("/root/comfy_cli-0.0.0-py3-none-any.whl")
.run_commands("comfy --skip-prompt install --nvidia --version 0.3.10")
- .env(dotenv_values(".runtime.env"))
+ .env(dotenv_values("../.runtime.env"))
.workdir("/root/comfy")
)
@@ -50,9 +50,9 @@ comfyui_latentsync_1_5_image = (
).run_commands(
"rm -rf /root/comfy/ComfyUI/models"
)
- .add_local_file("config/config.yaml", "/root/comfy/ComfyUI/custom_nodes/ComfyUI-CustomNode/config.yaml", copy=True)
- .add_local_file("config/config.py", "/root/comfy/ComfyUI/custom_nodes/cosyvoice_comfyui/pretrained_models/tools/config.py", copy=True)
- .add_local_file("src/BowongModalFunctions/template/template_v2.json", "/root/src/BowongModalFunctions/template/template_v2.json", copy=True)
+ .add_local_file("../config/config.yaml", "/root/comfy/ComfyUI/custom_nodes/ComfyUI-CustomNode/config.yaml", copy=True)
+ .add_local_file("../config/config.py", "/root/comfy/ComfyUI/custom_nodes/cosyvoice_comfyui/pretrained_models/tools/config.py", copy=True)
+ .add_local_file("BowongModalFunctions/template/template_v2.json", "/root/src/BowongModalFunctions/template/template_v2.json", copy=True)
.add_local_python_source('cluster')
.add_local_python_source('BowongModalFunctions')
)
diff --git a/src/cluster/ffmpeg_app.py b/src/cluster/ffmpeg_app.py
index b343439..c9dfa9b 100644
--- a/src/cluster/ffmpeg_app.py
+++ b/src/cluster/ffmpeg_app.py
@@ -4,8 +4,8 @@ from dotenv import dotenv_values
ffmpeg_worker_image = (
modal.Image.debian_slim(python_version="3.11")
.apt_install('ffmpeg')
- .pip_install_from_pyproject("pyproject.toml")
- .env(dotenv_values(".runtime.env"))
+ .pip_install_from_pyproject("../pyproject.toml")
+ .env(dotenv_values("../.runtime.env"))
.add_local_python_source('cluster')
.add_local_python_source('BowongModalFunctions')
)
diff --git a/src/cluster/video.py b/src/cluster/video.py
index 9206c88..9f4bc6a 100644
--- a/src/cluster/video.py
+++ b/src/cluster/video.py
@@ -4,8 +4,8 @@ from dotenv import dotenv_values
downloader_image = (
modal.Image
.debian_slim(python_version="3.11")
- .pip_install_from_pyproject("pyproject.toml")
- .env(dotenv_values(".runtime.env"))
+ .pip_install_from_pyproject("../pyproject.toml")
+ .env(dotenv_values("../.runtime.env"))
.add_local_python_source('cluster')
.add_local_python_source('BowongModalFunctions')
)
diff --git a/src/cluster/web.py b/src/cluster/web.py
index 7d55b6a..fd36bbd 100644
--- a/src/cluster/web.py
+++ b/src/cluster/web.py
@@ -4,8 +4,8 @@ from dotenv import dotenv_values
fastapi_image = (
modal.Image
.debian_slim(python_version="3.11")
- .pip_install_from_pyproject("pyproject.toml")
- .env(dotenv_values(".runtime.env"))
+ .pip_install_from_pyproject("../pyproject.toml")
+ .env(dotenv_values("../.runtime.env"))
.add_local_python_source('cluster')
.add_local_python_source('BowongModalFunctions')
)