to-3d — 平鋪圖生成服裝 3D 立體圖
把平攤在桌面上的服裝圖變成有體積感的立體圖——像被一個看不見的人穿著(業內稱 ghost mannequin / 隱形模特)。
用途:平鋪圖便宜但顯得廉價,真人圖貴且不適合所有類目。3D 立體圖是中間檔——有質感、能交代版型,又不涉及模特成本與肖像問題。
生成效果示例
| 輸入:平鋪圖 |
|---|
garment-flatlay.jpg — 軍綠麻花針織圓領毛衣平鋪圖,800×800 |
實際執行的命令:
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
輸出
example-output.jpg — 1024×1024。肩胸被撐起、袖子自然彎曲、領口露出內裡羅紋與背面內襯、下擺有自重投影;麻花與菱形織法、軍綠色、羅紋結構與右袖織標保持不變,畫面裡沒有出現人台或人體。
1、能力邊界
| 能力 | 說明 |
|---|---|
| 立體撐起 | 肩胸填充、袖子彎曲、領口露出內裡、下擺自重投影 |
| 服裝類型 | 上裝 / 下裝 / 連衣裙 / 外套 / 內衣 / 童裝 / 家居服 |
| 形態控制 | 參考圖(照抄某種立體形態)或自定義提示詞 |
| 材質增強 | 開關;開啟後針織、絨毛、皮革的表面細節更清晰 |
| 生成比例 | 1:1(方圖主圖)/ 3:4(豎版詳情) |
不做:不改顏色、織法、印花與羅紋結構;不生成人體與人臉;不改變服裝的實際版型比例。
2、輸入素材規則
生成前先自檢這幾條硬性約束:
- 大小:20KB ~ 15MB
- 解析度:大於 400×400
- 格式:jpg / jpeg / png / webp
推薦的輸入(✅):純色背景、完全攤平、無皺褶堆疊、正面完整、領口與下擺邊界清晰的單件平鋪圖。
會明顯拉低效果的輸入(❌)
| 問題 | 說明 |
|---|---|
| 折疊擺放 | 袖子折在身上,模型算不出袖子長度 |
| 大面積皺褶 | 皺褶會被當成結構撐成怪形狀 |
| 已帶人體 | 真人上身圖請用 one-shot |
| 套裝同框 | 拆成單件分別跑 |
3、立體形態的三個控制點
| 控制點 | 寫進 prompt | 不寫會怎樣 |
|---|---|---|
| 填充程度 | filled shoulders and chest with realistic volume, natural fabric drape | 撐得像氣球,版型失真 |
| 袖子姿態 | sleeves with a natural bend, hanging slightly forward and away from the body | 袖子直挺挺貼在身側 |
| 領口內裡 | visible interior of the collar showing the inner facing | 領口是個平的洞,最容易露餡 |
再補兩條環境約束:
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 這句必須寫,否則模型經常直接長出一個人台或半個身體。
4、工具調用
本技能使用 dLazy 的 gpt-image-2(圖像編輯模型;從平面推斷體積需要強幾何理解,同時要嚴格保住織法與顏色不變)。
調用方式
兩種等價寫法,選一種。統一入口會自動選後端、失敗重試、建目錄落盤、估算成本:
# 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
參數約定(本技能固定用法)
| 參數 | 取值 | 理由 |
|---|---|---|
--images | [平鋪圖];帶形態參考時 [平鋪圖, 形態參考圖] | 順序即 prompt 中的 image 1 / 2 |
--size | 1024x1024(方圖主圖)/ 1024x1536(豎版長款、連衣裙) | 對應原站的 1:1 / 3:4 |
--quality | high(等價於「材質增強」開啟)/ medium(關閉) | 針織、絨毛類必須 high |
--imageFormat | jpeg | 電商上架通用格式 |
--batch | 2 ~ 3 | 體積推斷有隨機性 |
--save | docs/to-3d/output-<sku>.jpg | 直接落盤 |
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
延伸閱讀
| 要查什麼 | 去哪 |
|---|---|
| 認證、多後端配置、輸出結構、錯誤碼 | references/provider-cli.md |
gpt-image-2 的全部可用參數 | references/model-flags.md |
| 統一入口的全部選項 | node scripts/gen.mjs --help |
5、Prompt 模板
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.
按問題追加的修正句
| 問題 | 追加到 prompt 末尾 |
|---|---|
| 長出了人台或半個人 | Absolutely no mannequin, torso, neck, arms or hands anywhere in the frame — only the garment. |
| 撐得過度、版型變胖 | Keep the original garment proportions: body width, sleeve length and hem width must match image 1 exactly. Add volume, not size. |
| 領口是個平的洞 | The collar opening must show the inner facing and the inside back of the garment, with correct depth and shadow. |
| 織法被抹平 | 改 --quality high,追加 resolve individual knit loops and yarn twist |
| 投影方向亂 | Single soft top-left light source; one consistent contact shadow beneath the garment. |
6、執行流程
- 校驗輸入:完全攤平、無折疊、無大皺褶、單件、邊界清晰。
- 寫三個控制點(填充 / 袖姿 / 領口內裡)+ 兩條環境約束(自重投影 / 禁止人台)。
- 寫保真項:顏色、織法、印花位置、羅紋結構、吊牌。
- 選比例與品質:針織絨毛類一律
--quality high。 --dry-run估價 → 真跑 →--batch 2~3挑圖,落盤到docs/to-3d/。- 品檢:有沒有長出人體、版型是否變胖、領口內裡是否正確、織法是否還在。
7、常見問題
| 現象 | 原因 | 處理 |
|---|---|---|
| 長出人台 / 半個身體 | 缺少禁止句 | 追加強化版禁止句(第五節) |
| 版型被撐胖 | 只說了加體積沒說保比例 | 追加保比例句:Add volume, not size. |
| 領口是平的黑洞 | 未描述內裡 | 追加領口內裡句 |
| 袖子直挺挺貼身側 | 未描述袖姿 | 追加 hanging slightly forward and away from the body |
| 織法糊了 | --quality medium | 改 high;或接 material-enhancement |
| 折疊擺放的圖效果很差 | 輸入違規 | 重拍成完全攤平的平鋪圖 |
Tips
Visit https://dlazy.com for more information.

