FIX 修复缓存校验路径问题
This commit is contained in:
parent
eba8549aa8
commit
a05f7b936f
|
|
@ -1,5 +1,6 @@
|
||||||
.pypirc
|
.pypirc
|
||||||
.env
|
.env
|
||||||
.idea
|
|
||||||
test*
|
|
||||||
.runtime.env
|
.runtime.env
|
||||||
|
.idea
|
||||||
|
.venv
|
||||||
|
test*
|
||||||
|
|
@ -46,7 +46,7 @@ async def comfyui_v1(item: ComfyTaskRequest, headers: Annotated[SentryTransactio
|
||||||
if headers.x_trace_id and headers.x_baggage:
|
if headers.x_trace_id and headers.x_baggage:
|
||||||
sentry_trace = SentryTransactionInfo(x_trace_id=headers.x_trace_id, x_baggage=headers.x_baggage)
|
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)
|
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,
|
fn_call = cls().api.spawn(item.video_path.path.replace(config.comfyui_s3_input+"/",""), 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)
|
item.webhook)
|
||||||
return ModalTaskResponse(success=True, taskId=fn_call.object_id)
|
return ModalTaskResponse(success=True, taskId=fn_call.object_id)
|
||||||
|
|
@ -93,7 +93,7 @@ async def comfyui_v2(item: ComfyTaskRequest, headers: Annotated[SentryTransactio
|
||||||
if headers.x_trace_id and headers.x_baggage:
|
if headers.x_trace_id and headers.x_baggage:
|
||||||
sentry_trace = SentryTransactionInfo(x_trace_id=headers.x_trace_id, x_baggage=headers.x_baggage)
|
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)
|
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,
|
fn_call = cls().api.spawn(item.video_path.path.replace(config.comfyui_s3_input+"/",""), 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)
|
item.webhook)
|
||||||
return ModalTaskResponse(success=True, taskId=fn_call.object_id)
|
return ModalTaskResponse(success=True, taskId=fn_call.object_id)
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,22 @@ app = modal.App(
|
||||||
|
|
||||||
with fastapi_image.imports():
|
with fastapi_image.imports():
|
||||||
from BowongModalFunctions.api import web_app
|
from BowongModalFunctions.api import web_app
|
||||||
|
from BowongModalFunctions.config import WorkerConfig
|
||||||
|
|
||||||
|
config = WorkerConfig()
|
||||||
|
|
||||||
@app.function(scaledown_window=60,
|
@app.function(scaledown_window=60,
|
||||||
secrets=[
|
secrets=[
|
||||||
modal.Secret.from_name("cf-kv-secret", environment_name='dev'),
|
modal.Secret.from_name("cf-kv-secret", environment_name='dev'),
|
||||||
])
|
],
|
||||||
|
volumes={
|
||||||
|
config.S3_mount_dir: modal.CloudBucketMount(
|
||||||
|
bucket_name=config.S3_bucket_name,
|
||||||
|
secret=modal.Secret.from_name("aws-s3-secret",
|
||||||
|
environment_name=config.modal_environment),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
)
|
||||||
@modal.concurrent(max_inputs=100)
|
@modal.concurrent(max_inputs=100)
|
||||||
@modal.asgi_app()
|
@modal.asgi_app()
|
||||||
def fastapi_webapp():
|
def fastapi_webapp():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue