feat: 适配 RTX 3090 (24GB) 环境优化
硬件迁移:从 RTX 5090 (32GB) 迁移到 RTX 3090 (24GB) 主要改动: - 所有启动脚本和配置文件中的 /home/xsl/ 路径替换为 /home/ubuntu/ - 适配新的 24GB VRAM 环境
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"""测试 /api/hairGrow/v1 接口"""
|
||||
import base64, requests, sys
|
||||
|
||||
img_path = "/home/xsl/change_hair/project/data/userImage/8488902485_20250630055547.jpg"
|
||||
mask_path = "/home/xsl/change_hair/project/logs/hairgrow_test_mask.png"
|
||||
img_path = "/home/ubuntu/change_hair/project/data/userImage/8488902485_20250630055547.jpg"
|
||||
mask_path = "/home/ubuntu/change_hair/project/logs/hairgrow_test_mask.png"
|
||||
|
||||
with open(img_path, "rb") as f:
|
||||
img_b64 = "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()
|
||||
@@ -26,7 +26,7 @@ try:
|
||||
print(f"HTTP {r.status_code} | msg={d.get('msg')} | state={d.get('state')} | 耗时={time.time()-t0:.1f}s")
|
||||
result = d.get("result", "")
|
||||
if d.get("state") == 0 and result:
|
||||
out = "/home/xsl/change_hair/project/logs/test_hairgrow_api_result.jpg"
|
||||
out = "/home/ubuntu/change_hair/project/logs/test_hairgrow_api_result.jpg"
|
||||
with open(out, "wb") as f:
|
||||
f.write(base64.b64decode(result))
|
||||
print(f"✅ 生发成功! 结果图: {out}")
|
||||
|
||||
Reference in New Issue
Block a user