From a6d8b9f1a786b1304847f758331eb3accc2e7904 Mon Sep 17 00:00:00 2001 From: "shuohigh@gmail.com" Date: Thu, 29 May 2025 15:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E9=BD=90=E9=A2=84=E5=8F=91=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BowongModalFunctions/api.py | 3 +-- src/BowongModalFunctions/router/google.py | 2 +- src/cluster/app.py | 7 ++----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/BowongModalFunctions/api.py b/src/BowongModalFunctions/api.py index 6215233..f9d0ad1 100644 --- a/src/BowongModalFunctions/api.py +++ b/src/BowongModalFunctions/api.py @@ -78,8 +78,7 @@ async def scalar(): web_app.include_router(ffmpeg.router) web_app.include_router(cache.router) -# todo: prod 展示去掉Comfy相关API接口 -# web_app.include_router(comfyui.router) +web_app.include_router(comfyui.router) web_app.include_router(google.router) web_app.include_router(task.router) diff --git a/src/BowongModalFunctions/router/google.py b/src/BowongModalFunctions/router/google.py index 95679ec..015d836 100644 --- a/src/BowongModalFunctions/router/google.py +++ b/src/BowongModalFunctions/router/google.py @@ -33,7 +33,7 @@ async def upload_file_multipart(file: UploadFile, 'video/webm', 'video/wmv', 'video/3gpp']: raise HTTPException(status_code=status.HTTP_415_UNSUPPORTED_MEDIA_TYPE) logger.info(f"Uploading name = {file.filename}, size = {content_length}, type = {content_type} to google file") - with httpx.Client() as client: + with httpx.Client(timeout=1800) as client: pre_upload_response = client.post( url=f"https://generativelanguage.googleapis.com/upload/v1beta/files?key={google_api_key}", headers={ diff --git a/src/cluster/app.py b/src/cluster/app.py index db1d915..344e116 100644 --- a/src/cluster/app.py +++ b/src/cluster/app.py @@ -16,8 +16,5 @@ app = modal.App(config.modal_app_name, app.include(media_app) app.include(ffmpeg_app) app.include(web_app) - -# todo: prod 暂时去掉Comfy相关接口 - -# app.include(comfyui_v1_app) -# app.include(comfyui_v2_app) +app.include(comfyui_v1_app) +app.include(comfyui_v2_app)