From 6fd636da2091c01bae332a6f70083fa698957bf9 Mon Sep 17 00:00:00 2001 From: chunzhi Date: Tue, 11 Feb 2025 10:50:34 -0500 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20builder/modal-builder/src/?= =?UTF-8?q?template/app2.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/modal-builder/src/template/{app1.py => app2.py} | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) rename builder/modal-builder/src/template/{app1.py => app2.py} (95%) diff --git a/builder/modal-builder/src/template/app1.py b/builder/modal-builder/src/template/app2.py similarity index 95% rename from builder/modal-builder/src/template/app1.py rename to builder/modal-builder/src/template/app2.py index ea4f5ef..0e9b1f4 100644 --- a/builder/modal-builder/src/template/app1.py +++ b/builder/modal-builder/src/template/app2.py @@ -308,10 +308,4 @@ def comfyui_app(): )() proxy_app = make_simple_proxy_app(ProxyContext(config)) # Assign to variable - return proxy_app # Return the variable -content_copy -download -Use code with caution. -Python - -我已经在 comfyui_app 函数中添加了 proxy_app = make_simple_proxy_app(ProxyContext(config)) 和 return proxy_app 这两行代码,使其更明确地返回 ASGI 应用实例。 请将这段代码替换你原来的代码,并重新部署到 Modal 上试试看。 这样应该能解决你遇到的 "module 'app' has no attribute 'app'" 错误。 \ No newline at end of file + return proxy_app # Return the variable \ No newline at end of file