In the fast-paced world of e-commerce fashion, efficiency is everything. Conducting a new photoshoot for every single garment colorway and branding update is time-consuming and expensive. To solve this, I recently developed a production-ready ComfyUI workflow designed to automate product variations from a single base image.

Here is a breakdown of the brief, the technical pipeline, and the challenges involved in bringing this digital wardrobe to life.
The Brief: E-Commerce Fashion Automation
The objective was straightforward but technically demanding: Take a standard studio photograph of a model wearing a blank black hoodie, and programmatically generate new product colorways (such as Sage Green, Vibrant Yellow, and Hot Pink).
Beyond just changing the color, the pipeline needed to composite a brand logo (in this case, Nike) onto the chest. The critical requirement was absolute realism, preserving the original fabric’s texture, lighting, and fold structures, while ensuring the logo looked like a physical, raised embroidered patch cast naturally onto the fabric.

The Pipeline: Masking, Swapping, and Inpainting
To achieve this, I built a multi-stage image-to-image and inpainting workflow utilizing FLUX models within ComfyUI.
- Targeted Masking & Color Injection: The first stage isolates the hoodie from the subject and background. Instead of relying purely on text prompts to guess the color, the workflow drives the color conditioning using exact RGB values.
- Structural Preservation: By utilizing reference conditioning and latent noise masking, the AI is forced to map the new solid color directly over the existing structural data. This ensures that every crease, shadow, and highlight from the original photograph is perfectly retained in the new colorway.

- Logo Integration: The secondary stage handles the branding. A 2D logo mask is composited onto the targeted chest area.
- The Embroidery Pass: Finally, targeted VAE inpainting is applied specifically to the logo’s masked region. Guided by precise positive prompts focused on macro details (“Raised stitching,” “Cast shadows,” “Neat and even color”), the AI converts the flat graphic into a photorealistic embroidered patch.
The Challenge: Nailing the Embroidery Composite
While altering the garment’s color was a relatively smooth process, the true technical hurdle of this project was compositing the logo onto the hoodie seamlessly.
The transition from a flat 2D graphic to a realistic, textured embroidered patch proved to be incredibly sensitive to backend parameters. Even a very small change in the KSampler values, such as a slight adjustment to the denoise level, step count, or altering the scheduler type, would cause the logo embroidery to break, artifact, or simply look “weird” and unnatural. Finding the exact mathematical sweet spot where the AI recognized the structure of the fabric underneath while generating the thread texture on top required extensive iterative testing.

The Business Impact: Efficiency at Scale
To truly understand the strength of this workflow, it is important to look at the tangible savings in money and man-hours.
Traditionally, producing high-quality marketing assets for four distinct colorways with updated branding requires a massive logistical lift: manufacturing physical garment samples, renting studio space, and hiring a photographer, model, and hair/makeup artist. Following the shoot, a retoucher would spend hours color-correcting and cleaning up the images. That traditional route easily consumes weeks of planning and thousands of dollars per campaign.
In contrast, developing this complete procedural pipeline took less than a single day. Once the node architecture and KSampler parameters were locked in, the marginal cost of creating a new variation dropped to zero. Generating a new, color-accurate hoodie with a photorealistic, perfectly placed embroidered logo now takes mere seconds. By front-loading the technical development, this workflow completely eliminates the need for reshoots, saving countless man-hours and drastically reducing the budget required for e-commerce catalog expansion.
The Final Output
The system is now highly stable and capable of producing endless variations with near-perfect positioning and consistency of the embroidered logo’s look across all generated batches.




This project was a great exercise in pushing generative AI beyond conceptual ideation and turning it into a precise, highly scalable, and production-ready tool for commercial asset creation.
