xsl
|
b58cd4c441
|
优化为4b 模型
|
2026-07-18 15:30:31 +08:00 |
|
 xslandCursor
|
659c037270
|
feat: ComfyUI 改走 10.60.74.221,测试页上传图超阈值自动降采样
将 worker 默认 ComfyUI 地址改为远端 10.60.74.221:8188;前端测试页在像素超过 1536000 时等比缩小到 786432 以内。
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-07-17 02:23:35 +08:00 |
|
xsl
|
4001df2c34
|
save code
|
2026-07-15 01:16:32 +08:00 |
|
 xslandClaude
|
cb1989c042
|
feat(接口2/7): 接口2加hair_style参数选单张发型;新增接口7用add_hair2工作流
接口2 变更:
- 新增必填 hair_style(int) 参数,按序号只生成一张(不再全量)
- female:1-5 male:1-4,越界返回1007
接口7 新增:
- POST /api/v1/hair/grow-v2,功能与接口2一致
- 使用 add_hair2.json 工作流(Flux-2 Klein 9b)
- SaveImage输出节点自动检测(75)
comfyui.py 重构:
- run() 支持 workflow_path 参数,多工作流按路径缓存
- SaveImage 输出节点自动检测,不再硬编码
- 输入/种子/提示词节点ID两个工作流相同(26/6/60)
文档:
- 接口文档、实现说明、网关待改动 三份同步更新
- 网关只需加一行路由,base64→URL改写无需改动
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-22 23:22:25 +08:00 |
|
xsl
|
be81567261
|
save code
|
2026-06-17 23:36:01 +08:00 |
|
 xslandClaude Opus 4.8
|
e3c67fc8cf
|
feat(comfyui): ComfyUI 改 8188 + HTTP Basic Auth
本机 ComfyUI 开了 Basic Auth(user admin),端口 8182→8188:
- hairline/comfyui.py: 默认 URL 8188;所有 httpx 请求带 auth=(user,password)
密码来源 环境变量 COMFYUI_PASSWORD → worker_config.json.comfyui_password → password.txt
- password.txt 入 .gitignore(含密码不入 git);worker_config.example 加 comfyui_password
- 实现说明文档同步(8188 + Basic Auth)
实测:ping + 实跑一张生发图均通过(带鉴权)。pytest 44 全绿。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-15 23:10:09 +08:00 |
|
 xslandClaude Opus 4.8
|
94ad95850e
|
feat(接口2): 新增生发后图片(ComfyUI/Flux inpaint)
在发际线预览基础上,每种发际线再出一张「植发3个月」生发图:
- hairline/mask.py: headmark 5步法遮罩(额头上部区域∩SegFormer头部=ROI,
取发际线曲线以上闭合区域);用 hairline_texture_black 渲染黑线替代手绘检测;
compose_comfy_rgba 合成 RGBA(alpha=255-mask, 透明=重绘区, 对齐 ComfyUI mask=1-alpha)
- hairline/comfyui.py: ComfyUI 客户端(默认8182),/upload/image+/prompt(改节点26+随机seed)
+轮询/history+/view 取回生发图
- hairline/render.py: 抽出 build_overlay_layer 供遮罩取曲线像素
- hairline/service.py: extract_context 一次出 landmarks/parse_map/502点;
generate_grow_results 每种=预览+生发图(同步串行N张,单张ComfyUI失败则grown置空不拖垮整请求)
- app.py: /hair/grow 返回 results[].grown_image_base64;重活放线程池避免卡事件循环
- add_hair.json 工作流 + hairline_texture_black/ 黑贴图入库
- 测试: test_mask.py(遮罩几何) + test_api mock ComfyUI 验 grown 字段,35 全绿
实测(5090): female 5张生发图同步约18s;预览/生发图人物五官服饰背景保持、黑线已清除。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-14 23:42:30 +08:00 |
|