This commit is contained in:
kyj@bowong.ai 2025-07-25 15:11:29 +08:00
parent 6ba51fe59f
commit aa18570341
2 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,6 @@ image = (
"comfy --skip-prompt install --fast-deps --nvidia --version 0.3.40"
)
.pip_install_from_pyproject(os.path.join(os.path.dirname(__file__), "pyproject.toml"))
.run_commands("comfy node install https://gitea.bowongai.com/Polaris/ComfyUI-CustomNode.git")
.run_commands("comfy node install https://github.com/yolain/ComfyUI-Easy-Use.git")
.run_commands("comfy node install https://github.com/kijai/ComfyUI-WanVideoWrapper.git")
.run_commands("comfy node install https://github.com/christian-byrne/audio-separation-nodes-comfyui.git")
@ -27,10 +26,11 @@ image = (
.run_commands("comfy node install https://github.com/cubiq/ComfyUI_essentials.git")
.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")
.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")
.run_commands("rm -rf /root/comfy/ComfyUI/outputs&&ln -s /models/output /root/comfy/ComfyUI/output")
.run_commands("rm -rf /root/comfy/ComfyUI/output&&ln -s /models/output /root/comfy/ComfyUI/output")
)
app = modal.App(image=image)
custom_secret = modal.Secret.from_name("comfyui-custom-secret", environment_name="dev")

View File

@ -235,7 +235,7 @@ class ModalMidJourneyGenerateImage:
f'image/{format.lower()}')}
else:
files = None
job_resp = send_request("post", f"https://{endpoint}/api/mj/async/generate/image?prompt={prompt}",
job_resp = send_request("post", f"https://{endpoint}/api/302/mj/async/generate/image?prompt={prompt}",
headers={'Authorization': 'Bearer bowong7777'},
files=files,
timeout=150)
@ -246,7 +246,7 @@ class ModalMidJourneyGenerateImage:
job_id = job_resp["data"]
for _ in range(0, timeout // interval, interval):
logger.info("查询结果")
resp = send_request("get", f"https://{endpoint}/api/mj/async/query/status?task_id={job_id}",
resp = send_request("get", f"https://{endpoint}/api/302/mj/async/query/status?task_id={job_id}",
headers={'Authorization': 'Bearer bowong7777'}, timeout=30)
resp.raise_for_status()
if resp.json()["status"]:
@ -274,7 +274,7 @@ class ModalMidJourneyDescribeImage:
return {
"required": {
"image": ("IMAGE",),
"endpoint": ("STRING", {"default": "bowongai-dev--bowong-ai-video-gemini-fastapi-webapp.modal.run"}),
"endpoint": ("STRING", {"default": "bowongai-dev--text-video-agent-fastapi-app.modal.run"}),
},
}
@ -288,7 +288,7 @@ class ModalMidJourneyDescribeImage:
try:
logger.info("请求同步接口")
format = "PNG"
job_resp = send_request("post", f"https://{endpoint}/mj_router/sync/describe/image/file",
job_resp = send_request("post", f"https://{endpoint}/api/302/mj/sync/file/img/describe",
headers={'Authorization': 'Bearer bowong7777'},
files={"img_file": (
'image.' + format.lower(), tensor_to_image_bytes(image, format),