<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: xiaodong Zhang</title>
    <description>The latest articles on DEV Community by xiaodong Zhang (@xiaodong_zhang_bd8dc835b3).</description>
    <link>https://dev.to/xiaodong_zhang_bd8dc835b3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4066951%2F1b53d76c-ae38-4208-ae6d-fff1cecaf85e.png</url>
      <title>DEV Community: xiaodong Zhang</title>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xiaodong_zhang_bd8dc835b3"/>
    <language>en</language>
    <item>
      <title>Geometry Locked, Material Variable: Building a Fabric-Swap Workflow for Garment Images</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Wed, 26 Aug 2026 08:16:53 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/geometry-locked-material-variable-building-a-fabric-swap-workflow-for-garment-images-5jl</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/geometry-locked-material-variable-building-a-fabric-swap-workflow-for-garment-images-5jl</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxbvum7mzkc0dtbecoxej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxbvum7mzkc0dtbecoxej.png" alt=" " width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
Changing a garment's fabric sounds like a simple image-editing request: “make this sweater silk.” In practice, it is a constrained transformation with two competing requirements:&lt;br&gt;
1.the garment geometry must remain stable;&lt;br&gt;
2.the surface appearance and fold behavior must change enough to communicate a different material.&lt;br&gt;
The open-source fabric-on-body skill turns that tension into an Agent workflow. It takes a garment style image and a fabric swatch, then instructs an image-editing model to render a visual preview of the same design in the new material.&lt;br&gt;
This is not virtual try-on, and it is not a cloth simulator. Its useful role is narrower: helping a team compare material directions before committing to physical samples.&lt;br&gt;
Model the task as invariants and variables&lt;br&gt;
A useful mental model is:&lt;br&gt;
preview = locked_geometry(style_reference)&lt;br&gt;
        + variable_material_appearance(fabric_swatch)&lt;/p&gt;

&lt;p&gt;The style reference should control the invariants:&lt;br&gt;
•silhouette and cut;&lt;br&gt;
•body and sleeve length;&lt;br&gt;
•neckline, cuffs, and hem construction;&lt;br&gt;
•seam placement;&lt;br&gt;
•camera angle, crop, and layout.&lt;br&gt;
The swatch should control the variables:&lt;br&gt;
•color and weave;&lt;br&gt;
•reflectance and surface sheen;&lt;br&gt;
•apparent thickness;&lt;br&gt;
•drape stiffness;&lt;br&gt;
•fold frequency and radius;&lt;br&gt;
•transparency or pile.&lt;br&gt;
If a prompt says only “replace the knit with silk,” the model still has to guess which pixels may move and what “silk” should look like under the scene lighting. The skill therefore adds an explicit geometry lock:&lt;br&gt;
Keep the pattern identical: same cut, same body length, same sleeve length,&lt;br&gt;
same collar/cuff/hem construction, same seam positions, layout and camera angle.&lt;br&gt;
Replace only the material.&lt;/p&gt;

&lt;p&gt;That sentence is not a geometric guarantee. It is a constraint expressed in natural language. A probabilistic image editor can still drift, so the workflow needs multiple candidates and a validation pass.&lt;br&gt;
Translate material names into visible behavior&lt;br&gt;
The strongest part of the skill is its material vocabulary. A model cannot touch a swatch or measure its tensile properties. It can only infer visible evidence. Good prompts convert a material label into renderable features.&lt;br&gt;
Material    Visible prompt attributes&lt;br&gt;
Silk or satin   Specular highlights along folds, fluid drape, continuous gradients&lt;br&gt;
Chunky knit Visible yarn twist, matte fibre halo, heavy structured drape&lt;br&gt;
Denim   Diagonal twill, subtle slub, stiff drape, sharp fold creases&lt;br&gt;
Corduroy    Vertical wales, matte pile, medium-stiff drape&lt;br&gt;
Chiffon Semi-transparency, fine ripples, soft transmitted light&lt;br&gt;
Leather Broad low-frequency sheen, grain, stiff drape, wide creases&lt;br&gt;
Fleece  Dense short pile, fuzzy silhouette edge, little specular highlight&lt;/p&gt;

&lt;p&gt;This suggests a general prompt-engineering rule: when a request contains a category label, expand it into observable attributes. “Silk” is semantic. “Narrow specular highlights on fold peaks with a fluid drape” is visual.&lt;br&gt;
A minimal execution pattern&lt;br&gt;
The skill uses the dLazy CLI and calls its hosted gpt-image-2 tool. The repository recommends installing skills through the skills CLI:&lt;br&gt;
npx skills add &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;https://github.com/dlazyai/ecommerce-skills&lt;/a&gt; --list&lt;br&gt;
npx skills add &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;https://github.com/dlazyai/ecommerce-skills&lt;/a&gt; \&lt;br&gt;
  --skill fabric-on-body&lt;/p&gt;

&lt;p&gt;The Vercel skills CLI documents support for Codex, Claude Code, Cursor, and other agents. After installation, verify that your agent actually discovers the skill. The source repository uses a lowercase skill.md, while the published Agent Skills specification defines the canonical file as uppercase SKILL.md; the repository's ClawHub publishing flow explicitly renames it. That distinction can matter on case-sensitive systems.&lt;br&gt;
A reduced generation call looks like this:&lt;br&gt;
dlazy gpt-image-2 \&lt;br&gt;
  --prompt 'Fabric replacement. Image 1 is the garment pattern reference. \&lt;br&gt;
Image 2 is the target fabric. Keep the pattern identical: same cut, body \&lt;br&gt;
length, sleeve length, collar/cuff/hem construction, seam positions, layout \&lt;br&gt;
and camera angle. Replace only the material. Render the target fabric through \&lt;br&gt;
its visible weave, reflectance, drape stiffness and fold behavior. Neutral \&lt;br&gt;
studio light, clean background, no text.' \&lt;br&gt;
  --images style-sheet.jpg fabric-swatch.jpg \&lt;br&gt;
  --size 1024x1024 \&lt;br&gt;
  --quality high \&lt;br&gt;
  --imageFormat jpeg \&lt;br&gt;
  --batch 2 \&lt;br&gt;
  --save output-style-fabric.jpg&lt;/p&gt;

&lt;p&gt;Use --dry-run before a paid request. Prices, model availability, and latency are service state, not constants; inspect the current response rather than relying on numbers copied from an article.&lt;br&gt;
Input quality is part of the algorithm&lt;br&gt;
The skill's documented input constraints are 20 KB–15 MB, dimensions above 400×400, and JPG/JPEG/PNG/WebP. More important than those mechanical limits is image quality.&lt;br&gt;
For the style image:&lt;br&gt;
•use a front-facing flat lay or mannequin image;&lt;br&gt;
•keep the silhouette fully visible;&lt;br&gt;
•prefer a plain background;&lt;br&gt;
•avoid complex prints when evaluating a new material.&lt;br&gt;
For the swatch:&lt;br&gt;
•shoot close enough to resolve the weave;&lt;br&gt;
•use neutral light to avoid a color cast;&lt;br&gt;
•include a gentle fold when drape matters;&lt;br&gt;
•avoid environmental reflections that the model may interpret as material color.&lt;br&gt;
Bad input does not merely produce a lower-resolution version of the right answer. It changes the inferred task. A distant swatch may collapse into a color chip. A warm-lit white fabric may become beige. A heavily printed style reference may compete with the requested surface.&lt;br&gt;
Validate with measurable checks&lt;br&gt;
Do not approve the output because it “looks realistic.” Compare it against both inputs.&lt;br&gt;
Geometry check&lt;br&gt;
•Is the silhouette aligned with the style reference?&lt;br&gt;
•Are body length, sleeve length, and proportions unchanged?&lt;br&gt;
•Are the neckline, cuffs, hem, seams, and closures still present?&lt;br&gt;
•Did the crop or camera angle move?&lt;br&gt;
Material check&lt;br&gt;
•Does the hue match a neutrally lit swatch?&lt;br&gt;
•Is the original texture fully removed?&lt;br&gt;
•Are weave scale and directional texture plausible?&lt;br&gt;
•Do highlights match the target reflectance?&lt;br&gt;
•Are folds consistent with the intended stiffness?&lt;br&gt;
Manufacturing plausibility check&lt;br&gt;
•Is this fabric plausible for the design and construction?&lt;br&gt;
•Did the model preserve ribbing or seams in a way that can actually be made?&lt;br&gt;
•Is the image being used only for directional review, not as evidence of physical performance?&lt;br&gt;
The final check is the most important. A photorealistic image can be physically wrong with great confidence.&lt;br&gt;
Failure modes are more useful than a perfect demo&lt;br&gt;
The source skill documents several predictable failures:&lt;br&gt;
•silhouette drift when geometry is under-specified;&lt;br&gt;
•color shift caused by the swatch lighting;&lt;br&gt;
•the original texture surviving under the new texture;&lt;br&gt;
•paper-like folds when drape stiffness is missing;&lt;br&gt;
•lost ribbing, topstitching, or zippers;&lt;br&gt;
•physically incompatible fabric/design combinations.&lt;br&gt;
Each failure should be treated as a test case. For example, a regression set could pair the same style reference with satin, denim, corduroy, and chiffon. Instead of evaluating “beauty,” record whether each candidate passes explicit geometry and material checks.&lt;br&gt;
Data flow and operational boundaries&lt;br&gt;
The skill discloses that prompts and parameters go to api.dlazy.com, local assets are uploaded to files.dlazy.com, and generated results are hosted there. That is a normal hosted-generation architecture, but it matters for unreleased collections, supplier materials, and NDA-protected designs.&lt;br&gt;
Before using it in a company workflow, verify:&lt;br&gt;
•who may upload the source designs;&lt;br&gt;
•the service's current storage and retention terms;&lt;br&gt;
•whether generated assets can enter your product lifecycle system;&lt;br&gt;
•who signs off on visual accuracy;&lt;br&gt;
•when a physical sample becomes mandatory.&lt;br&gt;
The skill file is instructions, not a local model. Installing it does not remove the hosted API dependency.&lt;br&gt;
The right KPI: fewer bad sampling decisions&lt;br&gt;
It is tempting to market this as “replace physical sampling.” That is the wrong claim and the wrong metric. A fabric photo does not encode hand feel, stretch recovery, shrinkage, sewing behavior, abrasion, or production tolerances.&lt;br&gt;
A more defensible KPI is the percentage of weak material directions rejected before physical sampling. If a team uses visual previews to narrow eight ideas to three, then samples those three and measures real performance, the AI has compressed the decision loop without pretending to simulate the factory.&lt;br&gt;
That is where fabric-on-body is most interesting: not as a magic image prompt, but as a small, auditable operating procedure around a probabilistic model.&lt;br&gt;
Next steps&lt;br&gt;
If you evaluate the skill, start with one clean style image and four materials with visibly different behavior. Run multiple candidates, score them against the same checklist, and keep the physical sample as the source of truth.&lt;br&gt;
Would you trust a geometry-locked visual preview for internal material selection? Which measurement would you require before putting it into a production workflow?&lt;br&gt;
Suggested cover prompt&lt;br&gt;
Editorial technical illustration for a developer article. A flat-lay garment silhouette is locked by precise cyan geometry guides while its surface transitions across satin, denim, corduroy and chiffon quadrants. On the left, a clean garment style reference; on the right, macro fabric swatches; in the center, an AI transformation pipeline. Dark neutral background, crisp diagrammatic lighting, realistic textile detail, no logos, no text, 16:9.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The hardest part of AI garment extraction is the shoulder you never saw</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Wed, 26 Aug 2026 05:25:43 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/the-hardest-part-of-ai-garment-extraction-is-the-shoulder-you-never-saw-4hgg</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/the-hardest-part-of-ai-garment-extraction-is-the-shoulder-you-never-saw-4hgg</guid>
      <description>&lt;p&gt;This article was written with the help of AI. The spec analysis is mine, and every command below was run on my own machine before publishing.&lt;/p&gt;

&lt;p&gt;The problem&lt;/p&gt;

&lt;p&gt;图 1 · 输入与输出（示例来自仓库 docs/clothing-extraction/）&lt;br&gt;
You have 140 SKUs going live next week. What you have is supplier photos and on-model shots. What the listing needs is flat-lays: garment laid out, centred, front-facing, symmetric, no human in frame.&lt;br&gt;
The classic answer is a photographer and a retoucher. The other classic answer is your designer spending twenty minutes per item in Photoshop, most of it not removing the model but inventing the parts of the garment the model was standing in front of.&lt;br&gt;
That second half is the interesting problem, and it's the one most "AI background remover" tools don't touch at all.&lt;br&gt;
TL;DR&lt;br&gt;
• clothing-extraction is a skill spec (a Markdown file an agent reads) from &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;dlazyai/ecommerce-skills&lt;/a&gt;, MIT licensed&lt;br&gt;
• It fixes the extraction prompt into four segments, and the doc is explicit that segment two — the deletion list — must name every element individually&lt;br&gt;
• It runs gpt-image-2 with --size 1024x1024 --quality high --batch 2~3&lt;br&gt;
• The batch 2~3 is the tell: this is a generate-several-pick-one workflow, not a one-shot converter&lt;br&gt;
• The occluded regions are inferred from symmetry and standard patterns, not recovered. Plan a human review step&lt;br&gt;
Install&lt;/p&gt;

