模板导出增强 + 模特性别分组 + 三合一提示词精简

1) 模板导出:识别「基码表-胸围」填 sku.bust(多个胸围列都填);申报价格模糊匹配多列统一按加价后价格填写;详情图文不再拼接 img_url_2;SPU 款式来源统一填「现货款」;商品产地国家简称映射(沙特→沙特阿拉伯)
2) 模特性别分组:model_features 按男女分组,按模板类目含男/女固定取对应性别模特(含 Pinterest 模式 pipeline)
3) 三合一提示词:去掉 DESIGN CONTENT 四要素描述(设计已由设计稿提供)
4) 生图尺寸:全部改为读 config 不再硬编码(设计图 compose.design_size / 合成图 compose.size / 种草图 seed_shot.size)
This commit is contained in:
2026-08-26 18:05:11 +08:00
parent e317547b8b
commit b7f429db89
93 changed files with 2708 additions and 583 deletions
+3 -2
View File
@@ -20,7 +20,7 @@ class MockImageBackend(ImageBackend):
self._cfg = cfg or {}
def print(self, prompt: str, base_image: str, out_path: str, negative: str = "",
extra_images=None, size: str = "") -> str:
extra_images=None, size: str = "", seed: int = None) -> str:
size_px = (1024, 1024)
try:
with Image.open(base_image) as im:
@@ -45,7 +45,8 @@ class MockImageBackend(ImageBackend):
img.save(out_path)
return out_path
def generate(self, prompt: str, out_path: str, negative: str = "", size: str = "") -> str:
def generate(self, prompt: str, out_path: str, negative: str = "", size: str = "",
seed: int = None) -> str:
"""纯文生图(mock):白底 + 文字标注,模拟纯印花设计稿。"""
size_px = (1024, 1024)
if size: