SuperAPI AI Directory

to-3d

General & other

View repository

Updated 10-15 22:19

About this skill

to-3d — Generate 3D garment images from flat-lay images

Turna garment image laid flat on a tabletopintoa three-dimensional image with volume—as if worn by an invisible person (known in the industry as ghost mannequin / invisible mannequin).

Use: Flat-lay images are cheap but look inexpensive, while on-model images are costly and not suitable for all categories. 3D images are the middle tier—they have texture, can convey the fit, and avoid model costs and portrait issues.


Generation effect example

Input: flat-lay image
garment-flatlay.jpg — Flat-lay image of an army-green cable-knit crewneck sweater, 800×800

The command actually executed:

dlazy gpt-image-2 \
  --prompt 'Turn this flat-lay garment photo into a dimensional 3D ghost-mannequin product shot. The olive-green cable-knit crewneck sweater must gain realistic volume: filled shoulders and chest, sleeves with natural bend, visible interior of the collar, soft self-shadow under the hem, as if worn by an invisible mannequin. Keep the garment 100% faithful: same olive-green colour, same cable-knit and diamond stitch pattern, same ribbed collar and cuffs, same woven cuff label. Clean seamless light-grey studio background, soft top light, sharp fibre detail. No mannequin, no person, no text.' \
  --images docs/to-3d/garment-flatlay.jpg \
  --size 1024x1024 --quality medium --imageFormat jpeg \
  --save docs/to-3d/example-output.jpg

Output

example-output.jpg — 1024×1024. The shoulders and chest are filled out, the sleeves curve naturally, the neckline reveals the inner ribbing and back lining, and the hem has a self-weight shadow; the cable and diamond knit patterns, army-green color, ribbed structure, and woven label on the right sleeve remain unchanged, and no mannequin or human body appears in the image.


1. Capability boundaries

Capability Description
Three-dimensional shaping Shoulder and chest filling, sleeve bending, neckline revealing the inner lining, hem self-weight shadow
Garment type Tops / bottoms / dresses / outerwear / underwear / children's clothing / loungewear
Shape control Reference image (copy a certain three-dimensional form) or custom prompt
Material enhancement Switch; when enabled, surface details of knits, fuzz, and leather become clearer
Generation ratio 1:1(square main image) / 3:4(vertical detail page)

Do not do: Do not change color, knit pattern, print, or ribbed structure; do not generate a human body or face; do not change the garment's actual fit proportions.


2. Input material rules

Before generation, self-check these hard constraints:

  • Size:20KB ~ 15MB
  • Resolution:greater than 400×400
  • Format:jpg / jpeg / png / webp

Recommended input (✅): A single-item flat-lay image with a solid-color background, fully laid flat, no wrinkled stacking, complete front view, and clear neckline and hem boundaries.

Input that will noticeably reduce the effect (❌)

Issue Description
Folded placement Sleeves folded on the body; the model cannot calculate sleeve length
Large areas of wrinkles Wrinkles will be treated as structure and shaped into strange forms
Already includes a human body For on-model images, please use one-shot
Multiple items in one frame Split into individual items and run separately

3. Three control points for the three-dimensional form

Control point Write into prompt What happens if not written
Degree of filling filled shoulders and chest with realistic volume, natural fabric drape It gets puffed up like a balloon, and the fit becomes distorted
Sleeve posture sleeves with a natural bend, hanging slightly forward and away from the body Sleeves stick stiffly to the sides of the body
Neckline inner lining visible interior of the collar showing the inner facing The neckline is a flat hole, which is the easiest place to be exposed

Then add two more environmental constraints:

soft self-shadow under the hem and inside the sleeves
No mannequin, no person, no visible support — the garment must appear worn by an invisible body.

No mannequin, no person This sentence must be written, otherwise the model often directly grows a mannequin or half a body.


4. Tool invocation

This skill uses dLazy's gpt-image-2(image editing model; inferring volume from a flat image requires strong geometric understanding, while strictly preserving the knit pattern and colors unchanged).

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 to-3d \
  --prompt '<见下方 Prompt 模板>' \
  --images <按下表顺序> \
  --save output/to-3d-<sku>.jpg

# B. 直接用 dLazy CLI(不想引入 Node 依赖时,效果等价)
dlazy gpt-image-2 --prompt '...' --images ... --save output/to-3d.jpg

Parameter conventions (fixed usage for this skill)

Parameter Value Reason
--images [平铺图]; when a shape reference is included, [平铺图, 形态参考图] the order is image 1 / 2 in the prompt
--size 1024x1024(square main image) / 1024x1536(vertical long style, dress) corresponds to the original site's 1:1 / 3:4
--quality high(equivalent to "material enhancement" on) / medium(off) knit and fleece types must be high
--imageFormat jpeg general format for e-commerce listing
--batch 2 ~ 3 volume inference has randomness
--save docs/to-3d/output-<sku>.jpg write directly to disk

Command Examples

# basic call
dlazy gpt-image-2 \
  --prompt 'Turn this flat-lay garment photo into a dimensional 3D ghost-mannequin product shot. Filled shoulders and chest with realistic volume, sleeves with a natural bend, visible interior of the collar, soft self-shadow under the hem. Keep the garment 100% faithful: same colour, same stitch pattern, same ribbing, same label. Clean seamless light-grey studio background. No mannequin, no person, no text.' \
  --images docs/to-3d/garment-flatlay.jpg \
  --size 1024x1024 --quality high

# complex call: 照抄某种立体形态 + 竖版 + 出 3 张挑图
dlazy gpt-image-2 \
  --prompt 'Turn image 1 (a flat-lay garment) into a dimensional 3D ghost-mannequin product shot, copying the volume, posture and camera angle of image 2. Filled shoulders and chest with realistic volume and natural fabric drape, sleeves with a natural bend hanging slightly forward, visible interior of the collar showing the inner facing, soft self-shadow under the hem and inside the sleeves. Keep the garment 100% faithful to image 1: same colour, same knit structure, same print placement, same ribbing and label. Clean seamless light-grey studio background, soft top light, sharp fibre detail. No mannequin, no person, no visible support, no text.' \
  --images docs/to-3d/garment-flatlay.jpg docs/to-3d/volume-ref.jpg \
  --size 1024x1536 --quality high --imageFormat jpeg \
  --batch 3 --save docs/to-3d/output-sku001.jpg

# 先估价不真跑
dlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high

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 templates

Turn this flat-lay garment photo into a dimensional 3D ghost-mannequin product shot.

The [品类 + 颜色 + 面料] must gain realistic volume:
filled shoulders and chest, sleeves with a natural bend,
visible interior of the collar showing the inner facing,
soft self-shadow under the hem and inside the sleeves,
as if worn by an invisible body.

Keep the garment 100% faithful: same [颜色], same [织法/纹理], same [印花/图案位置],
same [罗纹/领口/袖口/下摆结构], same [吊牌/织标].

Clean seamless [背景色] studio background, soft top light, sharp fibre detail.
No mannequin, no person, no visible support, no text.

Correction sentences appended by issue

Issue Append to the end of the prompt
A mannequin or half a person grew out Absolutely no mannequin, torso, neck, arms or hands anywhere in the frame — only the garment.
Overstuffed, the fit became fat Keep the original garment proportions: body width, sleeve length and hem width must match image 1 exactly. Add volume, not size.
The neckline is a flat hole The collar opening must show the inner facing and the inside back of the garment, with correct depth and shadow.
The knit pattern was smoothed away Change --quality high, append resolve individual knit loops and yarn twist
Projection direction is messy Single soft top-left light source; one consistent contact shadow beneath the garment.

6. Execution flow

  1. Validate input: completely laid flat, no folds, no large wrinkles, single item, clear boundaries.
  2. Write three control points(filling / sleeve pose / neckline interior) + two environmental constraints (self-weight projection / no mannequin).
  3. Write fidelity items: color, knit pattern, print position, rib structure, hangtag.
  4. Choose aspect ratio and quality: knit and fleece types always --quality high。
  5. --dry-run estimate cost → actually run → --batch 2~3 select images, write to disk at docs/to-3d/。
  6. Quality check: whether a human body grew out, whether the fit became fat, whether the neckline interior is correct, whether the knit pattern is still there.

7. Common issues

Symptom Cause Handling
A mannequin / half a body grew out Missing prohibition sentence Append the strengthened prohibition sentence (Section 5)
The fit was stuffed fat Only said to add volume, did not say to preserve proportions Append the preserve-proportions sentence:Add volume, not size.
The neckline is a flat black hole Interior not described Append the neckline interior sentence
Sleeves are stiff and straight against the sides Sleeve pose not described Append hanging slightly forward and away from the body
The knit pattern is blurry --quality medium Change high; or follow with material-enhancement
Images of folded placement have very poor results Input violates the rules Reshoot as a completely flattened flat lay

Tips

Visit https://dlazy.com for more information.