&lt;h1&gt;
  
  
  everything in the repo (19 skills)
&lt;/h1&gt;

&lt;p&gt;npx skills add &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;https://github.com/dlazyai/ecommerce-skills&lt;/a&gt; --all&lt;/p&gt;

&lt;h1&gt;
  
  
  or just what you need
&lt;/h1&gt;

&lt;p&gt;npx skills add &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;https://github.com/dlazyai/ecommerce-skills&lt;/a&gt; \&lt;br&gt;
  --skill clothing-extraction&lt;/p&gt;

&lt;h1&gt;
  
  
  or scope it to one agent
&lt;/h1&gt;

&lt;p&gt;npx skills add &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;https://github.com/dlazyai/ecommerce-skills&lt;/a&gt; --agent claude-code&lt;/p&gt;

&lt;p&gt;The skill shells out to the dLazy CLI, pinned to @dlazy/&lt;a href="mailto:cli@1.2.3"&gt;cli@1.2.3&lt;/a&gt;. Auth is a device-code flow that works over SSH:&lt;br&gt;
dlazy login          # device-code flow, writes ~/.dlazy/config.json&lt;/p&gt;

&lt;h1&gt;
  
  
  or
&lt;/h1&gt;

&lt;p&gt;dlazy auth set YOUR_API_KEY&lt;/p&gt;

&lt;h1&gt;
  
  
  or per-invocation
&lt;/h1&gt;

&lt;p&gt;DLAZY_API_KEY=... dlazy gpt-image-2 ...&lt;/p&gt;

&lt;p&gt;You can also skip the installer entirely and paste the contents of skill.md into an agent conversation. It's a spec, not a binary.&lt;br&gt;
The actual call, straight from the doc:&lt;br&gt;
dlazy gpt-image-2 \&lt;br&gt;
  --prompt '' \&lt;br&gt;
  --images docs/clothing-extraction/source-photo.jpg \&lt;br&gt;
  --size 1024x1024 --quality high --imageFormat png \&lt;br&gt;
  --batch 2 \&lt;br&gt;
  --save docs/clothing-extraction/output-dress.png&lt;/p&gt;

&lt;p&gt;--dry-run prints the payload and the cost without executing. Use it first.&lt;br&gt;
How the prompt is structured&lt;/p&gt;

&lt;p&gt;图 2 · 四段式提取指令&lt;br&gt;
This is the part worth stealing even if you never install the skill.&lt;br&gt;
Segment Job&lt;br&gt;
1   Name the single target garment, with enough detail to disambiguate it&lt;br&gt;
2   List every element to remove, one by one&lt;br&gt;
3   State the output form: laid flat, centred, front view, left-right symmetric, unoccluded&lt;br&gt;
4   State the fidelity constraints: same colour, same knit texture, same neckline and armhole shape, same waist seam and hem length&lt;/p&gt;

&lt;p&gt;Written out, a segment-two list for a street-style shot looks roughly like this:&lt;br&gt;
[Segment 1 · target]  Output only [the single item to keep: category + colour + key features].&lt;br&gt;
[Segment 2 · remove]  Remove the model, [every other element in frame: accessories/bag/shoes/props/background].&lt;br&gt;
[Segment 3 · form]    Laid flat and centred, front view, symmetric, fully unoccluded.&lt;br&gt;
[Segment 4 · fidelity] Keep the garment 100% faithful: same [colour], [knit/fabric],&lt;br&gt;
                       [neckline and sleeve], [waist seam and hem length].&lt;/p&gt;

&lt;p&gt;Filled in against the example image that ships with the skill — a street shot of a model in a light-grey knit mini dress, wearing a pearl necklace, carrying a tote bag, in silver heels, with a fountain behind her:&lt;br&gt;
Output only the light-grey textured sleeveless knit mini dress with the mock neckline,&lt;br&gt;
laid flat and centred, front view, symmetric, fully unoccluded — remove the model,&lt;br&gt;
the pearl necklace, the tote bag, the shoes, the fountain and the whole background.&lt;br&gt;
Keep the garment 100% faithful: same light-grey colour, same knit texture,&lt;br&gt;
same neckline and armhole shape, same waist seam and hem length.&lt;br&gt;
Pure white seamless background, even soft studio light, subtle contact shadow.&lt;br&gt;
No person, no props, no text.&lt;/p&gt;

&lt;p&gt;Every removal target is a noun the model can act on. "Remove everything except the dress" is not — it hands the disambiguation problem back to the model, and the model makes a choice you never get to see.&lt;br&gt;
The doc is blunt about this: write only &lt;code&gt;remove the background&lt;/code&gt; and the necklace, bag and shoes stay in frame as part of the product.&lt;br&gt;
For a full outfit, you loop: one pass per garment, one flat-lay out per pass.&lt;br&gt;
Why segment two is the load-bearing one&lt;br&gt;
Here is the argument for the sceptical reader, because there is a good sceptical reading here.&lt;br&gt;
The obvious objection: this is just a prompt. When the next model ships, the prompt is obsolete, and maybe today's model doesn't need this much hand-holding anyway.&lt;br&gt;
Half right. Segments three and four are model-dependent — they're compensating for current failure tendencies, and a better model needs less of them.&lt;br&gt;
Segment two is not. Segment two solves referential ambiguity, and that isn't a capability problem, it's a language problem. Any time the input frame contains more than one object, someone has to say which one survives. A stronger model guesses better. It still guesses.&lt;br&gt;
That's why the deletion list is the part of this spec I'd expect to still be true in two years.&lt;br&gt;
Input constraints&lt;br&gt;
Straight from the spec:&lt;br&gt;
Constraint  Value&lt;br&gt;
File size   20 KB – 15 MB&lt;br&gt;
Resolution  &amp;gt; 400 × 400&lt;br&gt;
Formats jpg / jpeg / png / webp&lt;/p&gt;

&lt;p&gt;Plus three soft requirements that matter more than the hard ones: the garment should occupy a large share of the frame, the angle should be front-on or slightly off-axis, and the lighting should be even.&lt;br&gt;
Also useful: the repo's CLI supports --dry-run for a cost estimate before you commit, and per-image cost lands somewhere in the 3–60 credit range depending on model and quality tier.&lt;br&gt;
The repair table is the other thing worth stealing&lt;/p&gt;

&lt;p&gt;图 3 · 症状 → 追加句&lt;br&gt;
The spec ships a lookup table mapping each failure symptom to a sentence you append to the prompt. This is the part that turns a prompt into a debuggable artifact:&lt;br&gt;
Symptom Append to the prompt&lt;br&gt;
Accessories survived    Nothing but the garment may remain in the frame.&lt;br&gt;
Output still has body volume    The garment must be laid completely flat — no body volume, no invisible mannequin effect.&lt;br&gt;
Sleeves don't match Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.&lt;br&gt;
Print got rearranged    Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.&lt;br&gt;
Colour drifted brighter Sample the colour from the source photo under neutral light; do not brighten or saturate.&lt;/p&gt;

&lt;p&gt;Note what these have in common: every one is a constraint you forgot to state, not a model failure. That framing is doing real work.&lt;br&gt;
What went wrong&lt;br&gt;
[需人工补：把下面三条换成你自己跑出来的报错和修法，附截图。Dev.to 的信任度全在这一节。]&lt;br&gt;
Three failure modes the spec itself flags, which map cleanly onto what you should be watching for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Occlusion is inference, not recovery. Arms crossed, hand in pocket, a tote bag across the hip — the model returns a plausible standard-pattern seam. Plausible is not the same as correct. The spec says this itself, in its own input-rules table: occluded regions are inferred, not recovered, and need human confirmation when a key design feature is behind the obstruction. That's a fairly honest thing for a tool's docs to admit.&lt;/li&gt;
&lt;li&gt;Prints don't survive reconstruction cleanly. When a pattern crosses a seam, the reconstructed flat-lay tends to shift it. "Pattern position accurate" is in the QA checklist for a reason. Graphic tees and placement prints are where you'll spend your review time.&lt;/li&gt;
&lt;li&gt;"Symmetric" fights asymmetric design. Segment three asks for left-right symmetry. Wrap fronts, one-shoulder cuts, layered hems and sheer panels all disagree with that instruction, and the model resolves the conflict in favour of the instruction. For those pieces, rewrite segment three rather than accepting the default.&lt;/li&gt;
&lt;li&gt;A full outfit is N runs, not one. The doc is explicit — one garment per pass, segment one names it, segment two lists everything else including the other garments. Asking for the dress, the bag and the shoes in a single call does not work.
When not to use this&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;图 4 · 执行流程&lt;br&gt;
• As-is on a listing's hero image. In most jurisdictions, advertising law expects product imagery to represent the actual product. A seam the model invented is not the product. Treat these as supporting images or as a base for retouching, and keep a real photo as the hero.&lt;br&gt;
• Stripping someone else's branding. The spec draws this line itself, in its own "does not do" list: not for erasing another brand's marks and passing the garment off as your own. Worth repeating because the competitor-screenshot use case makes it very easy to drift there.&lt;br&gt;
• Complex construction. Pleating, draping, transparency, heavy texture layering — the reconstruction step is where these lose their identity.&lt;br&gt;
• Anything you won't review. The batch 2~3 default exists because you're expected to look at the candidates and choose. A pipeline that auto-publishes the first result is using this wrong.&lt;br&gt;
Wrap-up&lt;br&gt;
The reusable idea here is not the model choice. It's that a working image-editing prompt has four jobs — keep this, delete these, output in this form, preserve these properties — that the deletion list is the one that has to be exhaustive, and that every recurring failure gets its own append-this sentence rather than a rewrite.&lt;br&gt;
Worth noting the skill is the exact inverse of another one in the same repo, flat-lay, which goes from flat-lay to on-model. Same four-segment shape, opposite direction. That symmetry is a decent sign the structure generalises.&lt;br&gt;
One caveat on maturity: the repo is MIT licensed with 19 skills covering the whole chain from flat-lay through on-model to pre-launch QA, but it's sitting at 2 stars as of August 2026. This is early software. Read the spec, steal the structure, don't assume it's battle-tested.&lt;br&gt;
Question for anyone who's done this at volume: how do you handle placement prints? I haven't found a segment-four phrasing that reliably pins a graphic to its original position across a seam, and I'd rather learn yours than keep guessing.&lt;/p&gt;

&lt;p&gt;Disclosure: I work on dLazy, which is the CLI this skill calls. This post is about the prompt structure, not the product. Repo: &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;https://github.com/dlazyai/ecommerce-skills&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Two prompt rules that sound like superstition. I A/B tested both — they hold</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 08:10:47 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/two-prompt-rules-that-sound-like-superstition-i-ab-tested-both-they-hold-5661</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/two-prompt-rules-that-sound-like-superstition-i-ab-tested-both-they-hold-5661</guid>
      <description>&lt;p&gt;Prompt engineering advice has a credibility problem. A lot of it is folklore that gets repeated because it sounds plausible, and almost nobody publishes the control run.&lt;/p&gt;

&lt;p&gt;So when I hit a skill whose troubleshooting table made two specific, testable claims, I ran both.&lt;/p&gt;

&lt;p&gt;Both held. Here is the data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;The skill is &lt;code&gt;creative-scene&lt;/code&gt; from an MIT-licensed e-commerce library. It is pure text-to-image — no source asset required, which makes it unusually clean for controlled testing since there is no input image to confound the result.&lt;/p&gt;

&lt;p&gt;Model is &lt;code&gt;banana-pro&lt;/code&gt;, 18 credits per image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlazy banana-pro &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--aspectRatio&lt;/span&gt; 3:4 &lt;span class="nt"&gt;--imageSize&lt;/span&gt; 2K &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--save&lt;/span&gt; out.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Its prompt structure is a five-slot formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[person], wearing [clothing], in [scene], [framing], [mood/grade]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Person, clothing, scene, framing, mood. Fill whichever are missing. Append &lt;code&gt;photorealistic&lt;/code&gt;, some lens language, &lt;code&gt;no text, no watermark&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That structure is what makes the tests below possible — you can hold four slots constant and move exactly one thing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Test 1: does framing-term position matter?
&lt;/h2&gt;

&lt;p&gt;The claim, from row one of the troubleshooting table:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Half-body result when you asked for full-body → the framing term was placed too late in the sentence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This sounds like superstition. Token order affecting composition in a diffusion-adjacent pipeline is plausible in principle, but "move the word earlier" is exactly the kind of advice that propagates without evidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Control — framing term at the end:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A young Asian woman wearing a flowing red silk maxi dress standing in a
minimalist concrete gallery space, soft diffused daylight, neutral colour
grading, photorealistic, shot on 85mm, full-body framing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Variant — framing term at the front:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Full-body framing, head to feet fully in frame. A young Asian woman wearing
a flowing red silk maxi dress, standing in a minimalist concrete gallery
space, soft diffused daylight, neutral colour grading, photorealistic,
shot on 85mm.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same subject, same garment, same scene, same lighting, same lens language. Same &lt;code&gt;--aspectRatio 3:4 --imageSize 1K&lt;/code&gt;. The only difference is where those words sit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Control → cropped above the knees. Half-body.&lt;/li&gt;
&lt;li&gt;Variant → complete figure, head to feet in frame.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule is real. Move your framing term to the front and add &lt;code&gt;head to feet fully in frame&lt;/code&gt; as a belt-and-braces clause.&lt;/p&gt;




