DEV Community

xiaodong Zhang
xiaodong Zhang

Posted on

Upload 8 Products at Once: Build Complete Outfit Images with Codex and image-fusion

From individual product shots to a complete ecommerce look
Fashion sellers often have every individual product shot they need but no complete styling image. The sweater, trousers, shoes, hat, and bag have all been photographed, yet booking a model, rebuilding the set, styling the outfit, and shooting it again still takes time.
The image-fusion skill offers a more automated workflow. Codex reads several apparel product images, follows explicit instructions about where each item should appear, and calls a third-party image-generation service to combine them into one complete look on a model.
In this tutorial, you will:
1.Install the image-fusion skill in Codex;
2.Install and sign in to the dLazy CLI;
3.Validate your first task with a dry-run;
4.Learn the most common failure points in multi-product fusion.
Important: image-fusion is a workflow that Codex reads, not a standalone image editor. A third-party dLazy cloud model generates the final image, so you also need a dLazy account, the CLI, and available credits.
What can it produce?
One task can include up to eight product images, such as:
Tops, bottoms, and outerwear;
Shoes, bags, hats, and scarves;
Jewelry and other accessories.
You can also provide a pose reference or a model reference. Missing items can be specified in text—for example, “add ivory wide-leg trousers and white sneakers.”
This workflow is useful for outfit hero images, complete styling concepts, lookbooks, and cross-category marketing assets. It is not suitable for sizing recommendations and should never be used to fabricate an endorsement.
Before you begin


How to prepare product reference images
You will need:
A working Codex desktop app, CLI, or IDE extension;
Network access to GitHub and dLazy;
Node.js with npx or npm;
A dLazy account, an API key, or permission to use device login;
At least two apparel product images for testing.
Use JPG, JPEG, PNG, or WebP images. Put only one product in each image, keep the background clean, and use a resolution above 400×400. You can upload up to eight product images; with pose and model references included, keep the total number of reference images at ten or fewer.
Install the image-fusion skill


The complete Codex and image-fusion workflow
A Codex skill is essentially a folder containing a SKILL.md file. The original skill is available here:
GitHub: dlazyai/ecommerce-skills — image-fusion
Option A: Ask Codex to install it
Create a new Codex task and enter:
$skill-installer
Install the image-fusion skill from this GitHub repository path:
https://github.com/dlazyai/ecommerce-skills/tree/main/skills/image-fusion

During installation, check the entry filename. If the repository uses
lowercase skill.md, rename it to uppercase SKILL.md and verify that
Codex can discover the skill.
After installation, restart Codex. Type $, or run /skills in the CLI or IDE extension, and confirm that image-fusion appears in the list.
Option B: Install it manually
For project-only use, place the skill here:
.agents/skills/image-fusion/SKILL.md
To make it available across projects, use the user-level directory:
~/.agents/skills/image-fusion/SKILL.md
Filename case is the easiest detail to miss. The repository page uses lowercase skill.md, while Codex expects the standard entry filename SKILL.md. On a case-sensitive system, Codex may not discover the skill until the file is renamed.
Install the dLazy CLI and sign in
Installing the skill only teaches Codex the workflow. The dLazy CLI performs the actual generation.
Run the version specified by the skill without installing it globally:
npx @dlazy/cli@1.2.3 --help
Or install it globally:
npm install -g @dlazy/cli@1.2.3
Then use device login:
dlazy login
If you already have an API key:
dlazy auth set YOUR_API_KEY
Never paste a real API key into a public conversation, screenshot, or Git repository. Third-party versions and permissions can change, so check both the original skill instructions and the dLazy CLI source before production use.
Your first generation: start with a dry run


From individual product images to a complete look
Put your test images in the project:
docs/image-fusion/
├── sweater.jpg
├── hat.jpg
└── necklace.jpg
Then enter the following in Codex:
$image-fusion

Combine the following three products on one model and create a 3:4,
full-body ecommerce outfit image:

  1. docs/image-fusion/sweater.jpg: olive cable-knit sweater, worn as the top;
  2. docs/image-fusion/hat.jpg: multicolor woven bucket hat, worn on the head;
  3. docs/image-fusion/necklace.jpg: pearl necklace, worn around the neck.

The bottoms and shoes are not provided. Add ivory wide-leg trousers
and white sneakers. Use a young Asian woman, standing front-facing,
with her full body visible. Use a light-gray studio background and soft
overhead lighting. Preserve each product's color, material, pattern,
and silhouette. Do not add text or watermarks.

Run a dry run first to check the parameters and estimated credit usage.
Do not generate yet. Show me the command you plan to execute for approval.
After checking the image order, prompt, aspect ratio, and estimated usage, reply:
The parameters look correct. Generate two versions for comparison
and save the results in docs/image-fusion/.
Multi-product fusion is inherently variable. Generating two to four candidates and refining the strongest one is usually more reliable than betting on a single output.
Five rules for more consistent results

  1. Keep image order and written numbering aligned Use a predictable order: Top → Bottom → Outerwear → Shoes → Bag → Accessories → Pose reference → Model reference
  2. Put only one product in each image If one source image contains both a top and trousers, the model is more likely to misidentify or blend the products.
  3. Name every product explicitly Do not simply say, “Put these clothes on the model.” State which image contains which product, where it should be worn, and how the layers relate to one another. Use the black knit top in image 1 as the base layer. Wear the camel coat in image 3 open over image 1, leaving the neckline and front of the knit top visible.
  4. Specify missing items too If you upload only a top, define the color, silhouette, and style of the trousers and shoes instead of leaving every choice to the model.
  5. Lock the visual conditions for batch production For a series of looks, reuse the same model reference, pose, framing, background, lighting, subject position, and negative space. Change only the product list. Troubleshooting Codex cannot find the skill

Confirm that the directory contains uppercase SKILL.md, restart Codex, and check /skills. You can also invoke it explicitly with $image-fusion.
The CLI returns unauthorized
dlazy login
Alternatively, set the API key again.
The CLI returns insufficient_balance
Check whether the dLazy account has enough credits.
The generated image is missing a product
Add this instruction near the end of the prompt:
All listed products must appear in the final image. Verify each item;
if any product is missing, treat the result as a failure.
Also recheck the number of images, upload order, and wearing position assigned to each item.
Privacy and commercial review
When the task runs, prompts, parameters, and local images are uploaded to a third-party cloud service. Before using unreleased products, identifiable people, or sensitive material, confirm that you have permission to upload them and review the service terms.
AI image fusion cannot guarantee perfect product fidelity. Before publishing a commercial image, manually verify:
Product count and layering;
Color, fabric texture, and pattern placement;
Hardware, accessories, and logos;
Whether the generated presentation matches the physical product.
Summary
The workflow fits into four steps:
Install the skill → Sign in to dLazy → Upload and describe products → Dry run, then generate
Once configured, future tasks only require invoking $image-fusion, supplying the product images, and defining the model, pose, background, and lighting.
What ecommerce image problem would you test first? Share your use case or lessons learned in the comments.
Related links
Original image-fusion skill · OpenAI: Build skills · dLazy CLI source · dLazy website

Top comments (0)