Take onealready-shot model image or mannequin image, and on the premise thatthe product stays completely unchanged, replace the person, replace the background, or both.
Difference from flat-lay : flat-lay starts from a flat-lay imageto createone model image; this skill takes anexistingmodel image andsplits itinto multiple audience / scene versions—one shoot, covering domestic and overseas, different age groups, and different skin tones for ad delivery needs.
Generation example
| Input: original model image |
|---|
source-model.jpg — young man wearing a gray dropped-shoulder short-sleeve shirt, light gray studio background, 768×1024 |
Actual command executed (replace model and background):
dlazy gpt-image-2 \
--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.' \
--images docs/one-shot/source-model.jpg \
--size 1024x1536 --quality medium --imageFormat jpeg \
--save docs/one-shot/example-output.jpg
Output
example-output.jpg — 1024×1536. The gray dropped-shoulder short-sleeve shirt's color, fit, chest logo, and hem curve remain unchanged; the model is replaced with another young man, the studio gray wall is replaced with a street scene dappled with tree shadows, and the pose and framing follow the original image.
1. Capability boundaries
| Mode | Description |
|---|---|
| Replace model and background | Replace both the person and the scene, keeping only the product |
| Replace background only | Keep the original model (face, body, pose), replace the environment |
| Replace model only | Keep the original scene and composition, replace the person |
| Additional capabilities | Description |
|---|---|
| Specify model | Gender / age / skin tone / body type, lock the same face for multiple SKUs |
| Reference image | Determines the new pose and scene, supports image sets |
| Reference image similarity | 50% 相似(borrow the style, keep the original composition) / 100% 相似(strictly copy the reference image) |
| Smart model position matching | Automatically aligns the new model's body position with the original product to avoid garment misalignment |
| Automatic hand retouching | Automatically corrects hand structure after generation |
| Mannequin image to real person | Input a mannequin (dummy) image, output a real person wearing the item |
Not supported: does not change the product's style, color, pattern, or fit; does not do face swaps onto specific real people; not for forging another person's likeness endorsement.
2. Input material rules
Before generation, self-check these hard constraints:
- Size:20KB ~ 15MB
- Resolution:greater than 400×400
- Format:jpg / jpeg / png / webp
Input type: model image or mannequin image (an image where the garment is already worn on a real person / dummy).
Input recommendations
| Practice | Description |
|---|---|
| ✅ Product complete and unobstructed | Areas where arms or bags press on the garment are prone to breaking after replacing the person |
| ✅ Product occupies a large enough portion of the frame | Details of products that are too small will be lost when redrawn during model replacement |
| ✅ Even lighting | Strong backlight and large shadow areas will make the new model's lighting not match |
| ❌ Multiple people in the same frame | The model can't tell which person to replace |
| ❌ Product is cropped | The out-of-frame parts can only be guessed, and incorrect structures easily appear |
3. How to choose among the three modes
| Your goal | Choose mode | Invariants to hard-code in the prompt |
|---|---|---|
| Sell the same garment to the European and American markets | Change model and background | Product (style/color/pattern/cut/wrinkles) |
| Change the seasonal atmosphere for the same set of images | Change background only | Product + model (face/hairstyle/body shape/pose) |
| Convert mannequin images to real-person images | Change model only | Product + scene + composition + lighting |
| Split one image into versions for multiple age groups | Change model only | Product + scene + pose + shot size |
Equivalent ways to write "reference image similarity"
| Level | Write into prompt |
|---|---|
| 50% similar | Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1. |
| 100% similar | Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. |
Equivalent ways to write "automatic hand retouching":Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.
Equivalent ways to write "intelligent model position matching":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.
4. Tool invocation
This skill uses dLazy's gpt-image-2(image editing model; the essence of this skill is targeted replacement that "keeps the product and changes the rest," requiring strong region preservation and instruction following).
Invocation method
Two equivalent ways to write it; choose one. The unified entry point automatically selects the backend, retries on failure, creates directories and writes to disk, and estimates cost:
# A. 统一入口(推荐):可切任意后端,加 --dry-run 不计费空跑
node scripts/gen.mjs --task one-shot \
--prompt '<见下方 Prompt 模板>' \
--images <按下表顺序> \
--save output/one-shot-<sku>.jpg
# B. 直接用 dLazy CLI(不想引入 Node 依赖时,效果等价)
dlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg
Parameter conventions (fixed usage for this skill)
| Parameter | Value | Reason |
|---|---|---|
--images |
[原模特图]; when there is a reference image, [原模特图, 参考图]; when fixing the model, additionally append 模特脸图 |
The order is image 1 / 2 / 3 in the prompt |
--size |
Same aspect ratio as the original image (vertical 1024x1536, square 1024x1024) |
Changing the person should not change the composition ratio |
--quality |
medium regular;high preserves fabric texture |
When only changing the person, texture is easily smoothed away |
--imageFormat |
jpeg |
General format for e-commerce listings |
--batch |
3 ~ 4 |
Changing the person has high randomness, especially the hands |
--save |
docs/one-shot/output-<市场>-<sku>.jpg |
Archive by target market |
Command Examples
# basic call: 换模特换背景
dlazy gpt-image-2 \
--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.' \
--images docs/one-shot/source-model.jpg \
--size 1024x1536 --quality medium
# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张
dlazy gpt-image-2 \
--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.' \
--images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \
--size 1024x1536 --quality high --imageFormat jpeg \
--batch 4 --save docs/one-shot/output-eu-sku001.jpg
# 先估价不真跑
dlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536
Further reading
| What to look up | Where to go |
|---|---|
| Authentication, multi-backend configuration, output structure, error codes | references/provider-cli.md |
gpt-image-2 All available parameters of |
references/model-flags.md |
| All options of the unified entry point | node scripts/gen.mjs --help |
5. Prompt template
Replace [the model / the background / the model and the background] of this e-commerce photo
while keeping the garment untouched.
Keep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],
same folds and hem.
Replace the person with [新模特描述:性别 / 年龄 / 肤色 / 身材].
Replace the background with [新场景描述].
Keep the same pose, camera angle, crop and framing.
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 catalog shot, natural light, no text, no watermark.
Trim the template by mode
| Mode | Which sentence to delete / which to add |
|---|---|
| Change background only | Delete Replace the person with …, add Keep the model identical — same face, hair, body and pose. |
| Change model only | Delete Replace the background with …, add Keep the background, props, framing and lighting pixel-identical to image 1. |
| Convert mannequin image to real person | Add 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. |
6. Execution flow
- Confirm mode: Check the table in section 3 to clarify which parts are invariants.
- Validate input: Whether the product is complete and unobstructed, whether it is a single person, and whether the lighting is even.
- Write the invariants: First write out "what to preserve" in full (the product's color/cut/pattern/folds), then write "what to change."
- Add a position-alignment sentence + a hand-fixing sentence—These two are needed almost every time and can significantly reduce the rework rate.
- When there is a reference image, choose similarity: For borrowing the atmosphere, use the 50% setting; for strict replication, use the 100% setting.
--dry-runEstimate → actually run →--batch 3~4select images, save to disk atdocs/one-shot/。- Quality check: Whether the product has been altered (focus on pattern position and cut), whether the clothing is misaligned, the hands, and whether the lighting is consistent.
7. Common issues
| Symptom | Cause | Handling |
|---|---|---|
| The clothes changed along with the person | The invariants were not written specifically enough | Write down item by item: color / cut / pattern position / hem curve |
| After changing the person, the clothes are misaligned and stretched | The new body is not aligned with the original product | Add a position-alignment sentence (Section 3) |
| Hands are mangled | The hands are redrawn when changing the person | Add a hand-fixing sentence + --batch 4 select images |
| Only the background was supposed to be changed, but the person was changed too | The mode sentence is incomplete | Add Keep the model identical — same face, hair, body and pose. |
| The new background lighting does not match the person | The light direction was not constrained | Append Match the new background lighting to the light direction on the model in image 1. |
| The fabric texture is smoothed away | --quality medium |
Change --quality high, or after changing the image, follow with material-enhancement |
| After converting a mannequin image to a real person, the neck/hands look very strange | Missing completion instructions | Use the dedicated sentence for mannequin images in Section 5, and explicitly require the head, neck, and arms to be completed |
Tips
Visit https://dlazy.com for more information.