&lt;h2&gt;
  
  
  Test 2: how much do realism clauses actually buy?
&lt;/h2&gt;

&lt;p&gt;Row two of the same table:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Looks like an illustration or CG → no realism constraint in the prompt.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Control — bare:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A young Asian woman wearing a burgundy velvet slip dress, standing in a
dimly lit jazz bar with warm amber lighting, half-body front view.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Variant — same, plus realism clauses:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;... half-body front view, photorealistic photograph, real velvet fabric
texture with visible pile direction, natural skin pores and fine facial
detail, no illustration, no CGI, shot on 85mm, shallow depth of field,
no text, no watermark.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; clear separation. The control has the over-smoothed, waxy skin that reads as rendered. The variant resolves velvet pile direction, visible skin pores, individual hair strands.&lt;/p&gt;

&lt;p&gt;Worth noting &lt;em&gt;which&lt;/em&gt; clauses seem to do the work. &lt;code&gt;photorealistic&lt;/code&gt; alone is weak — it is a style label the model can interpret loosely. The clauses that bite are the ones naming a &lt;strong&gt;physical property that only exists in photographs&lt;/strong&gt;: &lt;code&gt;visible pile direction&lt;/code&gt;, &lt;code&gt;natural skin pores&lt;/code&gt;. Those are hard to fake with a smooth render.&lt;/p&gt;

&lt;p&gt;The negative constraints (&lt;code&gt;no illustration, no CGI&lt;/code&gt;) are cheap to include and appear to help, though I did not isolate them separately.&lt;/p&gt;




&lt;h2&gt;
  
  
  The chained-edit pattern
&lt;/h2&gt;

&lt;p&gt;Separate from the two tests, this skill ships targeted-edit templates — swap model, swap pose, swap outfit — and they share one structural rule worth stealing regardless of which tool you use:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Every template ends with a "keep the rest unchanged" clause.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For successive edits, you feed each output into the next call's &lt;code&gt;--images&lt;/code&gt; and change exactly one dimension per step. I ran a three-step chain from one base image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Step 1 — pose only&lt;/span&gt;
dlazy banana-pro &lt;span class="nt"&gt;--images&lt;/span&gt; base.jpg &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"Change the pose to side-standing with the torso twisted and hands
  behind the back, keeping identical camera angle, facial structure, skin tone
  and body type, and the same clothing, scene and lighting."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--aspectRatio&lt;/span&gt; 3:4 &lt;span class="nt"&gt;--imageSize&lt;/span&gt; 2K &lt;span class="nt"&gt;--save&lt;/span&gt; edit1-pose.jpg

&lt;span class="c"&gt;# Step 2 — top only, fed from step 1&lt;/span&gt;
dlazy banana-pro &lt;span class="nt"&gt;--images&lt;/span&gt; edit1-pose.jpg &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"Change the model's top to a black turtleneck slim-fit base layer,
  keeping everything else exactly the same — face, hairstyle, skin tone, body
  type, pose, camera angle, cafe background, lighting and colour grading."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--aspectRatio&lt;/span&gt; 3:4 &lt;span class="nt"&gt;--imageSize&lt;/span&gt; 2K &lt;span class="nt"&gt;--save&lt;/span&gt; edit2-outfit.jpg

&lt;span class="c"&gt;# Step 3 — hair only, fed from step 2&lt;/span&gt;
dlazy banana-pro &lt;span class="nt"&gt;--images&lt;/span&gt; edit2-outfit.jpg &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"Change the hairstyle to a low ponytail, keeping the person's
  identity, facial features, expression, pose, clothing, background and
  lighting completely unchanged."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--aspectRatio&lt;/span&gt; 3:4 &lt;span class="nt"&gt;--imageSize&lt;/span&gt; 2K &lt;span class="nt"&gt;--save&lt;/span&gt; edit3-hair.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Across all three steps the person, the scene, the lighting and the grading held. Only the named dimension moved each time.&lt;/p&gt;

&lt;p&gt;The failure mode when you skip the lock clause is not subtle — the model treats the whole frame as fair game and you get a different person in a different room. Enumerating what must not move is the entire trick, and vague phrasing (&lt;code&gt;keep the rest the same&lt;/code&gt;) works noticeably worse than an itemised list.&lt;/p&gt;




&lt;h2&gt;
  
  
  Language note
&lt;/h2&gt;

&lt;p&gt;The documentation makes a claim I did not formally test but did observe informally: scene and mood descriptions work in either Chinese or English, but &lt;strong&gt;garment material and construction detail is more stable in English&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My working pattern ended up being: write scene and mood in whichever language flows, switch to English for the garment section to lock colour, fabric, cut and neckline. Anecdotal, but it matched my experience across a dozen or so generations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cost discipline
&lt;/h2&gt;

&lt;p&gt;Text-to-image is a numbers game — you improve your odds by generating more, not by agonising over the prompt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# explore&lt;/span&gt;
&lt;span class="nt"&gt;--imageSize&lt;/span&gt; 1K &lt;span class="nt"&gt;--batch&lt;/span&gt; 4

&lt;span class="c"&gt;# finalise&lt;/span&gt;
&lt;span class="nt"&gt;--imageSize&lt;/span&gt; 2K &lt;span class="nt"&gt;--batch&lt;/span&gt; 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At 18 credits per image this matters. Four 1K drafts to find the direction, then one 2K final, beats iterating at 2K and burning through your budget on rejects.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I take from this
&lt;/h2&gt;

&lt;p&gt;Two documented rules, two controlled tests, two confirmations. That is a better hit rate than I expected going in — I have tested claims from a sibling skill in the same library where the headline warning did &lt;strong&gt;not&lt;/strong&gt; reproduce.&lt;/p&gt;

&lt;p&gt;Which is the actual point. Documented prompt rules are testable. Most of them take one control run and one variant run to verify, which at 1K resolution is a rounding error in cost. If a rule matters enough that you are going to apply it to every generation for the next year, spend the 36 credits and find out whether it is real.&lt;/p&gt;




&lt;p&gt;MIT licensed, 19 skills, works with Claude Code / Codex / Cursor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/dlazyai/ecommerce-skills &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;github.com/dlazyai/ecommerce-skills&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Has anyone isolated which realism clause does the heavy lifting? My money is on the physical-property ones over &lt;code&gt;photorealistic&lt;/code&gt; itself, but I only tested them as a block.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>When the product is 5% of the frame, the prompt problem inverts</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 08:04:25 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/when-the-product-is-5-of-the-frame-the-prompt-problem-inverts-1pop</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/when-the-product-is-5-of-the-frame-the-prompt-problem-inverts-1pop</guid>
      <description>&lt;p&gt;I wrote previously about a skill that dresses a model in a flat-lay garment. Same library has a sibling for accessories — shoes, bags, watches, glasses, hats, scarves, necklaces, earrings, belts, gloves.&lt;/p&gt;

&lt;p&gt;I assumed it would be the same problem with a different noun. It is not, and the reason is worth a post.&lt;/p&gt;




&lt;h2&gt;
  
  
  The frame-share problem
&lt;/h2&gt;

&lt;p&gt;A sweater occupies most of the image. The model cannot really lose track of what the subject is.&lt;/p&gt;

&lt;p&gt;A pair of sunglasses occupies maybe &lt;strong&gt;5% of the frame&lt;/strong&gt;. At that scale the model has enormous latitude, and it uses it — tilting them, oversizing them, floating them somewhere near the face, or smearing them into the hair.&lt;/p&gt;

&lt;p&gt;So the documentation puts one sentence in bold above everything else:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The selection region is the decisive parameter.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not the model. Not the resolution. Not the quality tier. &lt;strong&gt;Where the thing goes.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Anatomy strings, not bounding boxes
&lt;/h2&gt;

&lt;p&gt;The interesting design choice is that you do not draw a box. You describe the anatomical attachment in prose, and each category has a canonical phrasing:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;The sentence&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Glasses&lt;/td&gt;
&lt;td&gt;seated on the nose bridge and hooked over both ears&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Watch&lt;/td&gt;
&lt;td&gt;on the left wrist, dial facing the camera&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Necklace&lt;/td&gt;
&lt;td&gt;clasp at the nape, pendant resting on the collarbone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Earring&lt;/td&gt;
&lt;td&gt;on the visible earlobe, at correct scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hat&lt;/td&gt;
&lt;td&gt;brim angle following the head tilt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scarf&lt;/td&gt;
&lt;td&gt;wrapped twice, fringe over the chest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shoes&lt;/td&gt;
&lt;td&gt;soles contacting the ground with correct perspective and grounded shadows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bag&lt;/td&gt;
&lt;td&gt;held in hand or on the shoulder, strap compressing the fabric&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These read like stage directions because that is effectively what they are. &lt;code&gt;soles contacting the ground with correct perspective and grounded shadows&lt;/code&gt; encodes three separate constraints — contact, perspective, and shadow — in one clause, and dropping any of them produces the classic floating-shoe artifact.&lt;/p&gt;

&lt;p&gt;Full call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlazy gpt-image-2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"On-model accessory product photography. Image 1 is a pair of
   tortoise-brown rectangular acetate sunglasses with gradient brown lens
   tint and metal hinges. Image 2 is the model and scene reference.
   Place the sunglasses from image 1 on the face of the person in image 2,
   seated on the nose bridge and hooked over both ears, with natural
   perspective matching the head angle, correct real-world scale relative
   to the face width, realistic lens reflections and a soft contact shadow.
   Preserve 100% fidelity of the frame shape, tortoise acetate grain, hinge
   and temple design, and the exact lens tint.
   Change nothing else — face, hair, coat, background, color grading and
   crop must remain identical to image 2.
   Photorealistic, no text, no watermark."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--images&lt;/span&gt; product-sunglasses.jpg model-reference.jpg &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--size&lt;/span&gt; 1024x1536 &lt;span class="nt"&gt;--quality&lt;/span&gt; high &lt;span class="nt"&gt;--batch&lt;/span&gt; 3 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--save&lt;/span&gt; out/SKU001.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The lock clause is not optional
&lt;/h2&gt;

&lt;p&gt;Note that second-to-last sentence. It is doing critical work.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Change nothing else — face, hair, clothing, background, color grading
and crop must remain identical to image 2.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because the product is tiny, the model has spare capacity and will happily spend it repainting the face. You end up with correctly-placed sunglasses on a person who is subtly not the same person.&lt;/p&gt;

&lt;p&gt;The anatomy string and the lock clause are a &lt;strong&gt;pair&lt;/strong&gt;. Ship them together every time. And when the lock fails, the fix is to stop being general — replace "everything else" with an itemised list of the specific things that must not move.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reference selection is stricter than for garments
&lt;/h2&gt;

&lt;p&gt;Three hard requirements, all more demanding than the garment equivalent:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The wearing area must be visible and unobstructed.&lt;/strong&gt; Glasses need a clear face. A watch needs a bare wrist — a shirt cuff kills it. Shoes need feet not hidden under a long skirt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The model must not already be wearing the same category.&lt;/strong&gt; Otherwise you get two pairs of sunglasses. If you cannot avoid it, add an explicit &lt;code&gt;replace the existing sunglasses&lt;/code&gt; clause.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Light direction should roughly match the product shot.&lt;/strong&gt; Metal and lenses generate reflections, and reflections lit from the wrong side read as fake immediately.&lt;/p&gt;

&lt;p&gt;I generated my reference images deliberately against these rules — a face shot specified as &lt;em&gt;no glasses, hair tucked behind the ears&lt;/em&gt;, and a wrist shot specified as &lt;em&gt;sleeve rolled up above the wrist, no watch on either wrist&lt;/em&gt;. Worth doing if you are producing references rather than sourcing them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Multi-view for complex geometry
&lt;/h2&gt;

&lt;p&gt;Simple items (glasses, necklaces) work from one view. Complex ones do not.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shoe → side profile &lt;strong&gt;plus&lt;/strong&gt; sole&lt;/li&gt;
&lt;li&gt;Bag → front &lt;strong&gt;plus&lt;/strong&gt; interior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The skill takes up to 5 reference images, so &lt;code&gt;[product-view-1, product-view-2, reference]&lt;/code&gt; maps to &lt;code&gt;image 1 / image 2 / image 3&lt;/code&gt;. Feeding a second angle is the documented fix for garbled bag interiors — the model cannot infer the inside of a bag it has only seen closed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Symptom mapping
&lt;/h2&gt;

&lt;p&gt;Same design as its sibling skill: enumerated failure modes, each with a specific append.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Append&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Glasses crooked or floating&lt;/td&gt;
&lt;td&gt;Missing anatomy string&lt;/td&gt;
&lt;td&gt;The section-3 phrase for that category&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shoes not grounded&lt;/td&gt;
&lt;td&gt;No contact clause&lt;/td&gt;
&lt;td&gt;Ground contact + grounded shadow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wrong size&lt;/td&gt;
&lt;td&gt;No scale anchor&lt;/td&gt;
&lt;td&gt;A width ratio against a body part&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Two pairs of glasses&lt;/td&gt;
&lt;td&gt;Reference already wore some&lt;/td&gt;
&lt;td&gt;&lt;code&gt;replace the existing …&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Face changed&lt;/td&gt;
&lt;td&gt;Lock clause too vague&lt;/td&gt;
&lt;td&gt;Itemise the untouchable elements&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metal looks like plastic&lt;/td&gt;
&lt;td&gt;Quality tier&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--quality medium&lt;/code&gt; → &lt;code&gt;high&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bag interior garbled&lt;/td&gt;
&lt;td&gt;Insufficient geometry&lt;/td&gt;
&lt;td&gt;Supply additional views&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;--quality&lt;/code&gt; one is worth internalising: &lt;strong&gt;use &lt;code&gt;high&lt;/code&gt; for metal, lenses and leather; &lt;code&gt;medium&lt;/code&gt; is fine for fabric accessories.&lt;/strong&gt; At 60 vs 33 credits that distinction is worth making deliberately rather than defaulting.&lt;/p&gt;




