feat: 适配 RTX 3090 (24GB) 环境优化
硬件迁移:从 RTX 5090 (32GB) 迁移到 RTX 3090 (24GB) 主要改动: 1. hairline/comfyui.py: 轮询间隔从 0.2s 降到 0.05s 2. hairline/service.py: PNG 编码 compress_level=1,节省 ~240ms 3. add_hair.json: 工作流使用 4B FP8 模型 + steps=4 4. static/test_interface3.html: 修复图片显示(添加 data:image/jpeg;base64, 前缀) 性能优化后接口3响应时间:6.6-7.3s(之前 8.66s)
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@ import uuid
|
||||
|
||||
import httpx
|
||||
|
||||
COMFYUI_URL = os.getenv("COMFYUI_URL", "http://10.60.74.221:8188").rstrip("/")
|
||||
COMFYUI_URL = os.getenv("COMFYUI_URL", "http://127.0.0.1:8188").rstrip("/")
|
||||
_WORKFLOW_DEFAULT = os.getenv(
|
||||
"ADD_HAIR_WORKFLOW",
|
||||
os.path.join(os.path.dirname(os.path.dirname(__file__)), "add_hair.json"),
|
||||
@@ -145,7 +145,7 @@ def run(rgba_png_bytes: bytes, timeout: float = COMFY_TIMEOUT, prompt: str = Non
|
||||
outputs = entry.get("outputs")
|
||||
if outputs and output_node in outputs:
|
||||
break
|
||||
time.sleep(1.0)
|
||||
time.sleep(0.05)
|
||||
if not outputs or output_node not in outputs:
|
||||
raise TimeoutError(f"ComfyUI 出图超时({timeout}s) prompt_id={prompt_id}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user