SuperAPI AI Directory

item-repair

General & other

View repository

Updated 10-15 22:19

About this skill

item-repair — one-click upgrade of product photo quality

Turncasually shot product photosintoretouched images ready to be listed: flatten wrinkles, straighten symmetry, even out lighting, purify the background.

Division of labor with material-enhancement : material-enhancement retouchesfabric texture(on model photos), while this skill retouchesplacement and lighting(on product photos). The two can be used in sequence.


Generated result examples

Input: original product photo
source-flatlay.jpg — flat-lay photo of an army-green cable-knit sweater (random wrinkles on the sleeves and body, not fully left-right symmetrical), 800×800

Actually executed command (flat-lay retouching + material enhancement):

dlazy gpt-image-2 \
  --prompt 'Studio retouch of a flat-lay garment photo. Clean up this olive-green cable-knit sweater to catalog standard: press out the random wrinkles and creases in the body and sleeves, straighten and symmetrise the silhouette, square the shoulders, align both sleeves evenly, tidy the collar and hem, and even out the lighting so there is no hot spot or colour cast. Keep the cable-knit and diamond stitch pattern, the exact olive-green colour, the ribbed collar/cuffs/hem and the woven cuff label unchanged and sharper than before. Pure white seamless background with a subtle soft contact shadow. Photorealistic, print-ready, no text, no watermark.' \
  --images docs/item-repair/source-flatlay.jpg \
  --size 1024x1024 --quality high --imageFormat jpeg \
  --save docs/item-repair/example-output.jpg

Output

example-output.jpg — 1024×1024, 60 credits. Random wrinkles flattened, shoulder lines squared, both sleeves aligned in length and angle, hem ribbing flat, lighting even with no highlight spots; the cable and diamond knit patterns, army-green color, ribbed structure, and right-sleeve woven label preserved and clearer than in the original, background purified to a white background with a soft contact shadow.


1. Capability boundaries

Template What it does
Flat-lay retouching Flatten, left-right symmetry, squared shoulder lines, sleeve length alignment, wrinkle removal, even lighting, clean background
Garment de-wrinkling Only flattens random wrinkles and creases, preserves structural folds (pleats, drawstrings, drape)
General retouching Remove clutter from the frame, even out lighting, purify the background, improve clarity (also applies to non-garment categories)
Custom Describe yourself what to retouch
Additional Notes
Multi-image input 1-4 images of the same product; the model combines multi-angle information to understand the structure
Material enhancement Toggle; when enabled, surface texture becomes clearer (equivalent to --quality high)

Does not do: does not change style, color, pattern, hardware, or structure; does not flatten structural folds (pleats, drawstrings, ruffles); not for turning a defective product photo into a flawless one.


2. Input material rules

Self-check these hard constraints before generating:

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

Input recommendations

Practice Notes
✅ Multiple angles of the same product 1-4 images, front + back + details; the model can infer the structure more accurately
✅ Product fully in frame Parts out of frame can only be made up
✅ Lighting not too mixed Light with mixed color temperature is very hard to even out
❌ Product has obvious damage/stains Retouching should not conceal product defects
❌ Multiple different products in the same frame Only retouch one product at a time

3. How to write prompts for the four templates

Template Prompt subject
Flat-lay retouching Press out the random wrinkles and creases, straighten and symmetrise the silhouette, square the shoulders, align both sleeves evenly, tidy the collar and hem, and even out the lighting so there is no hot spot or colour cast.
Garment de-wrinkling Remove only the random wrinkles and packing creases. Preserve every structural fold — pleats, gathers, drawstring ruching and intentional drape must stay exactly as they are.
General Retouch Remove stray objects, dust and reflections from the frame, even out the lighting, purify the background to a clean seamless [颜色], and raise overall clarity.
Custom Write your own; it's recommended to keep the fidelity sentence below

Fidelity sentence (required for all four templates):

Keep the [款式/图案/五金/结构] and the exact [颜色] unchanged and sharper than before.

Background sentence:Pure white seamless background with a subtle soft contact shadow.

The key distinction for wrinkle removal: You must clearly state "structural folds must not be altered," otherwise pleated skirts will be flattened into a flat sheet.


4. Tool invocation

This skill uses dLazy's gpt-image-2(image editing model + --quality high; the retouch requires "zero change to structure and color, rearrangement of placement and lighting," and supports passing 1-4 multi-view images of the same product at once).

Invocation method

Two equivalent ways of writing 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 item-repair \
  --prompt '<见下方 Prompt 模板>' \
  --images <按下表顺序> \
  --save output/item-repair-<sku>.jpg

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

Parameter conventions (fixed usage for this skill)