&lt;h2&gt;
  
  
  Parameters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--images&lt;/code&gt; — product first, reference last. Order maps positionally to &lt;code&gt;image N&lt;/code&gt;, silently.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--size&lt;/code&gt; — &lt;code&gt;1024x1536&lt;/code&gt; for half/full-body wear shots, &lt;code&gt;1024x1024&lt;/code&gt; for wrist or earring close-ups.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--batch 2–4&lt;/code&gt; — placement varies run to run more than it does for garments, precisely because the target region is small.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--dry-run&lt;/code&gt; — always, before a loop.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  QC dimensions specific to this
&lt;/h2&gt;

&lt;p&gt;Five things to check, and they are not the same five you check on a garment:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Placement — is it anatomically right&lt;/li&gt;
&lt;li&gt;Proportion — is the scale plausible&lt;/li&gt;
&lt;li&gt;Reflection plausibility — does the light direction match&lt;/li&gt;
&lt;li&gt;Duplicates — did a second pair appear&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Was the face altered&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That last one is the sneaky failure. The accessory can be perfect while the model's face has quietly shifted. If you are producing a series against one locked model, this breaks the series and it is easy to miss when you are looking at the product.&lt;/p&gt;




&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;The generalisable lesson: &lt;strong&gt;as the edit region shrinks relative to the frame, prompt precision has to increase, not decrease.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Intuition says a small edit is an easy edit. In practice a small target gives the model more freedom to be wrong, and more spare capacity to wander into regions you never asked it to touch. Two sentences fix both — one saying exactly where the thing attaches, one saying nothing else may move.&lt;/p&gt;




&lt;p&gt;MIT licensed, 19 skills, works with Claude Code / Codex / Cursor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/dlazyai/ecommerce-skills &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;github.com/dlazyai/ecommerce-skills&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The docs said unnamed items get dropped. I ran the A/B and couldn't reproduce it</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 07:57:21 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/the-docs-said-unnamed-items-get-dropped-i-ran-the-ab-and-couldnt-reproduce-it-7e3</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/the-docs-said-unnamed-items-get-dropped-i-ran-the-ab-and-couldnt-reproduce-it-7e3</guid>
      <description>&lt;p&gt;There is an open-source skill in a library I have been working through called &lt;code&gt;image-fusion&lt;/code&gt;. It takes up to 8 separate product photos — a top, trousers, a coat, boots, a scarf, whatever — and composites all of them onto one model to produce a single complete-look e-commerce shot.&lt;/p&gt;

&lt;p&gt;Its documentation contains one rule stated more emphatically than any other:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;每张图对应一个明确的穿着位置，不点名的单品会被忽略。&lt;br&gt;
&lt;em&gt;Each image maps to one explicit wear position. Items not named will be ignored.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a strong, falsifiable claim. So I falsified it. Or tried to.&lt;/p&gt;




&lt;h2&gt;
  
  
  The mechanism, as documented
&lt;/h2&gt;

&lt;p&gt;The prompt is supposed to roll-call every garment, mapping each input image index to a body location:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;图1 的米白色罗纹高领毛衣作为内搭上装；
图2 的驼色羊毛阔腿长裤作为下装；
图3 的炭灰色长款大衣作为外套敞开穿在最外层；
图4 的黑色皮质踝靴穿在脚上；
图5 的锈橙色羊毛围巾绕在颈部垂在胸前。
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;图N&lt;/code&gt; maps positionally to the Nth entry in &lt;code&gt;--images&lt;/code&gt;, so upload order matters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlazy seedream-5.0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PROMPT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--images&lt;/span&gt; i1-top.jpg i2-pants.jpg i3-coat.jpg i4-boots.jpg i5-scarf.jpg &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--size&lt;/span&gt; 3:4 &lt;span class="nt"&gt;--resolution&lt;/span&gt; 2k &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--save&lt;/span&gt; out/look-01.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Model is &lt;code&gt;seedream-5.0&lt;/code&gt; — roughly 5 credits per image, up to 10 reference images. Notably cheaper than the &lt;code&gt;gpt-image-2&lt;/code&gt; used by sibling skills in the same library (60 credits at high quality), which matters when you are generating outfit variations at volume.&lt;/p&gt;

&lt;p&gt;The five-item version works exactly as advertised:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All five garments present&lt;/li&gt;
&lt;li&gt;Layering correct — coat open, turtleneck visible underneath&lt;/li&gt;
&lt;li&gt;No colour contamination between the five items&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fine. Now the actual question.&lt;/p&gt;




&lt;h2&gt;
  
  
  The experiment
&lt;/h2&gt;

&lt;p&gt;I built two prompts over the &lt;strong&gt;same 8 input images&lt;/strong&gt;, in the same order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Group A — no roll-call.&lt;/strong&gt; Deliberately lazy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;电商搭配商拍图。模特穿着这些单品，青年亚洲女模特，正面站姿，
全身入画，纯浅灰色摄影棚背景，柔和顶光。真实照片质感，无文字无水印。
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is it. "The model is wearing these items." No index mapping, no wear positions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Group B — full roll-call.&lt;/strong&gt; Every item named with its position, plus explicit layering order and a colour-contamination guard, plus the documented failure clause: &lt;em&gt;"八件单品缺一不可，少任何一件都视为失败"&lt;/em&gt; (all eight are mandatory; missing any one is a failure).&lt;/p&gt;

&lt;p&gt;Same images, same order, same model, same size, same resolution.&lt;/p&gt;




&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Group A: all 8 items present.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Group B: all 8 items present.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I had also run a 5-item version of the same test earlier. Same outcome — the un-roll-called prompt produced all five garments.&lt;/p&gt;

&lt;p&gt;I could not reproduce the documented failure mode. Not once, across two separate item counts.&lt;/p&gt;




&lt;h2&gt;
  
  
  So is the rule wrong?
&lt;/h2&gt;

&lt;p&gt;No — and this is the part I think is worth the post.&lt;/p&gt;

&lt;p&gt;The two outputs are not identical. They differ in ways that have nothing to do with item count:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Group A (no roll-call)&lt;/th&gt;
&lt;th&gt;Group B (roll-call)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Items present&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Layering&lt;/td&gt;
&lt;td&gt;Turtleneck and placket barely visible under the coat&lt;/td&gt;
&lt;td&gt;Coat hangs open, inner collar and placket clearly shown&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Belt position&lt;/td&gt;
&lt;td&gt;Sits high, mostly hidden by the coat&lt;/td&gt;
&lt;td&gt;Correct, aligned with the trouser waist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Controllability&lt;/td&gt;
&lt;td&gt;Whatever the model decides&lt;/td&gt;
&lt;td&gt;Exactly what the prompt specifies&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Group A did not &lt;em&gt;drop&lt;/em&gt; anything. It made &lt;strong&gt;its own choices&lt;/strong&gt; about how things were worn — and its choices were worse.&lt;/p&gt;

&lt;p&gt;Which reframes the rule. Roll-calling is not a completeness mechanism. It is a &lt;strong&gt;control&lt;/strong&gt; mechanism.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You are not writing &lt;code&gt;图3 的大衣敞开穿在最外层、露出里面的高领毛衣&lt;/code&gt; to stop the coat from vanishing. You are writing it because otherwise the model buttons the coat and hides the garment you are actually trying to sell.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For an e-commerce use case that distinction is not academic. The whole point of a full-look shot is that a shopper can see every item in it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I would keep from the documentation anyway
&lt;/h2&gt;

&lt;p&gt;Even having failed to reproduce the headline warning, three of its adjacent rules held up in testing and are worth following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layering must be ordered explicitly.&lt;/strong&gt; Two garments at the same body location without a stated order means the model picks one. This one I did observe.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;叠穿顺序由内到外：高领毛衣 → 大衣，大衣不系扣，
内搭领口和前襟必须清晰可见。
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Colour contamination is real when hues are close.&lt;/strong&gt; Hard-coding each item's colour is cheap insurance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;这五件单品相互独立，颜色不得相互污染：毛衣米白色、长裤驼色、
大衣炭灰色、靴子黑色、围巾锈橙色。
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Do not put two items of the same category in one call.&lt;/strong&gt; The model either picks one or blends them. This is a documented boundary and I see no reason to test it — the failure is obvious and the fix is trivial (split into two looks).&lt;/p&gt;




&lt;h2&gt;
  
  
  Batch consistency
&lt;/h2&gt;

&lt;p&gt;If you are generating a set of looks rather than one, the skill's advice is to freeze four things and vary only the item list:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Model — same reference photo, or a fixed description&lt;/li&gt;
&lt;li&gt;Pose and framing&lt;/li&gt;
&lt;li&gt;Background and lighting&lt;/li&gt;
&lt;li&gt;Composition and headroom&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Copy those four sentences byte-for-byte between calls. Only the garment roll-call changes. Same principle as a frozen spec segment in batch pipelines — if you edit the invariant part mid-set, the set stops being a set.&lt;/p&gt;

&lt;p&gt;I ran a second look with four items against an identical frozen block and the two outputs sit together correctly as a pair.&lt;/p&gt;




&lt;h2&gt;
  
  
  Practical notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--size 3:4&lt;/code&gt; for full-body looks, &lt;code&gt;1:1&lt;/code&gt; for square main images. Vertical dominates e-commerce.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--resolution 2k&lt;/code&gt; is enough for a listing. 3k/4k for print.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--batch 2~4&lt;/code&gt; — multi-item composition has real run-to-run variance, so generate a few and pick.&lt;/li&gt;
&lt;li&gt;Upload in wearing order: top → bottom → outer → shoes → bag → accessories. Keeps &lt;code&gt;图N&lt;/code&gt; readable when you are editing the prompt later.&lt;/li&gt;
&lt;li&gt;Do not feed images that already have a person wearing the item. The original body comes along for the ride.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;The documented rule was "roll-call or lose items." My testing says the actual rule is &lt;strong&gt;"roll-call or lose control."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is a less dramatic claim, but a more useful one — because it tells you &lt;em&gt;when&lt;/em&gt; you can skip it. Throwing four unrelated items at it for a quick internal mock-up? Probably fine without. Producing a listing image where the coat has to be open so the sweater underneath is visible? Write every line.&lt;/p&gt;

&lt;p&gt;If anyone has managed to reproduce the actual drop behaviour — higher item counts, closer categories, a different model version — I would genuinely like to see it. Eight was my ceiling because that is the documented cap.&lt;/p&gt;




&lt;p&gt;MIT licensed, 19 skills, works with Claude Code / Codex / Cursor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/dlazyai/ecommerce-skills &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;github.com/dlazyai/ecommerce-skills&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Batch-generating 100 product images is easy. Making them look like one set is not</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 07:47:59 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/batch-generating-100-product-images-is-easy-making-them-look-like-one-set-is-not-3gii</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/batch-generating-100-product-images-is-easy-making-them-look-like-one-set-is-not-3gii</guid>
      <description>&lt;p&gt;Most people assume the hard part of batch image generation is the volume. A hundred products means a hundred calls, which sounds tedious.&lt;/p&gt;

&lt;p&gt;It is not the hard part. A loop solves that and machines do not get bored.&lt;/p&gt;

&lt;p&gt;The hard part is that those hundred images have to look like &lt;strong&gt;one photographer shot them on one day in one studio&lt;/strong&gt;. Same background. Light from the same direction. Same camera angle. Products at the same scale in frame. Shadows falling the same way.&lt;/p&gt;

&lt;p&gt;Miss by a little and the storefront reads as cheap.&lt;/p&gt;




&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;The skill I have been testing (&lt;code&gt;batch-image&lt;/code&gt;, from an MIT-licensed library) solves this with one structural idea:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prompt = [SPEC SEGMENT — byte-identical across the entire batch]
       + [VARIABLE SEGMENT — rewritten per SKU]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mental model that made it click for me: &lt;strong&gt;you are building a studio, not writing prompts.&lt;/strong&gt; Backdrop paper, key light, fill light, camera on a tripod at 45°, everything taped to the floor. Once it is built you never touch it. Products get carried in, shot, carried out.&lt;/p&gt;

&lt;p&gt;The spec segment is the studio.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable segment&lt;/strong&gt; — different every call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;电商商拍图。图1 是商品：米白色罗纹高领针织毛衣，修身版型。
商品的颜色、材质纹理、款式细节必须与图1完全一致。
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Spec segment&lt;/strong&gt; — never changes, not one character:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;放置在同一套统一视觉里：纯米白色摄影棚背景，柔和顶光加左侧补光，
45 度视角，画面下方留出统一的商品投影，构图与留白在整组图中保持一致。
深色商品需加右侧轮廓光勾边，避免与背景糊在一起。
商品在画面中的占比统一为约 65%，边距一致。
真实商业产品摄影，无文字无水印。
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Does it hold?
&lt;/h2&gt;

