Files
xsl 8a4720472b build: local stack, container images and the end-to-end smoke script
docker-compose brings up PostgreSQL 16 with pgvector and Redis 7 on
non-standard host ports so it never collides with an existing local database.
scripts/smoke.sh is the proof: compose, migrate, boot the API, issue a token,
call the real DeepSeek API and print the resulting ob_ai_call and bl_ledger
rows. services/vision and services/matting are placeholders noting that the
local RTX 5090 makes BiRefNet and RTMPose developable without cloud GPU.
2026-08-14 00:26:39 +08:00

15 lines
893 B
Markdown

# `services/tryon/` — 换装服务(占位)
现有自有服务,需按架构 §4.4 改造后纳管。**不改造它会成为整个系统的不稳定源。**
| 改造项 | 要求 |
| --- | --- |
| 鉴权 | 改为内部服务,仅内网/网关调用,带服务间令牌 |
| 调用模式 | 同步长连接 → **提交任务 + 回调通知**(或任务查询接口) |
| 幂等 | 接受 `idempotency_key`,重复提交返回同一结果 |
| 并发控制 | 明确最大并发数并对外暴露,让上游队列按容量限流 |
| 成本埋点 | 每次推理返回 `gpu_seconds` 与模型版本,供成本归因 |
| 结果存储 | 阿里云 OSS → 腾讯云 COS;历史数据迁移或双读 |
| 输入校验 | 前置校验图片规格、人脸存在性、单品白底图规格,尽早失败 |
| 版本管理 | 模型/工作流版本号随结果返回,便于回溯效果变化 |