Parameter Value Reason
--images [图1] ~ [图1, 图2, 图3, 图4](multiple views of the same product) Corresponds to the original site's "1-4 images of the same product"
--size 1024x1024(flat-lay square image) / 1024x1536(long vertical format) Flat-lay main images are usually square
--quality high(equivalent to "material enhancement" enabled) The value of retouching lies in the details
--imageFormat jpeg General format
--batch 2 Symmetrization results are random
--save docs/item-repair/output-<sku>-retouched.jpg Archive separately from the original image

Command Examples

# basic call: 平铺图精修
dlazy gpt-image-2 \
  --prompt 'Studio retouch of a flat-lay garment photo. Press out the random wrinkles and creases, straighten and symmetrise the silhouette, square the shoulders, align both sleeves evenly, tidy the collar and hem, and even out the lighting. Keep the pattern, colour, ribbing and label unchanged and sharper than before. Pure white seamless background with a subtle soft contact shadow. No text.' \
  --images docs/item-repair/source-flatlay.jpg \
  --size 1024x1024 --quality high

# complex call: 同一商品 4 个视角一起传 + 服装去皱(保留结构褶)
dlazy gpt-image-2 \
  --prompt 'Studio retouch of a garment photo. Images 1-4 are the same product from different angles; use them together to understand the construction. Remove only the random wrinkles and packing creases from the main view. Preserve every structural fold — pleats, gathers, drawstring ruching and intentional drape must stay exactly as they are. Keep the style, colour, print placement, hardware and stitching unchanged and sharper than before. Even out the lighting with no hot spot or colour cast. Pure white seamless background with a subtle soft contact shadow. Photorealistic, print-ready, no text, no watermark.' \
  --images docs/item-repair/v1.jpg docs/item-repair/v2.jpg docs/item-repair/v3.jpg docs/item-repair/v4.jpg \
  --size 1024x1024 --quality high --imageFormat jpeg \
  --batch 2 --save docs/item-repair/output-sku001-retouched.jpg

# 批量精修仓库拍摄的平铺图
for f in docs/item-repair/raw/*.jpg; do
  dlazy gpt-image-2 \
    --prompt 'Studio retouch of a flat-lay garment photo. Press out random wrinkles, symmetrise the silhouette, square the shoulders, align both sleeves, tidy collar and hem, even out the lighting. Keep the pattern, colour, hardware and structure unchanged and sharper than before. Pure white seamless background with a subtle soft contact shadow. Photorealistic, print-ready, no text.' \
    --images "$f" --size 1024x1024 --quality high --imageFormat jpeg \
    --save "docs/item-repair/retouched/$(basename $f)"
done

# 先估价不真跑
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

Studio retouch of a [品类] product photo.
[多图时:Images 1-N are the same product from different angles; use them together
to understand the construction.]

[从第三节选一个模板的 prompt 主体]

Keep the [款式/图案/五金/结构] and the exact [颜色] unchanged and sharper than before.

Pure white seamless background with a subtle soft contact shadow.
Photorealistic, print-ready, no text, no watermark.

Correction sentences appended by issue

Issue Append to the end of the prompt
Structural folds were flattened Do not flatten structural folds: [褶裥/抽绳/荷叶边] must remain fully three-dimensional.
It was modified into a different style The silhouette, seam lines and hardware positions must match the source exactly.
Background was not purified The background must be a single flat [颜色] with no gradient, texture or vignette.
The product was skin-smoothed Preserve fabric micro-texture; do not smooth the surface into plastic.
Over-symmetrized, deformed Symmetrise only the layout, not the garment proportions.
Defects were erased Do not remove holes, stains or damage — only fix wrinkles, layout and lighting.

6. Execution process

  1. Choose a template(Section 3): flat-lay retouch / wrinkle removal only / general retouch / custom.
  2. For multiple views, pass them together: up to 4 images of the same product; the model can understand the structure more accurately.
  3. Write the fidelity sentence + background sentence; if the product has structural folds, be sure to add the "must not flatten" sentence.
  4. --quality high → --batch 2 Select an image, write to disk to docs/item-repair/。
  5. Compare side by side with the original image: whether structural folds are still there, whether hardware positions have not moved, whether it has been skin-smoothed, whether product defects have been improperly erased.
  6. When fabric texture needs further enhancement, connect to material-enhancement。

7. Frequently asked questions

Symptom Cause Handling
Pleats/drawstrings were flattened Structural folds were not distinguished Append a sentence prohibiting flattening of structural folds
It was modified into another style Structure was not locked Append a sentence aligning contours/stitching/hardware positions
The surface was skin-smoothed into plastic Over-smoothing Append a sentence preserving micro-texture;--quality high
The background still has gradients Solid color was not required Append a single-color background sentence
Symmetrization narrowed the fit Excessive symmetry Add the sentence "only symmetrize the layout, do not change the proportions"
The product's damage was erased Improper retouching Add the sentence prohibiting erasing defects—this is a compliance red line

Tips

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