&lt;p&gt;I picked six products chosen to be as awkward as possible — light, dark, reflective, textile:&lt;/p&gt;

&lt;p&gt;cream ribbed sweater · black leather ankle boots · black leather chain bag · silver steel watch · black wool bucket hat · rust wool scarf&lt;/p&gt;

&lt;p&gt;Then ran the spec segment six times without touching a character, swapping only the variable part.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It holds.&lt;/strong&gt; Background reads identically across all six. Light comes from upper-left in every frame. Shadows fall lower-right. Products occupy roughly the same share of frame with even margins.&lt;/p&gt;

&lt;p&gt;The interesting case is the three black items. They do not blend into the off-white background — because of one clause I had put in the spec segment on the documentation's advice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;深色商品需加右侧轮廓光勾边，避免与背景糊在一起。
(dark products need a rim light on the right edge so they don't
 merge with the background)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That single sentence is doing real work. Without it, dark leather against off-white loses its silhouette.&lt;/p&gt;




&lt;h2&gt;
  
  
  The negative control
&lt;/h2&gt;

&lt;p&gt;The docs carry a heavy warning: change one character of the spec segment and the entire batch must be re-run.&lt;/p&gt;

&lt;p&gt;Easy to test. I regenerated two of the six with a different spec — &lt;code&gt;dark grey concrete background, strong side-backlight, straight-on eye-level camera&lt;/code&gt; — and mixed them back into the contact sheet.&lt;/p&gt;

&lt;p&gt;You can pick them out instantly. There is no ambiguity, no "if you look closely." Two different studios in one grid.&lt;/p&gt;

&lt;p&gt;Which is why freezing matters operationally: &lt;strong&gt;any edit to the spec invalidates everything generated before it.&lt;/strong&gt; That is a strong argument for the workflow order below.&lt;/p&gt;




&lt;h2&gt;
  
  
  Orchestration
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;dlazy&lt;/code&gt; runs one task per invocation, so concurrency comes from the shell. The documented sweet spot is 4–6 lanes; higher risks rate limiting.&lt;/p&gt;

&lt;p&gt;Manifest is a three-column CSV:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="k"&gt;sku&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;desc&lt;/span&gt;
&lt;span class="k"&gt;SKU&lt;/span&gt;&lt;span class="mf"&gt;001&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;products&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="k"&gt;sweater&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;jpg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;米白色罗纹高领针织毛衣，修身版型&lt;/span&gt;
&lt;span class="k"&gt;SKU&lt;/span&gt;&lt;span class="mf"&gt;002&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;products&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="k"&gt;boots&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;jpg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;黑色皮质粗跟踝靴，侧拉链设计&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Worker with retry and backoff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;SPEC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'...'&lt;/span&gt;   &lt;span class="c"&gt;# the frozen block&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;SPEC

