chore: finalize delivery cleanup
This commit is contained in:
@@ -31,7 +31,8 @@ TEST_PROMPT = "\n".join([
|
||||
"避免美白/祛斑/速效/医用等违规词;必须保持产品包装与参考图一致。",
|
||||
])
|
||||
|
||||
_REF = ROOT / "test/output/01_连通测试.png"
|
||||
_REF_ENV = os.environ.get("REAL_IMAGE_REF", "").strip()
|
||||
_REF = Path(_REF_ENV).expanduser() if _REF_ENV else None
|
||||
|
||||
|
||||
async def _apiports(key, url, ref, model, size):
|
||||
@@ -73,6 +74,11 @@ async def run():
|
||||
fallback = os.environ.get("IMAGE_PROVIDER_FALLBACK", "codeproxy").lower()
|
||||
out_dir = Path(__file__).parent.parent / "verify_output"
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
if _REF is None or not _REF.exists() or not _REF.is_file():
|
||||
raise FileNotFoundError(
|
||||
"请通过 REAL_IMAGE_REF 指定本地参考图路径,例如:"
|
||||
"REAL_IMAGE_REF=/path/to/ref.png python3 scripts/real_image_check.py"
|
||||
)
|
||||
ref = _REF.read_bytes()
|
||||
t0 = time.time(); img = None; used = None
|
||||
for prov in [primary, fallback]:
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
2026-06-09 11:39:33,251 INFO [apiports] 出图中 model=gpt-image-2 size=1024x1536
|
||||
2026-06-09 11:41:04,233 INFO HTTP Request: POST https://www.apiports.com/v1/api/generate "HTTP/1.1 200 OK"
|
||||
2026-06-09 11:41:04,236 ERROR [apiports] 失败: 无法解析: []
|
||||
2026-06-09 11:41:04,236 INFO [codeproxy] 出图中 model=gpt-image-2 size=1024x1536
|
||||
2026-06-09 11:42:33,485 INFO HTTP Request: POST https://codeproxy.dev/v1/images/edits "HTTP/1.1 200 OK"
|
||||
|
||||
===== 出图结果 =====
|
||||
provider: codeproxy
|
||||
耗时: 181.2s
|
||||
大小: 2009KB
|
||||
路径: /Users/qiyu/Documents/企业培训项目/万牛会L1准备/北哥小红书产品/Clover/backend/verify_output/素颜霜_封面hook.png
|
||||
====================
|
||||
|
||||
Reference in New Issue
Block a user