{"slug":"one-shot","title":"one-shot","summary":"已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-28T16:27:21.778333Z","repo":{"url":"https://github.com/dlazy-ai/ecommerce-skills","stars":21,"forks":3,"license":"MIT","updatedAt":"2026-09-28T02:49:10Z"},"bodyHtml":"<hr>\n<h2>name: one-shot\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。</h2>\n<h1>one-shot — 同一商品替换模特和背景</h1>\n<p>拿一张<strong>已经拍好的模特图或人台图</strong>，在<strong>商品完全不动</strong>的前提下换掉人、换掉背景，或两者都换。</p>\n<p>和 <a href=\"../flat-lay/skill.md\">flat-lay</a> 的区别：flat-lay 从平铺图<strong>造</strong>一张模特图；本技能是把<strong>已有</strong>的模特图<strong>裂变</strong>成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。</p>\n<hr>\n<h2>生成效果示例</h2>\n<table>\n<thead>\n<tr>\n<th>输入：原模特图</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><img src=\"../../docs/one-shot/source-model.jpg\" width=\"280\"></td>\n</tr>\n<tr>\n<td><code>source-model.jpg</code> — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024</td>\n</tr>\n</tbody>\n</table>\n<p>实际执行的命令（换模特换背景）：</p>\n<pre><code>dlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n</code></pre>\n<p><strong>输出</strong></p>\n<img src=\"../../docs/one-shot/example-output.jpg\" width=\"320\">\n<p><code>example-output.jpg</code> — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。</p>\n<hr>\n<h2>1、能力边界</h2>\n<table>\n<thead>\n<tr>\n<th>模式</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>换模特换背景</td>\n<td>人和场景全换，只留商品</td>\n</tr>\n<tr>\n<td>只换背景</td>\n<td>保留原模特（脸、身材、姿势），换掉环境</td>\n</tr>\n<tr>\n<td>只换模特</td>\n<td>保留原场景与构图，换掉人</td>\n</tr>\n</tbody>\n</table>\n<table>\n<thead>\n<tr>\n<th>附加能力</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>指定模特</td>\n<td>性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU</td>\n</tr>\n<tr>\n<td>参考图</td>\n<td>决定新的姿势与场景，支持套图</td>\n</tr>\n<tr>\n<td>参考图相似度</td>\n<td><code>50% 相似</code>（借风格，保留原构图）/ <code>100% 相似</code>（严格照抄参考图）</td>\n</tr>\n<tr>\n<td>智能匹配模特位置</td>\n<td>自动对齐新模特与原商品的身体位置，避免衣服错位</td>\n</tr>\n<tr>\n<td>自动修手</td>\n<td>生成后自动修正手部结构</td>\n</tr>\n<tr>\n<td>人台图转真人</td>\n<td>输入人形模特（假人）图，输出真人上身图</td>\n</tr>\n</tbody>\n</table>\n<p><strong>不做</strong>：不改商品的款式、颜色、图案与版型；不做换脸到特定真人；不用于伪造他人肖像代言。</p>\n<hr>\n<h2>2、输入素材规则</h2>\n<p>生成前先自检这几条硬性约束：</p>\n<ul>\n<li>大小：<strong>20KB ~ 15MB</strong></li>\n<li>分辨率：<strong>大于 400×400</strong></li>\n<li>格式：<strong>jpg / jpeg / png / webp</strong></li>\n</ul>\n<p><strong>输入类型</strong>：模特图 <strong>或</strong> 人台图（衣服已经穿在真人 / 假人身上的图）。</p>\n<p><strong>输入建议</strong></p>\n<table>\n<thead>\n<tr>\n<th>做法</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>✅ 商品完整无遮挡</td>\n<td>手臂、包袋压住衣服的地方换人后容易崩</td>\n</tr>\n<tr>\n<td>✅ 商品在画面中占比够大</td>\n<td>太小的商品换人时细节会被重绘丢失</td>\n</tr>\n<tr>\n<td>✅ 光线均匀</td>\n<td>强逆光、大面积阴影会让新模特的光影对不上</td>\n</tr>\n<tr>\n<td>❌ 多人同框</td>\n<td>模型分不清该换哪个人</td>\n</tr>\n<tr>\n<td>❌ 商品被裁切</td>\n<td>出画的部分只能靠猜，容易长出错误结构</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>3、三种模式怎么选</h2>\n<table>\n<thead>\n<tr>\n<th>你的目标</th>\n<th>选模式</th>\n<th>prompt 要写死的不变量</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>同款衣服卖给欧美市场</td>\n<td>换模特换背景</td>\n<td>商品（款式/颜色/图案/版型/褶皱）</td>\n</tr>\n<tr>\n<td>同一套图换季节氛围</td>\n<td>只换背景</td>\n<td>商品 + 模特（脸/发型/身材/姿势）</td>\n</tr>\n<tr>\n<td>人台图转真人图</td>\n<td>只换模特</td>\n<td>商品 + 场景 + 构图 + 光线</td>\n</tr>\n<tr>\n<td>一张图裂变成多年龄段版本</td>\n<td>只换模特</td>\n<td>商品 + 场景 + 姿势 + 景别</td>\n</tr>\n</tbody>\n</table>\n<p><strong>「参考图相似度」的等价写法</strong></p>\n<table>\n<thead>\n<tr>\n<th>档位</th>\n<th>写进 prompt</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>50% 相似</td>\n<td><code>Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.</code></td>\n</tr>\n<tr>\n<td>100% 相似</td>\n<td><code>Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.</code></td>\n</tr>\n</tbody>\n</table>\n<p><strong>「自动修手」的等价写法</strong>：<code>Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.</code></p>\n<p><strong>「智能匹配模特位置」的等价写法</strong>：<code>Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.</code></p>\n<hr>\n<h2>4、工具调用</h2>\n<p>本技能使用 dLazy 的 <strong><code>gpt-image-2</code></strong>（图像编辑模型；本技能的本质是「保商品、换其余」的定向替换，需要强区域保持与指令跟随）。</p>\n<h3>调用方式</h3>\n<p>两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：</p>\n<pre><code># A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task one-shot \\\n  --prompt '&lt;见下方 Prompt 模板&gt;' \\\n  --images &lt;按下表顺序&gt; \\\n  --save output/one-shot-&lt;sku&gt;.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n</code></pre>\n<p><strong>参数约定（本技能固定用法）</strong></p>\n<table>\n<thead>\n<tr>\n<th>参数</th>\n<th>取值</th>\n<th>理由</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>--images</code></td>\n<td><code>[原模特图]</code>；带参考图时 <code>[原模特图, 参考图]</code>；固定模特时再追加 <code>模特脸图</code></td>\n<td>顺序即 prompt 中的 image 1 / 2 / 3</td>\n</tr>\n<tr>\n<td><code>--size</code></td>\n<td>与原图比例一致（竖版 <code>1024x1536</code>，方图 <code>1024x1024</code>）</td>\n<td>换人不该改变构图比例</td>\n</tr>\n<tr>\n<td><code>--quality</code></td>\n<td><code>medium</code> 常规；<code>high</code> 保面料纹理</td>\n<td>只换人时纹理容易被抹平</td>\n</tr>\n<tr>\n<td><code>--imageFormat</code></td>\n<td><code>jpeg</code></td>\n<td>电商上架通用格式</td>\n</tr>\n<tr>\n<td><code>--batch</code></td>\n<td><code>3</code> ~ <code>4</code></td>\n<td>换人随机性大，尤其手部</td>\n</tr>\n<tr>\n<td><code>--save</code></td>\n<td><code>docs/one-shot/output-&lt;市场&gt;-&lt;sku&gt;.jpg</code></td>\n<td>按投放市场归档</td>\n</tr>\n</tbody>\n</table>\n<h3>Command Examples</h3>\n<pre><code># basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\n</code></pre>\n<h3>延伸阅读</h3>\n<table>\n<thead>\n<tr>\n<th>要查什么</th>\n<th>去哪</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>认证、多后端配置、输出结构、错误码</td>\n<td><a href=\"references/provider-cli.md\"><code>references/provider-cli.md</code></a></td>\n</tr>\n<tr>\n<td><code>gpt-image-2</code> 的全部可用参数</td>\n<td><a href=\"references/model-flags.md\"><code>references/model-flags.md</code></a></td>\n</tr>\n<tr>\n<td>统一入口的全部选项</td>\n<td><code>node scripts/gen.mjs --help</code></td>\n</tr>\n</tbody>\n</table>\n<h2>5、Prompt 模板</h2>\n<pre><code>Replace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n</code></pre>\n<p><strong>按模式裁剪模板</strong></p>\n<table>\n<thead>\n<tr>\n<th>模式</th>\n<th>删掉哪句 / 加哪句</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>只换背景</td>\n<td>删掉 <code>Replace the person with …</code>，加 <code>Keep the model identical — same face, hair, body and pose.</code></td>\n</tr>\n<tr>\n<td>只换模特</td>\n<td>删掉 <code>Replace the background with …</code>，加 <code>Keep the background, props, framing and lighting pixel-identical to image 1.</code></td>\n</tr>\n<tr>\n<td>人台图转真人</td>\n<td>加 <code>The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.</code></td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>6、执行流程</h2>\n<ol>\n<li><strong>确认模式</strong>：查第三节表格，明确哪些是不变量。</li>\n<li><strong>校验输入</strong>：商品是否完整无遮挡、是否单人、光线是否均匀。</li>\n<li><strong>写不变量</strong>：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。</li>\n<li><strong>加位置对齐句 + 修手句</strong>——这两条几乎每次都要，能显著降低返工率。</li>\n<li><strong>有参考图时选相似度</strong>：借氛围用 50% 档写法，严格复刻用 100% 档写法。</li>\n<li><strong><code>--dry-run</code> 估价</strong> → 真跑 → <code>--batch 3~4</code> 挑图，落盘到 <code>docs/one-shot/</code>。</li>\n<li><strong>质检</strong>：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。</li>\n</ol>\n<hr>\n<h2>7、常见问题</h2>\n<table>\n<thead>\n<tr>\n<th>现象</th>\n<th>原因</th>\n<th>处理</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>衣服跟着人一起变了</td>\n<td>不变量写得不够具体</td>\n<td>逐项写死颜色 / 版型 / 图案位置 / 下摆弧线</td>\n</tr>\n<tr>\n<td>换人后衣服错位、被拉伸</td>\n<td>新身体与原商品没对齐</td>\n<td>加位置对齐句（第三节）</td>\n</tr>\n<tr>\n<td>手指崩坏</td>\n<td>换人时手部重绘</td>\n<td>加修手句 + <code>--batch 4</code> 挑图</td>\n</tr>\n<tr>\n<td>只换背景却把人也换了</td>\n<td>模式句不完整</td>\n<td>补 <code>Keep the model identical — same face, hair, body and pose.</code></td>\n</tr>\n<tr>\n<td>新背景光线和人对不上</td>\n<td>未约束光向</td>\n<td>追加 <code>Match the new background lighting to the light direction on the model in image 1.</code></td>\n</tr>\n<tr>\n<td>面料纹理被抹平</td>\n<td><code>--quality medium</code></td>\n<td>改 <code>--quality high</code>，或换图后接 <a href=\"../material-enhancement/skill.md\">material-enhancement</a></td>\n</tr>\n<tr>\n<td>人台图转真人后脖子/手很怪</td>\n<td>缺少补全指令</td>\n<td>用第五节人台图专用句，明确要求补出头颈与手臂</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>Tips</h2>\n<p>Visit <a href=\"https://dlazy.com\">https://dlazy.com</a> for more information.</p>\n","files":[{"path":"examples/brand.yaml","sizeBytes":1617,"isText":true},{"path":"references/model-flags.md","sizeBytes":2103,"isText":true},{"path":"references/provider-cli.md","sizeBytes":4802,"isText":true},{"path":"scripts/brand.mjs","sizeBytes":4516,"isText":false},{"path":"scripts/gen.mjs","sizeBytes":9495,"isText":false},{"path":"scripts/lib/miniyaml.mjs","sizeBytes":2824,"isText":false},{"path":"scripts/lib/providers.mjs","sizeBytes":12171,"isText":false},{"path":"scripts/lib/tasks.json","sizeBytes":3202,"isText":true},{"path":"skill.md","sizeBytes":11252,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-28T16:27:59.365534Z","sha256":"EDE614717AF2F8B436759726BEA52D4678FC78CC6C7CB558E3C1BD193B205817","sizeBytes":24015},"review":null,"source":{"repositoryUrl":"https://github.com/dlazy-ai/ecommerce-skills","path":"skills/one-shot","license":"MIT","commit":"c022f20067c5a83126643e518519dd567de187c1","subtreeSha":"A0462DAB3C38681BE6BDD0D84969ECE1E66BB075233D0B6A4EF6C09A744F666D","lastSyncedAt":"2026-09-28T16:27:18.924816Z"},"reviewedAt":"2026-09-28T16:29:46.623453Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/dlazy-ai/ecommerce-skills/tree/main/skills/one-shot"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dlazy-ai-ecommerce-skills@llmmart"},{"target":"git","command":"git clone https://github.com/dlazy-ai/ecommerce-skills.git"}]}