run_one&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;, &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; SKU IMG DESC &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;attempt &lt;span class="k"&gt;in &lt;/span&gt;1 2 3&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;dlazy seedream-5.0 &lt;span class="se"&gt;\&lt;/span&gt;
      &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"电商商拍图。图1 是商品：&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;DESC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;。商品的颜色、材质纹理、款式细节必须与图1完全一致。&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SPEC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
      &lt;span class="nt"&gt;--images&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$IMG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--size&lt;/span&gt; 1:1 &lt;span class="nt"&gt;--resolution&lt;/span&gt; 2k &lt;span class="se"&gt;\&lt;/span&gt;
      &lt;span class="nt"&gt;--save&lt;/span&gt; &lt;span class="s2"&gt;"out/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SKU&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.jpg"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1 &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;break
    sleep&lt;/span&gt; &lt;span class="k"&gt;$((&lt;/span&gt;attempt &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt;
  &lt;span class="k"&gt;done&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"out/&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SKU&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.jpg"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SKU&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;,ok"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SKU&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;,fail"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; run_one

xargs &lt;span class="nt"&gt;-P&lt;/span&gt; 5 &lt;span class="nt"&gt;-I&lt;/span&gt;&lt;span class="o"&gt;{}&lt;/span&gt; bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'run_one "{}"'&lt;/span&gt; &amp;lt; manifest.csv | &lt;span class="nb"&gt;tee &lt;/span&gt;report.csv
&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;, &lt;span class="s1"&gt;'{c[$2]++} END{for(k in c) print k, c[k]}'&lt;/span&gt; report.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For large SKU counts, submit with &lt;code&gt;--no-wait&lt;/code&gt;, collect the &lt;code&gt;generateId&lt;/code&gt;s, and poll:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;GID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;dlazy seedream-5.0 &lt;span class="nt"&gt;--no-wait&lt;/span&gt; ... &lt;span class="se"&gt;\&lt;/span&gt;
  | python3 &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'import sys,json;print(json.load(sys.stdin)["result"]["task"]["generateId"])'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$SKU&lt;/span&gt;&lt;span class="s2"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$GID&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; tasks.csv
&lt;span class="c"&gt;# later&lt;/span&gt;
&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;, &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; SKU GID&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;dlazy status &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$GID&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--wait&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt; &amp;lt; tasks.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The gotcha nobody documents
&lt;/h2&gt;

&lt;p&gt;Building English prompts for this, every call failed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"too_big"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maximum"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"prompt"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"expected string to have &amp;lt;=500 characters"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;There is a hard 500-character cap on the prompt&lt;/strong&gt;, and English burns through characters far faster than Chinese does. My first spec segment — written as a natural, comfortably-worded paragraph — blew straight past it.&lt;/p&gt;

&lt;p&gt;Trimmed version, 418 characters, output quality unaffected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Unified visual set: off-white studio background, soft top light with left
fill, 45-degree angle, consistent shadow below, identical composition and
margins across the set. Dark products get a right rim light. Product fills
~65% of frame. Real product photography, no text, no watermark.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terse instructions work fine. Polite full sentences just eat budget you do not have.&lt;/p&gt;

&lt;p&gt;Worth knowing: this cap belongs to the &lt;strong&gt;image&lt;/strong&gt; models. I later ran a ~1,000-character prompt against &lt;code&gt;claude-sonnet-5&lt;/code&gt; in the same CLI with no complaint. So do not go trimming prompts for text models on the assumption the limit is global.&lt;/p&gt;




&lt;h2&gt;
  
  
  Workflow order, and why it is not optional
&lt;/h2&gt;

&lt;p&gt;Because any spec edit forces a full re-run, the sequence matters more than usual:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Get one SKU working end to end.&lt;/strong&gt; Confirms the prompt direction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sample five.&lt;/strong&gt; Pick edge cases deliberately: darkest, lightest, most reflective, largest, smallest. My six-product set was chosen exactly this way, which is how the rim-light clause got validated before full volume.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Price it.&lt;/strong&gt; &lt;code&gt;--dry-run&lt;/code&gt; prints parameters and a credit estimate without executing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Then run everything.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Skipping to step 4 does not get you 100 images. It gets you the same mistake made 100 times, and then you fix the spec and pay for it again.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cost notes
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;seedream-5.0&lt;/code&gt;, ~5 credits per image. 100 SKUs lands around 500 credits.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Batch scenarios reportedly drop per-image compute to ~70%&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;2k&lt;/code&gt; is enough for a listing; &lt;code&gt;4k&lt;/code&gt; only for print&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not use &lt;code&gt;--batch N&lt;/code&gt;&lt;/strong&gt; — it multiplies cost, and your volume already comes from SKU count&lt;/li&gt;
&lt;li&gt;If a handful of SKUs need extreme fidelity, re-run &lt;em&gt;only those&lt;/em&gt; on &lt;code&gt;gpt-image-2&lt;/code&gt; (~6× cost). Never mix two models inside one batch, or you have just broken the consistency you paid for&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Troubleshooting, condensed
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Batch looks inconsistent&lt;/td&gt;
&lt;td&gt;Spec edited mid-run&lt;/td&gt;
&lt;td&gt;Freeze it, re-run the batch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dark product merges with background&lt;/td&gt;
&lt;td&gt;No rim light&lt;/td&gt;
&lt;td&gt;Add the rim-light clause, re-run&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product scale fluctuates&lt;/td&gt;
&lt;td&gt;Scale unconstrained&lt;/td&gt;
&lt;td&gt;Add "~65% of frame, consistent margins"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shadow directions vary&lt;/td&gt;
&lt;td&gt;Shadow unconstrained&lt;/td&gt;
&lt;td&gt;Add "shadow falls to the lower right"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mass failures partway&lt;/td&gt;
&lt;td&gt;Concurrency too high&lt;/td&gt;
&lt;td&gt;Drop to 4–5 lanes, add backoff&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note that the first four all end in "and re-run the batch." That is the whole argument for one-then-five-then-everything.&lt;/p&gt;




&lt;p&gt;MIT licensed, 19 skills, works with Claude Code / Codex / Cursor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/dlazyai/ecommerce-skills &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;github.com/dlazyai/ecommerce-skills&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you are running this at real volume I would be curious whether anyone has wired the failure queue into a re-run with an escalated model automatically, rather than eyeballing the report.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Turning a flat-lay photo into an on-model shot with two prompt segments</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 07:38:44 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/turning-a-flat-lay-photo-into-an-on-model-shot-with-two-prompt-segments-48ff</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/turning-a-flat-lay-photo-into-an-on-model-shot-with-two-prompt-segments-48ff</guid>
      <description>&lt;p&gt;If you sell clothing online you need on-model photography, and on-model photography means booking a model, renting a space, and waiting on retouching. Three to five days per round.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;flat-lay&lt;/code&gt; — from an MIT-licensed skill library I have been working through — collapses that to about 60 seconds. You give it a flat-lay garment photo and a pose reference, and it dresses the person in the garment.&lt;/p&gt;

&lt;p&gt;The interesting part for a developer audience is not that it works. It is that the prompt has a rigid two-part structure, and once you see it you start recognising the same shape in a lot of image-editing tasks.&lt;/p&gt;




&lt;h2&gt;
  
  
  The structure
&lt;/h2&gt;

&lt;p&gt;Every call is built from two things that pull in opposite directions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preserve&lt;/strong&gt; — everything about the garment must survive unchanged:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Preserve 100% fidelity of the garment color, knit texture, oversized
drop-shoulder silhouette, collar, cuff and hem details, and the placement
of the woven label.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Adopt&lt;/strong&gt; — everything about the scene must come from the reference:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Keep the exact pose, camera angle, crop, body proportions, lighting and
background from image 2.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the whole skill. One clause locks the product, the other locks the context, and the model resolves the middle.&lt;/p&gt;

&lt;p&gt;Full call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlazy gpt-image-2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"E-commerce on-model product photography. Image 1 is a flat-lay of
   an olive green cable-knit crewneck sweater with a chunky diamond cable
   pattern, ribbed collar and cuffs, and a woven label on the left cuff.
   Image 2 is the pose and scene reference. Dress the model from image 2 in
   the garment from image 1, replacing the clothing they currently wear.
   Preserve 100% fidelity of ... Keep the exact pose, camera angle, crop ...
   Photorealistic catalog styling, sharp fabric detail, soft natural light,
   no text or watermark."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--images&lt;/span&gt; garment-flatlay.jpg pose-reference.jpg &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--size&lt;/span&gt; 1024x1536 &lt;span class="nt"&gt;--quality&lt;/span&gt; high &lt;span class="nt"&gt;--imageFormat&lt;/span&gt; jpeg &lt;span class="nt"&gt;--batch&lt;/span&gt; 3 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--save&lt;/span&gt; out/SKU001.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Model is &lt;code&gt;gpt-image-2&lt;/code&gt; — multi-image editing, up to 5 reference images, 60 credits at &lt;code&gt;--quality high&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;code&gt;--images&lt;/code&gt; order is load-bearing
&lt;/h2&gt;

&lt;p&gt;This tripped me up and it is worth flagging because the failure is silent.&lt;/p&gt;

&lt;p&gt;The positional order of &lt;code&gt;--images&lt;/code&gt; maps to &lt;code&gt;image 1&lt;/code&gt;, &lt;code&gt;image 2&lt;/code&gt;, &lt;code&gt;image 3&lt;/code&gt; in the prompt text. There is no key, no label, no validation. Swap the order and the model dresses your flat-lay in a person.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# single garment&lt;/span&gt;
&lt;span class="nt"&gt;--images&lt;/span&gt; garment.jpg reference.jpg          &lt;span class="c"&gt;# image 1, image 2&lt;/span&gt;

&lt;span class="c"&gt;# full look&lt;/span&gt;
&lt;span class="nt"&gt;--images&lt;/span&gt; top.jpg bottom.jpg reference.jpg   &lt;span class="c"&gt;# image 1, image 2, image 3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The convention is: &lt;strong&gt;product first, reference last.&lt;/strong&gt; Keep it consistent across a project or your prompt text quietly stops matching your arguments.&lt;/p&gt;




&lt;h2&gt;
  
  
  Specificity is the whole quality lever
&lt;/h2&gt;

&lt;p&gt;The single highest-leverage thing in this prompt is the garment description, and the gap between lazy and specific is not subtle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# weak&lt;/span&gt;
a green sweater

&lt;span class="gh"&gt;# strong&lt;/span&gt;
an olive green cable-knit crewneck sweater with a chunky diamond cable
pattern, oversized drop-shoulder fit, ribbed collar and cuffs, and a
woven label on the left cuff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same model, same reference, same parameters. Materially different output. Every additional structural noun — &lt;em&gt;drop-shoulder&lt;/em&gt;, &lt;em&gt;ribbed&lt;/em&gt;, &lt;em&gt;diamond cable&lt;/em&gt; — is a constraint the model can hold onto rather than invent.&lt;/p&gt;

&lt;p&gt;English is recommended over Chinese for the garment section specifically. Scene and mood work in either.&lt;/p&gt;




&lt;h2&gt;
  
  
  Symptom-driven add-ons
&lt;/h2&gt;

&lt;p&gt;What I found genuinely well-designed is that the failure modes are enumerated, and each maps to a specific sentence you append. Not "try rewording it" — an actual mapping.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Append&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Colour drifted&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Match the garment color to image 1 exactly — same hue, saturation and brightness&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Texture went mushy&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;visible knit loops / weave grain / pile direction&lt;/code&gt;, fiber sheen, soft fold shadows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Broken hands, warped collar&lt;/td&gt;
&lt;td&gt;&lt;code&gt;five fingers per hand, symmetric shoulders, no extra limbs&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Face or background changed&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Change only the garment region&lt;/code&gt; + itemise what must stay identical&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That last one is the important one. Because the garment occupies most of the frame in this skill, the model tends to treat the whole image as editable. Region-locking is cheap and prevents the most annoying class of failure — a perfect sweater on a subtly different person.&lt;/p&gt;




&lt;h2&gt;
  
  
  Input constraints worth validating before you spend credits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;20KB–15MB, above 400×400, jpg/jpeg/png/webp&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reject:&lt;/strong&gt; garments occluded by arms or props, images containing both a top and a bottom (split into two files and use full-look mode), anything blurry or blown out&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That second one bit me. An "outfit" photo with a top and trousers in one frame is not one input — the model picks one or blends them. Two files, three images total, roll-call each.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reference selection drives everything downstream
&lt;/h2&gt;

&lt;p&gt;The reference image controls pose, camera angle, crop, lighting and background. Choosing badly is not recoverable in post.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fidelity first&lt;/strong&gt; → frontal standing pose, plain background, crop matched to the category (half-body for tops, full-body for dresses)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mood first&lt;/strong&gt; → street or interior scenes, at the cost of some fit drift&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch consistency&lt;/strong&gt; → freeze one reference and one model, swap only the garment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last mode is what makes this usable at scale. Dozens of SKUs against a single locked reference produce a visually coherent catalogue. Specifying a locked model adds roughly a minute per call.&lt;/p&gt;




&lt;h2&gt;
  
  
  Parameters
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1024x1536&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;3:4 vertical, the e-commerce standard. &lt;code&gt;1024x1024&lt;/code&gt; for detail shots&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--quality&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;high&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;medium&lt;/code&gt; visibly softens knit texture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--imageFormat&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;jpeg&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--batch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2–4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Run-to-run variance is real; generate a few and pick&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--dry-run&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Prints parameters and a credit estimate without executing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Always &lt;code&gt;--dry-run&lt;/code&gt; first. At 60 credits per image, a typo in a batch loop is expensive.&lt;/p&gt;




&lt;h2&gt;
  
  
  QC before you ship
&lt;/h2&gt;

&lt;p&gt;Four things to check on every output: colour drift, texture blur, print displacement, hand and collar artifacts.&lt;/p&gt;

&lt;p&gt;The library has a dedicated skill for this (&lt;code&gt;detect-task&lt;/code&gt;, ~3 credits per image) that checks eight fixed dimensions and hands back an English fix line you can append to the original prompt. I have written about it separately — including the part where it caught a hand defect in an image I had already published as an example.&lt;/p&gt;

&lt;p&gt;Which is the real argument for automated QC. Not that the model is unreliable — it is that &lt;strong&gt;you stop seeing your own output after the third look.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;MIT licensed, 19 skills, works with Claude Code / Codex / Cursor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/dlazyai/ecommerce-skills &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;github.com/dlazyai/ecommerce-skills&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I ran AI quality control on my own published work. It found what I missed</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 07:13:06 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/i-ran-ai-quality-control-on-my-own-published-work-it-found-what-i-missed-22e</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/i-ran-ai-quality-control-on-my-own-published-work-it-found-what-i-missed-22e</guid>
      <description>&lt;p&gt;I have been writing a series of articles about an open-source skill library for e-commerce image generation. Nineteen skills, all of which produce images.&lt;/p&gt;

&lt;p&gt;Except one.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;detect-task&lt;/code&gt; produces no image. It produces a verdict. You hand it a generated image, it runs eight fixed checks, and it tells you whether the thing is fit to ship.&lt;/p&gt;

&lt;p&gt;I decided to test it the uncomfortable way: &lt;strong&gt;by pointing it at images I had already published in earlier articles as examples of things going right.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It did not go well for me. Which is why it is worth writing about.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it actually does
&lt;/h2&gt;

&lt;p&gt;Eight fixed checks, every time:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;th&gt;Looks at&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;①&lt;/td&gt;
&lt;td&gt;Product distortion&lt;/td&gt;
&lt;td&gt;Silhouette, knit texture, print, logo placement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;②&lt;/td&gt;
&lt;td&gt;Unnatural face&lt;/td&gt;
&lt;td&gt;Feature proportions, skin texture, gaze&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;③&lt;/td&gt;
&lt;td&gt;Hand anomalies&lt;/td&gt;
&lt;td&gt;Finger count and shape&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;④&lt;/td&gt;
&lt;td&gt;Body structure&lt;/td&gt;
&lt;td&gt;Shoulder line, limb count and orientation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⑤&lt;/td&gt;
&lt;td&gt;Garbled text&lt;/td&gt;
&lt;td&gt;Any text in frame&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⑥&lt;/td&gt;
&lt;td&gt;Light/shadow conflict&lt;/td&gt;
&lt;td&gt;Shadow direction vs light source&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⑦&lt;/td&gt;
&lt;td&gt;Edge fusion artifacts&lt;/td&gt;
&lt;td&gt;Cutout edges, ghosting, blurred patches&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⑧&lt;/td&gt;
&lt;td&gt;Platform compliance&lt;/td&gt;
&lt;td&gt;Non-compliant elements&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Output is four sections: risk level, per-check verdict with evidence, a launch recommendation, and — this is the part that matters — &lt;strong&gt;1–3 English sentences you can append directly to your original generation prompt.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That last section is the whole design. The model finds the fault &lt;em&gt;and&lt;/em&gt; hands you the patch. You paste it back, re-run, done.&lt;/p&gt;

&lt;p&gt;Roughly 3 credits per image. About a second per call.&lt;/p&gt;




&lt;h2&gt;
  
  
  Running it
&lt;/h2&gt;

&lt;p&gt;It is a thin CLI wrapper over a hosted API. Install and auth:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; @dlazy/cli@1.2.3
dlazy login   &lt;span class="c"&gt;# device-code flow, works over SSH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The call itself is unremarkable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlazy claude-sonnet-5 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;qc-prompt.txt&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--images&lt;/span&gt; candidate.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;First gotcha:&lt;/strong&gt; the result is text, so it lives at &lt;code&gt;result.data.texts[0]&lt;/code&gt; — not &lt;code&gt;urls&lt;/code&gt; like every image skill in the library. If you copy-paste an extractor from a sibling skill you get an empty string and no error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dlazy claude-sonnet-5 &lt;span class="nt"&gt;--prompt&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;qc-prompt.txt&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--images&lt;/span&gt; candidate.jpg 2&amp;gt;/dev/null &lt;span class="se"&gt;\&lt;/span&gt;
  | python3 &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'import sys,json;print(json.load(sys.stdin)["result"]["data"]["texts"][0])'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the &lt;code&gt;2&amp;gt;/dev/null&lt;/code&gt;. The CLI writes progress to stderr, and if you leave it merged your JSON parse dies on line 1 column 1. I lost a couple of minutes to that one.&lt;/p&gt;




&lt;h2&gt;
  
  
  Test 1: the image I thought was fine
&lt;/h2&gt;

&lt;p&gt;I had used this image previously to demonstrate what happens &lt;em&gt;without&lt;/em&gt; realism constraints in the prompt. My own assessment at the time: "skin looks a bit too smooth, mild CG feel." That was the extent of it.&lt;/p&gt;

&lt;p&gt;The report disagreed about &lt;em&gt;why&lt;/em&gt; it was flawed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⑤ Garbled text — Hit. Background signage (upper right, vertical banner
with Japanese/Kanji-style characters) shows illegible/garbled character
strokes; framed photo on left wall also has indecipherable small text.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I went back and zoomed in. There is a signboard in the upper right whose strokes dissolve into mush, and unreadable text in a picture frame on the left wall.&lt;/p&gt;

&lt;p&gt;I had looked at that image several times. I never saw either, because my attention never left the subject.&lt;/p&gt;




&lt;h2&gt;
  
  
  Test 2: the image I had captioned as a success
&lt;/h2&gt;

&lt;p&gt;This one stings more. It opened my previous article as proof that all five prompt slots had landed correctly, complete with a caption praising it.&lt;/p&gt;

&lt;p&gt;Three hits. The one that mattered:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;③ Hand anomalies — Hit. The hand nearest the viewer shows an ambiguous
finger count/overlap near the knuckles, and the fingers wrapped around
the cup handle lack clear separation or joint definition.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cropped it, scaled 200%, and — yes. The knuckles run together and the ring and little fingers lose their boundary.&lt;/p&gt;

&lt;p&gt;An image I had studied, published, and held up as an example. On a real product listing, a buyer pinch-zooming on their phone finds that in about two seconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  Test 3: control group
&lt;/h2&gt;

&lt;p&gt;A product-only shot, no person in frame. &lt;strong&gt;Zero hits, low risk, approved.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The spread across all three lines up exactly with the documented sampling policy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First batch on a new spec → inspect 100%&lt;/li&gt;
&lt;li&gt;Validated spec → 10–20% random&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Images containing people → raise to 30%&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Product-only shots → 5% is enough&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hands and faces are where this fails. My results reproduced that precisely.&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing the loop
&lt;/h2&gt;

&lt;p&gt;Took the fix lines verbatim from section 4, appended them to the original generation prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Both hands fully visible and anatomically correct with five distinct
fingers each. No text anywhere in the image. Blend all edges seamlessly;
no cut-out halo, no ghosting, no blurred patches.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Re-ran. Re-inspected. Clean — every check passed, approved for launch.&lt;/p&gt;

&lt;p&gt;Loop closes. Nice story, good article, ship it.&lt;/p&gt;

&lt;p&gt;Except.&lt;/p&gt;




&lt;h2&gt;
  
  
  The part that actually matters
&lt;/h2&gt;

&lt;p&gt;I inspected that same re-run image a &lt;strong&gt;second&lt;/strong&gt; time, with an English QC prompt instead of a Chinese one, because I was building an English version of the article.&lt;/p&gt;

&lt;p&gt;Different answer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;③ Hand anomalies — Hit. The hand wrapped around the glass shows ambiguous
finger separation near the knuckles; finger count is difficult to confirm
cleanly due to overlapping shading, risking a "melted fingers" perception
on close inspection.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So I zoomed in on the re-run image. &lt;strong&gt;The second pass was right. The first pass had missed it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Same image. Same check. Two runs. Opposite verdicts.&lt;/p&gt;

&lt;p&gt;This is not a bug report — it is the documented behaviour, stated plainly in the skill's own limitations section:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It does not replace human final review — it both false-positives and misses things.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But there is a difference between reading that sentence and watching it happen to you on an image you were about to ship. If I had inspected once and trusted the green light, the defective hand goes live.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The practical rule I took away:&lt;/strong&gt; the re-inspection step in the documented workflow is necessary but not sufficient. A pass is evidence, not proof. For anything customer-facing, a human still looks.&lt;/p&gt;




&lt;h2&gt;
  
  
  One more finding
&lt;/h2&gt;

&lt;p&gt;In an earlier article on the batch-generation skill I hit a hard cap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"too_big"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maximum"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"prompt"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"expected string to have &amp;lt;=500 characters"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;500 characters on the prompt. English burns through that fast — my first natural-sounding spec paragraph blew past it immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That cap does not apply here.&lt;/strong&gt; My English QC prompt is around 1,000 characters and runs fine. The limit belongs to the image models, not to &lt;code&gt;claude-sonnet-5&lt;/code&gt;. So you can write a properly detailed QC prompt without compressing it into telegraph style.&lt;/p&gt;

&lt;p&gt;Worth knowing before you spend twenty minutes trimming a prompt that never needed trimming.&lt;/p&gt;




&lt;h2&gt;
  
  
  Operational notes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Freeze the QC prompt.&lt;/strong&gt; Use one copy project-wide. Edit it mid-project and reports from before and after are no longer comparable — same principle as a frozen spec segment in batch generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Demand your output language explicitly.&lt;/strong&gt; One of my runs came back entirely in English despite a Chinese prompt asking for Chinese. This is row one of the skill's own troubleshooting table. A line marked as highest-priority fixed it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The economics are trivially good.&lt;/strong&gt; One high-quality image render costs 60 credits. Inspection costs 3. Spending 3 to avoid shipping a broken 60-credit asset is not a difficult calculation — the check pays for itself at a 5% catch rate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Would I use it
&lt;/h2&gt;

&lt;p&gt;Yes, with the obvious caveat.&lt;/p&gt;

&lt;p&gt;As a first-pass filter that costs 3 credits and one second, it is excellent. It caught two real defects in images I had personally reviewed and published. That is a meaningful hit rate against a human baseline of &lt;em&gt;me, paying attention&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As a gate you trust unattended, no. The non-determinism is real and I have a concrete example of it letting a defect through.&lt;/p&gt;

&lt;p&gt;Treat it as a cheap, fast, fallible reviewer that never gets bored — which is exactly the thing humans are worst at being.&lt;/p&gt;




&lt;p&gt;The library is MIT licensed, 19 skills, works with Claude Code / Codex / Cursor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/dlazyai/ecommerce-skills &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/dlazyai/ecommerce-skills" rel="noopener noreferrer"&gt;github.com/dlazyai/ecommerce-skills&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Has anyone else run into non-determinism like this in vision-model QC pipelines? I am curious whether multi-sample voting — running the same check 3× and taking a majority — is worth the 9 credits. Drop a comment if you have tried it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Where the money actually goes when you generate at scale</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Mon, 24 Aug 2026 07:24:36 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/where-the-money-actually-goes-when-you-generate-at-scale-32hn</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/where-the-money-actually-goes-when-you-generate-at-scale-32hn</guid>
      <description>&lt;p&gt;After a few months of running generation through an agent, the surprising thing wasn't the cost per call. It was how much of the spend went to work I didn't need to do.&lt;/p&gt;

&lt;p&gt;Almost every fix below is about &lt;strong&gt;ordering and verification&lt;/strong&gt;, not about paying less per call.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Iterate on the cheap tier. Always.
&lt;/h2&gt;

&lt;p&gt;The largest available saving, and the most commonly skipped.&lt;/p&gt;

&lt;p&gt;Most model families ship a fast or lite variant. They exist for exactly this: when you're deciding composition, framing or timing, you're &lt;strong&gt;making a decision, not producing a deliverable&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The number of drafts you discard is much larger than the number of finals you keep. Optimising the discarded ones is where the leverage is.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The failure mode is exploring on the expensive model because it produces nicer images. It does — and you're paying production prices for drafts you're about to throw away.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Front-load the local tools
&lt;/h2&gt;

&lt;p&gt;A significant part of any video pipeline needs no model at all: transcription, scene detection, silence cutting, word-boundary alignment, and every validator.&lt;/p&gt;

&lt;p&gt;Two consequences. First, they're free, so run them liberally. Second, and bigger:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduce before the model sees it.&lt;/strong&gt; A 90-minute transcript folded to phrase level is a fraction of the input. The model doesn't need the full haystack — and producing the needle is usually a local operation.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pilot every batch
&lt;/h2&gt;

&lt;p&gt;Run three. Inspect. Then run the rest.&lt;/p&gt;

&lt;p&gt;Batch work is the one place where cost is genuinely predictable — one input, one output, roughly linear. So a three-item pilot gives a real projection: measure actual consumption, multiply, add 20%.&lt;/p&gt;

&lt;p&gt;But the real value is qualitative. &lt;strong&gt;Whatever is wrong with your prompt is wrong in every item.&lt;/strong&gt; Finding out on three costs three.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Calibrate before generating narration
&lt;/h2&gt;

&lt;p&gt;Speech rate is not a number you can look up. It varies by voice, language, punctuation, and the specific text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tts_pacing_calibrate   &lt;span class="c"&gt;# chars-per-second from one sample, project total runtime&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measure on one sample, project the runtime, adjust script or speed, &lt;em&gt;then&lt;/em&gt; generate. A full narration pass that doesn't fit the edit is a complete write-off — and entirely avoidable.&lt;/p&gt;

&lt;p&gt;Worth being honest about the failure mode here: there's a temptation to solve a script problem with a speed parameter. It doesn't work. It converts "too long" into "sounds rushed."&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Validate every render, not just the final
&lt;/h2&gt;

&lt;p&gt;This one saves money in a less obvious way.&lt;/p&gt;

&lt;p&gt;The validators cost nothing, so the question isn't &lt;em&gt;whether&lt;/em&gt; to run them but &lt;em&gt;when&lt;/em&gt;. Run them on every render, including intermediates — because:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A defect caught at the intermediate stage costs one regeneration. The same defect caught after assembly costs the assembly too.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  6. Reference images instead of adjectives
&lt;/h2&gt;

&lt;p&gt;Describing a look in words takes several attempts to converge. Supplying one reference image often gets there in one.&lt;/p&gt;

&lt;p&gt;Every failed attempt is a full-price generation. Three rounds of &lt;em&gt;warmer, softer, less contrast&lt;/em&gt; costs three generations and still lands somewhere approximate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One good reference image replaces a paragraph of adjectives, and it's more reliable.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Keep a manifest
&lt;/h2&gt;

&lt;p&gt;Not obviously a cost measure. It is one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input | prompt | model | generateId | output path | status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without this you re-derive that information by hand, and when a run dies partway you restart from the beginning instead of from where it stopped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A manifest is a checkpoint&lt;/strong&gt;, and checkpoints are what make long jobs survivable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one I'd leave off the list
&lt;/h2&gt;

&lt;p&gt;I'd stop short of recommending you optimise the model choice itself beyond the fast/full split.&lt;/p&gt;

&lt;p&gt;Chasing per-model price differences produces small savings, a lot of context-switching, and pushes you toward models you don't know well.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Knowing one model deeply is worth more than a marginal rate — you get what you wanted in fewer attempts, and attempts are the actual cost.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The pattern underneath
&lt;/h2&gt;

&lt;p&gt;Look at the list again. Almost none of it is "spend less per call."&lt;/p&gt;

&lt;p&gt;It's: decide cheaply, verify early, checkpoint often, and don't re-derive what you already knew.&lt;/p&gt;

&lt;p&gt;Which is the same list you'd write for any expensive batch process. The models are new; &lt;strong&gt;the discipline isn't.&lt;/strong&gt;&lt;/p&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://files.dlazy.com/cdn/cli | bash
dlazy &lt;span class="nt"&gt;-h&lt;/span&gt;            &lt;span class="c"&gt;# tool list&lt;/span&gt;
dlazy &amp;lt;tool&amp;gt; &lt;span class="nt"&gt;-h&lt;/span&gt;     &lt;span class="c"&gt;# flags — read this before the first paid call&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That second command is the cheapest habit on this page. Flag sets differ more than you'd expect between tools, and a wrong guess costs a generation.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Front-load the free work — turning a 90-minute recording into short clips</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Mon, 24 Aug 2026 07:23:48 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/front-load-the-free-work-turning-a-90-minute-recording-into-short-clips-35d0</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/front-load-the-free-work-turning-a-90-minute-recording-into-short-clips-35d0</guid>
      <description>&lt;p&gt;The obvious way to cut a 90-minute recording into short clips is to hand the whole thing to a model and ask it to find the good parts.&lt;/p&gt;

&lt;p&gt;I tried that. It's expensive and the output degrades as it goes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the obvious way fails
&lt;/h2&gt;

&lt;p&gt;90 minutes of transcript is an enormous amount of context, and &lt;strong&gt;long context degrades judgement&lt;/strong&gt;. The model starts confusing similar passages, loses track of what it already flagged, and its picks get worse the further in it goes.&lt;/p&gt;

&lt;p&gt;So you pay the most for the least reliable output. Worst possible shape.&lt;/p&gt;

&lt;h2&gt;
  
  
  Most of this work doesn't need a model
&lt;/h2&gt;

&lt;p&gt;Here's what I didn't expect: the majority of the pipeline is local analysis that costs nothing per call.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;video_downloader     &lt;span class="c"&gt;# pull source from YouTube/TikTok/Reels/Shorts&lt;/span&gt;
transcribe           &lt;span class="c"&gt;# word-level ASR, with on-disk caching&lt;/span&gt;
transcript_pack      &lt;span class="c"&gt;# fold word-level into phrase-level markdown&lt;/span&gt;
scene_detect         &lt;span class="c"&gt;# content-aware shot boundaries via ffmpeg&lt;/span&gt;
snap_to_words        &lt;span class="c"&gt;# align cut points to word edges, 30-200ms padding&lt;/span&gt;
silence_cutter       &lt;span class="c"&gt;# detect and concat-cut around silence&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two of these deserve attention.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;transcript_pack&lt;/code&gt; is the one that makes it viable
&lt;/h3&gt;

&lt;p&gt;Word-level transcript for 90 minutes is huge and mostly noise — a timestamp on every token. Folded to phrase level it becomes something a model can read in one pass.&lt;/p&gt;

&lt;p&gt;This is the pattern that makes agent pipelines affordable:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Reduce before the model sees it.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same principle shows up everywhere once you look for it. Grepping ERROR lines out of a log before pasting it. Extracting changed functions instead of the whole diff. In every case the model doesn't need the haystack — it needs the needle, and finding the needle is often a local operation.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;snap_to_words&lt;/code&gt; looks like a detail and isn't
&lt;/h3&gt;

&lt;p&gt;Cutting on a scene boundary is visually correct and frequently lands mid-word, which sounds broken.&lt;/p&gt;

&lt;p&gt;Snapping to word edges with a small padding window is the difference between a clip that sounds &lt;em&gt;edited&lt;/em&gt; and one that sounds &lt;em&gt;clipped&lt;/em&gt;. The 30–200ms padding exists because a cut placed exactly on a word boundary still clips the consonant.&lt;/p&gt;

&lt;p&gt;This is the kind of thing that only gets built by someone who shipped a batch of clips and then read the complaints.&lt;/p&gt;

&lt;h2&gt;
  
  
  The order that works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Transcribe, then pack to phrase level.
2. From the packed transcript, pick candidate segments by topic.
   ← the only step where model judgement earns its cost
3. Run scene detection; snap chosen cut points to word boundaries.
4. Cut silence out of the selected windows.
5. Render, then run audio-pop and A/V sync checks.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exactly one step involves paid judgement. Everything else is local.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkpoint the selection, not the render
&lt;/h2&gt;

&lt;p&gt;Write the chosen segments — timestamps and reasons — to a file &lt;strong&gt;before&lt;/strong&gt; rendering.&lt;/p&gt;

&lt;p&gt;The selection is the expensive artefact. Rendering can be repeated cheaply; deciding what's worth keeping cannot. If the render fails, or you want a different aspect ratio next week, you want to start from the decisions rather than re-derive them.&lt;/p&gt;

&lt;p&gt;This generalises to any batch job: &lt;strong&gt;parallelise the work, serialise the checkpoints.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A detail that tells you the intent
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;transcribe&lt;/code&gt; caches to disk and skips when the output JSON is newer than the source.&lt;/p&gt;

&lt;p&gt;That's a small implementation choice with a large implication: this tool expects to be re-run. Which means the pipeline is designed to be &lt;em&gt;iterated on&lt;/em&gt;, not executed once. Re-running after a tweak costs nothing.&lt;/p&gt;

&lt;p&gt;Tools tell you how they expect to be used, if you read the small decisions.&lt;/p&gt;




&lt;p&gt;If you want to try it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://files.dlazy.com/cdn/cli | bash
dlazy &lt;span class="nt"&gt;-h&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start with a 10-minute recording rather than a 90-minute one. The pipeline shape is identical and you'll find out where your assumptions are wrong for a tenth of the wall-clock time.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Your coding agent can't see the video it just made</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Mon, 24 Aug 2026 07:23:03 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/your-coding-agent-cant-see-the-video-it-just-made-3p2p</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/your-coding-agent-cant-see-the-video-it-just-made-3p2p</guid>
      <description>&lt;p&gt;I spent a week letting an agent produce short video clips end to end. It reported success on every run. Roughly one in five was broken.&lt;/p&gt;

&lt;p&gt;Not subtly broken. One had a two-second frozen frame in the middle. One had narration drifting a full second off picture by the end. Two had audible clicks at every splice point.&lt;/p&gt;

&lt;p&gt;The agent had no idea. From its position, every step returned exit code zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  The structural problem
&lt;/h2&gt;

&lt;p&gt;An agent orchestrating video generation is working blind. It can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;call a generation model and get a file back&lt;/li&gt;
&lt;li&gt;assemble an edit list&lt;/li&gt;
&lt;li&gt;run ffmpeg&lt;/li&gt;
&lt;li&gt;confirm each command exited cleanly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What it cannot do is &lt;strong&gt;watch the output&lt;/strong&gt;. So "the third clip froze" is not a state it can reach.&lt;/p&gt;

&lt;p&gt;This is different from how agents fail at code. A failing test is a signal the agent can read. A frozen frame is not — it's a property of pixels the agent never inspects.&lt;/p&gt;

&lt;p&gt;Which means: without something to close the loop, &lt;strong&gt;you are the only quality gate&lt;/strong&gt;. And that caps your throughput at what you can personally sit through.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually closes it
&lt;/h2&gt;

&lt;p&gt;The thing that changed this for me was finding that the &lt;code&gt;dlazy&lt;/code&gt; CLI ships validators that run &lt;strong&gt;locally against the rendered file&lt;/strong&gt; — no model call, no generation cost:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;validate_freeze            &lt;span class="c"&gt;# frozen-frame intervals&lt;/span&gt;
validate_av_sync           &lt;span class="c"&gt;# video ≈ audio ≈ subtitle duration coherence&lt;/span&gt;
validate_audio_pops        &lt;span class="c"&gt;# pops at cut boundaries&lt;/span&gt;
validate_cut_boundaries    &lt;span class="c"&gt;# per-cut pHash sampling on the render&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each maps to a failure mode that survives casual review:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;validate_freeze&lt;/code&gt;&lt;/strong&gt; — generated video stalls more often than people admit. A two-second freeze is easy to miss on a distracted first watch and impossible to miss once published.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;validate_av_sync&lt;/code&gt;&lt;/strong&gt; — a three-way duration check. Drift accumulates. 200ms off at the start is a second off at the end, and by then your narration is describing the previous shot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;validate_audio_pops&lt;/code&gt;&lt;/strong&gt; — the thing that makes assembled audio sound amateur. Nearly invisible until it's on decent speakers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;validate_cut_boundaries&lt;/code&gt;&lt;/strong&gt; — perceptual-hash sampling to catch cuts that landed somewhere other than intended. Off-by-one-frame errors in an edit list produce exactly this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "local" is the load-bearing word
&lt;/h2&gt;

&lt;p&gt;These don't call a model. Running them is effectively free.&lt;/p&gt;

&lt;p&gt;That sounds like a minor cost note. It isn't — it changes &lt;em&gt;when&lt;/em&gt; you run them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A check that costs something gets run on the final version, if at all. A check that costs nothing gets run on &lt;strong&gt;every&lt;/strong&gt; render — including the ugly intermediates, which is when the error is cheapest to fix.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Generalise it: &lt;strong&gt;the value of a check is a function of how often you're willing to run it, and that's mostly a function of what it costs.&lt;/strong&gt; Cheap checks get run. Expensive checks get skipped exactly when you're under pressure, which is exactly when you need them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wiring it into the loop
&lt;/h2&gt;

&lt;p&gt;The prompt shape that works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;After rendering, run the freeze, A/V sync and audio-pop checks.
If any fail, regenerate only the affected segment and re-check.
Report which checks ran and what they returned.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last line is non-negotiable. An agent that says "done" without stating what it verified has told you nothing.&lt;/p&gt;

&lt;p&gt;Once this is in place the loop actually closes: generate → validate → regenerate what failed → report. &lt;strong&gt;You review the summary, not the footage.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest limitation
&lt;/h2&gt;

&lt;p&gt;These catch &lt;em&gt;mechanical&lt;/em&gt; failures. Freezes, drift, pops, misaligned cuts.&lt;/p&gt;

&lt;p&gt;They cannot tell you the video is boring, off-brand, or says the wrong thing.&lt;/p&gt;

&lt;p&gt;That distinction is useful rather than disappointing — it tells you where to put your attention. Let the validators own the mechanical layer completely, and spend your review time on judgement, which is the part they can't touch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test for any tool in this space
&lt;/h2&gt;

&lt;p&gt;Ask what it does &lt;em&gt;after&lt;/em&gt; generation.&lt;/p&gt;

&lt;p&gt;Most AI video tooling stops at the model call and hands you a file. That's fine for one clip. At any volume, the interesting engineering is entirely in the verification layer — and its presence or absence tells you whether someone actually shipped video at scale with this thing, or just demoed it.&lt;/p&gt;




&lt;p&gt;Install is one line if you want to try it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://files.dlazy.com/cdn/cli | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then &lt;code&gt;dlazy -h&lt;/code&gt; for the tool list. I'd start with a throwaway clip and deliberately break it — generate something, then run the validators and confirm they actually complain. A check you haven't seen fail isn't a check you trust yet.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Batch Image Generation with Codex and dLazy: Build the Pipeline, Not a Prompt Loop</title>
      <dc:creator>xiaodong Zhang</dc:creator>
      <pubDate>Fri, 21 Aug 2026 03:09:23 +0000</pubDate>
      <link>https://dev.to/xiaodong_zhang_bd8dc835b3/batch-image-generation-with-codex-and-dlazy-build-the-pipeline-not-a-prompt-loop-56f2</link>
      <guid>https://dev.to/xiaodong_zhang_bd8dc835b3/batch-image-generation-with-codex-and-dlazy-build-the-pipeline-not-a-prompt-loop-56f2</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fngszl1jyyf0ucda3el2d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fngszl1jyyf0ucda3el2d.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One product identity, four coordinated campaign settings&lt;br&gt;
Generating one good product image is a creative task. Generating 100 good product images that look like they belong to the same catalog is a systems problem.&lt;br&gt;
That is the useful idea behind dLazy's batch-image skill. It gives Codex an operator playbook: read a SKU manifest, keep one visual specification frozen, call the dLazy CLI once per SKU, save results under deterministic names, retry failures, and produce a report you can audit.&lt;br&gt;
The key design choice: SKU count drives the batch. The CLI's --batch flag stays at 1, because increasing it creates extra generations for every SKU and multiplies spend.&lt;br&gt;
The architecture in one screen&lt;/p&gt;

&lt;p&gt;Batch-image execution pipeline from manifest to QA&lt;br&gt;
Codex does not run the image model locally. The installed skill teaches Codex the workflow; the dLazy CLI sends prompts and image inputs to the hosted API; seedream-5.0 generates the asset; and --save downloads it to your project.&lt;br&gt;
The skill states that prompts and parameters are sent to api.dlazy.com, local media inputs are uploaded to files.dlazy.com, and generated URLs are hosted there. Treat that as a normal cloud-processing boundary: do not submit assets you are not authorized to upload.&lt;br&gt;
Install the skill and CLI&lt;br&gt;
Ask Codex to install the skill from the repository path:&lt;br&gt;
Install this Codex skill:&lt;br&gt;
&lt;a href="https://github.com/dlazyai/ecommerce-skills/tree/main/skills/batch-image" rel="noopener noreferrer"&gt;https://github.com/dlazyai/ecommerce-skills/tree/main/skills/batch-image&lt;/a&gt;&lt;br&gt;
Codex skills use a required SKILL.md. If a downloaded repository uses lowercase skill.md, normalize the filename during installation. You can review the original batch-image skill and the official Codex skills documentation before running it.&lt;br&gt;
Use the pinned CLI version declared by the skill:&lt;br&gt;
npx @dlazy/&lt;a href="mailto:cli@1.2.3"&gt;cli@1.2.3&lt;/a&gt; seedream-5.0 -h&lt;/p&gt;

&lt;h1&gt;
  
  
  or: npm install -g @dlazy/&lt;a href="mailto:cli@1.2.3"&gt;cli@1.2.3&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;dlazy auth set &lt;br&gt;
Get the API key from the dLazy dashboard. Do not paste it into a manifest, prompt, repository, or article draft.&lt;br&gt;
Start with one SKU&lt;br&gt;
The model command is dlazy seedream-5.0. The skill recommends 2k, one consistent aspect ratio, and a deterministic output path.&lt;br&gt;
dlazy seedream-5.0 \&lt;br&gt;
  --prompt 'Commercial ecommerce photo. Image 1 is the product: black polished leather derby shoe with a chunky lace-up sole. Preserve its color, material texture, silhouette, and construction. Place it in one fixed visual system: warm-white studio, soft top light plus left fill, 45-degree view, consistent lower-right shadow and whitespace. No text or watermark.' \&lt;br&gt;
  --images docs/batch-image/sku-b-shoes.jpg \&lt;br&gt;
  --size 1:1 --resolution 2k \&lt;br&gt;
  --save docs/batch-image/out/SKU002.jpg&lt;br&gt;
Do this before you automate. A bad spec multiplied by 100 is still a bad spec—just more expensive.&lt;br&gt;
Separate the prompt into variables and invariants&lt;br&gt;
Every SKU gets a variable block: category, color, material, and structural details. Every run gets the same invariant block: background, lighting, camera angle, product occupancy, shadow direction, color grade, and output style.&lt;br&gt;
VARIABLE — changes per SKU&lt;br&gt;
Image 1 is the product: [category + color + material + structural details].&lt;br&gt;
Preserve its color, texture, silhouette, and construction.&lt;/p&gt;

&lt;p&gt;SPEC — byte-for-byte identical across the run&lt;br&gt;
Warm-white studio; soft top light plus left fill; 45-degree view;&lt;br&gt;
consistent product scale, margins, and lower-right shadow;&lt;br&gt;
commercial product photography; no text; no watermark.&lt;br&gt;
If you change the spec halfway through, you no longer have one batch. You have two visual systems.&lt;br&gt;
Drive the run from a manifest&lt;br&gt;
SKU001,docs/batch-image/sku-a-sweater.jpg,olive cable-knit crewneck sweater with a relaxed dropped shoulder&lt;br&gt;
SKU002,docs/batch-image/sku-b-shoes.jpg,black polished leather derby shoe with a chunky lace-up sole&lt;br&gt;
The reference implementation in the skill uses five parallel workers, three attempts with increasing delays, SKU-based filenames, and report.csv. Keep concurrency around four or five if rate limits appear.&lt;br&gt;
mkdir -p docs/batch-image/out&lt;br&gt;
SPEC='Warm-white studio, soft top light plus left fill, 45-degree view, consistent product scale, margins and lower-right shadow. Commercial product photography, no text, no watermark.'&lt;/p&gt;

&lt;p&gt;run_one() {&lt;br&gt;
  IFS=, read -r SKU IMG DESC &amp;lt;&amp;lt;&amp;lt; "$1"&lt;br&gt;
  for attempt in 1 2 3; do&lt;br&gt;
    dlazy seedream-5.0 \&lt;br&gt;
      --prompt "Image 1 is the product: ${DESC}. Preserve its identity. ${SPEC}" \&lt;br&gt;
      --images "$IMG" --size 1:1 --resolution 2k --batch 1 \&lt;br&gt;
      --save "docs/batch-image/out/${SKU}.jpg" &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; break&lt;br&gt;
    sleep $((attempt * 10))&lt;br&gt;
  done&lt;br&gt;
  if [ -f "docs/batch-image/out/${SKU}.jpg" ]; then echo "${SKU},ok"; else echo "${SKU},fail"; fi&lt;br&gt;
}&lt;br&gt;
export -f run_one; export SPEC&lt;br&gt;
xargs -P 5 -I{} bash -c 'run_one "{}"' &amp;lt; manifest.csv | tee docs/batch-image/report.csv&lt;br&gt;
For large catalogs, add --no-wait, capture each generateId, then poll with dlazy status  --wait. The asynchronous path prevents a terminal session from blocking on every job.&lt;br&gt;
Estimate before you fan out&lt;br&gt;
Use --dry-run to inspect the payload and estimated cost before executing:&lt;br&gt;
dlazy seedream-5.0 --dry-run --prompt '...' --images a.jpg --size 1:1&lt;br&gt;
wc -l &amp;lt; manifest.csv&lt;br&gt;
The repository's example lists seedream-5.0 at 5 credits for a 1:1, 2K output, so 100 SKUs are illustrated as roughly 500 credits. Pricing can change; treat the CLI's current estimate as the source of truth. Reserve 4K for print work. The skill says gpt-image-2 costs about six times more, so use it selectively for fidelity failures rather than mixing models inside the initial batch.&lt;br&gt;
QA is part of the pipeline&lt;br&gt;
The recommended rollout is deliberately boring: one SKU, then five edge cases, then the full manifest. Sample dark, light, reflective, large, and small products. After the run, inspect the report and randomly review 10% of outputs.&lt;br&gt;
Check identity, texture, color, product scale, margins, lighting, shadow direction, artifacts, text, and watermarks. If one subgroup needs gpt-image-2, rerun only those SKUs and record the exception in the report.&lt;br&gt;
Failure modes worth engineering for&lt;br&gt;
unauthorized: set the key with dlazy auth set  and resume.&lt;br&gt;
insufficient_balance: add credits before retrying.&lt;br&gt;
Local file not found: validate manifest paths before launch.&lt;br&gt;
Server or async failure: retry with backoff and preserve the failed SKU list.&lt;br&gt;
Visual drift: freeze the invariant spec and rerun the entire affected batch.&lt;br&gt;
Rate limiting: reduce concurrency to four or five.&lt;br&gt;
Production checklist&lt;br&gt;
1.Validate every input path and SKU identifier.&lt;br&gt;
2.Lock one aspect ratio and 2k resolution for the batch.&lt;br&gt;
3.Freeze the invariant prompt block.&lt;br&gt;
4.Approve one SKU, then five boundary SKUs.&lt;br&gt;
5.Run --dry-run and calculate the catalog total.&lt;br&gt;
6.Execute with bounded concurrency, retries, and deterministic filenames.&lt;br&gt;
7.Review report.csv; rerun only failed items.&lt;br&gt;
8.Sample at least 10% for visual QA.&lt;br&gt;
The scalable unit here is not a clever prompt. It is a reproducible job: manifest in, assets and report out. That is what makes batch-image useful inside Codex.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>tutorial</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
