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

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
+17 -8
View File
@@ -546,12 +546,6 @@ class App(tk.Tk):
ttk.Label(top, textvariable=self.hotspot_time_var, anchor="e",
foreground="#185FA5").pack(side="right")
# —— OpenAI 配置说明(所有配置从 config.yaml 读取:key/URL/模型,前端不配置)——
oai = ttk.LabelFrame(self, text="OpenAI 配置(全部读取 config.yamlAPI Key / Base URL / 模型,不在前端配置)", padding=4)
oai.pack(fill="x", padx=8, pady=(2, 0))
ttk.Label(oai, text="LLM / 图像网关与模型在 config.yaml 的 llm_screen / compose 段配置",
foreground="#5F5E5A").pack(side="left")
# —— 商品上传模板(必须上传后才能开始任务;template_export 从该模板解析并填充)——
tpl = ttk.LabelFrame(self, text="商品上传模板(必须上传 .xlsx 后才能运行)", padding=4)
tpl.pack(fill="x", padx=8, pady=(2, 0))
@@ -948,6 +942,10 @@ class App(tk.Tk):
break
if bm_root is None:
bm_root = config_root() / bm_rel
def _norm(s: str) -> str:
return str(s or "").replace(" ", "").replace(" ", "").strip().lower()
missing = []
for t in tasks:
spu = str(t.get("spu", ""))
@@ -955,8 +953,19 @@ class App(tk.Tk):
sc = sc.strip()
if not sc:
continue
d = bm_root / spu / sc
if not d.is_dir() or not any(p.is_file() for p in d.iterdir()):
# SKU code 与文件夹名两边都去空格后再比较(兼容 db code 或文件夹名带空格)
spu_dir = bm_root / spu
if not spu_dir.is_dir():
missing.append(f"{spu}/{sc}")
continue
target = _norm(sc)
found = False
for cand in spu_dir.iterdir():
if (cand.is_dir() and _norm(cand.name) == target
and any(p.is_file() for p in cand.iterdir())):
found = True
break
if not found:
missing.append(f"{spu}/{sc}")
return missing