修复种草图生成:以三合一主图为参考 img2img 生成,按颜色分配(每色优先、超出随机补足);新增 BR/CA/DE/ES/IT/PL/SA 七国配置与提示词;删除验证用测试脚本

This commit is contained in:
2026-08-24 14:02:19 +08:00
parent f493bde8a9
commit 3c341d2e78
51 changed files with 2571 additions and 514 deletions
+30 -11
View File
@@ -1,12 +1,19 @@
# ===== POD 热点抓取 Agent 配置(LangGraph 工程化版)=====
# 目标国家(Google Trends 地区代码:US / GB / JP / AU / MX ...
# 目标国家(Google Trends 地区代码:US / GB / JP / AU / MX / DE / BR / SA / PL / ES / IT / CA ...
countries:
- US
- GB
- JP
- AU
- MX
- DE
- BR
- SA
- PL
- ES
- IT
- CA
# —— 可插拔数据源 ——
# 在 graph/sources/ 注册表里登记;这里列出要启用的。
@@ -22,8 +29,7 @@ sources:
# static: 仅用 yaml 写死种子,零动态(保留兼容,UI 未列出)。
seed_provider: mock
seed_provider_cfg:
max_style_seeds: 12 # style 种子总数上限(动态分配:固定种子优先 → 节日/月份主题 → 动态补位
max_related_seeds: 12 # related 种子总数上限(同上)
max_seeds: 24 # 种子总数上限(不再按类型分:从全部种子词统一池随机抽取,均分 style/related
trending_context_limit: 15
history_limit: 20
@@ -88,7 +94,7 @@ llm_screen:
provider: openai # openai(真 LLM,需 key/ mock(无 key 启发式兜底)
api_key: "sk-ws-H.EPXPIER.vRMT.MEUCIQDji_AHGl-EekYOftdLxEvFl2ZqCNtLDSp3Bqnaz0SRpgIgI4qPeVyIMMzutl9JakuYRv3zmFxkwc12c4aBcIL1gqE" # 留空则自动读取环境变量 LLM_API_KEY / OPENAI_API_KEY(推荐,避免密钥入库)
base_url: "https://ws-5rfjflubus647o7t.cn-beijing.maas.aliyuncs.com/compatible-mode/v1" # 自定义网关地址,也可用环境变量 LLM_BASE_URL 覆盖
model: "qwen3.7-max-preview" # 自定义模型名(任意 OpenAI 兼容模型)
model: "qwen3.7-plus-2026-05-26" # 自定义模型名(任意 OpenAI 兼容模型)
temperature: 0.6
max_topics_per_call: 12
min_score: 0.0
@@ -122,6 +128,20 @@ DESIGN CONTENT: {motif}, {art_style}, {color_palette}, {composition}."
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, AU-market aesthetic: laid-back coastal and outdoor vibe, nature-inspired, bright fresh energy, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or a small slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
MX:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, MX-market aesthetic: vibrant mexican folk art, sugar skull / loteria / aztec motifs, fiesta colors, festive cultural pride mood, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or a Spanish slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
DE:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, DE-market aesthetic: bavarian-alpine folk charm, berlin street-art edge, bauhaus minimalism, cozy beer-garden and christmas-market mood, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or a German slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
BR:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, BR-market aesthetic: vibrant tropical carnival energy, samba rhythm, football passion, bold beach and street-art colors, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or a Portuguese slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
SA:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, SA-market aesthetic: elegant desert minimalism, arabian geometric patterns, falconry and starry-night calm, refined and conservative mood, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or an Arabic slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
PL:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, PL-market aesthetic: highland folk embroidery charm, wycinanki paper-cut patterns, slavic forest mystique, retro polish poster mood, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or a Polish slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
ES:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, ES-market aesthetic: flamenco passion, andalusian tile patterns, mediterranean sunshine, festive fiesta energy, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or a Spanish slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
IT:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, IT-market aesthetic: renaissance elegance, roman heritage, tuscan countryside warmth, la dolce vita retro charm, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or an Italian slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
CA:
image_prompt: "{motif}, {art_style}, {color_palette}, {composition}, standalone pure print design, print-ready artwork, flat vector-like graphic, crisp clean edges, high resolution, ultra sharp, high contrast, CA-market aesthetic: maple-leaf pride, northern-lights wonder, rocky-mountain outdoors, cozy cottage and hockey spirit, size: choose freely between a MINIMUM print area of about 15x18 cm and a MAXIMUM of 26x32 cm, any size in this range fits, pick the one that best suits the design, keep proportions, scale naturally to the content, do NOT stretch, do NOT fill the entire canvas, do NOT force full-bleed, leave balanced margins around the artwork, no garment, no shirt, no model, no mannequin, no watermark, text: optional - add short original English words or a French slogan ONLY if they fit the print, or keep it text-free; any text must be safe, short and original; no brand names, no logos, no trademarked phrases, no real people names"
# —— 第三阶段 compose:生成纯印花设计稿 + 导出简报包(在 product 之前)——
# 用前 N 个 safe 简报的 image_prompt 调图像后端文生图,产物 output/<country>/designs/
@@ -146,15 +166,14 @@ oss:
oss_key_secret: "2Q25JohOI4GmovszvIw1NuVvUzM6PB"
enabled: true # false = 跳过上传(本地仅压缩或完全跳过)
# —— 第六阶段 seed_shot:种草图生成(在 oss_upload 之后)——
# 模板:configs/seed_shot_templates.yaml(提示词,占位符 [商品名称]/[材质]/[模特特征],可自定义添加)
# 模特特征:configs/model_features.yaml(随机取一条,可自定义添加
# [商品名称] ← product 的 cn_title[材质] ← db SPU.material[模特特征] ← yaml 随机
# 种草图同样压缩上传 OSS(货号计数与 oss_upload 共用续接)。
# —— 第六阶段 seed_shot:种草图选取(在 oss_upload 之后)——
# 种草图不再用 AI 重新生成,而是从 product 已生成的三合一主图(每颜色一张)中按 count 随机选取:
# - count <= 颜色数:随机取 count 个不同颜色(优先保证每色主图都有一张
# - count > 颜色数:每色一张 + 从全部主图中随机补足(可重复)
# 选取的种草图压缩上传 OSS(货号计数与 oss_upload 共用续接)URL 写入模板「详情图文」列
seed_shot:
enabled: true
count: 1 # 每个产品生成几张种草图(传入数量即可)
size: "1536×2048" # 种草图尺寸(统一读取此配置,不再硬编码)
count: 1 # 每个产品选取几张种草图(从三合一主图中随机取,传入数量即可)
# —— 第四阶段 product:热点 → SPU/颜色选品 → 底图 → 三图合成(图1模特+图2设计稿+图3底图)→ 模板 ——
# 数据关系:SPU.code=款号,SKU.code="款号-颜色编码"(如 DG004-BL01),