Openclaw-ecommerce-ad-skills product-scene-gen

基于商品图和文案生成商品场景合成图,支持多种风格和比例

install
source · Clone the upstream repo
git clone https://github.com/lujiaheng-artpivot/openclaw-ecommerce-ad-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/lujiaheng-artpivot/openclaw-ecommerce-ad-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/product-scene-gen" ~/.claude/skills/lujiaheng-artpivot-openclaw-ecommerce-ad-skills-product-scene-gen && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/lujiaheng-artpivot/openclaw-ecommerce-ad-skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/product-scene-gen" ~/.openclaw/skills/lujiaheng-artpivot-openclaw-ecommerce-ad-skills-product-scene-gen && rm -rf "$T"
manifest: skills/product-scene-gen/SKILL.md
source content

商品场景图生成 Skill

使用火山引擎 Seedance Image 模型,将商品图合成到指定场景中,生成符合广告需求的场景图。

使用方法

python3 scripts/generate_scene.py \
  --product-image ./product.jpg \
  --scene-prompt "耳机放在阳光充足的北欧风书桌上,旁边有咖啡、笔记本和绿植,自然光,浅色调" \
  --style minimal \
  --ratio 9:16 \
  --count 2 \
  --output-dir ./scenes

参数说明

参数类型必填说明
--product-image
string商品图片路径
--scene-prompt
string场景描述提示词
--style
string图像风格:minimal/realistic/cartoon/vintage/futuristic
--ratio
string图像比例:1:1/4:3/16:9/9:16/3:4,默认1:1
--count
number生成的场景图数量,默认1
--output-dir
string输出目录,默认 ./scenes
--resolution
string分辨率:1K/2K/4K,默认2K
--watermark
boolean是否添加水印,默认false

输出文件

生成的场景图会保存为:

  • {output_dir}/scene_{index}_{timestamp}.png
  • 同时生成 scene_metadata.json 包含生成参数和提示词

事件发布

生成完成后会发布

scene.generated
事件到消息总线。

风格说明

风格说明
minimal极简风格,干净简洁,适合现代商品
realistic写实风格,真实自然,适合大多数商品
cartoon卡通风格,活泼可爱,适合儿童商品
vintage复古风格,怀旧质感,适合复古类商品
futuristic未来风格,科技感,适合数码产品

比例推荐

平台推荐比例
抖音/快手短视频9:16
淘宝主图1:1
小红书笔记3:4
视频号16:9