Back homeCase Study

2025 • Image Generation Techniques

Wardrobe Expansion through AI Inpainting

Replaced Spider-Man costumes with Doctor Strange, Captain America, Iron Man, Star-Lord, and Thor without losing face consistency.

AI InpaintingWardrobe Automation
Spider-Man suit used as the base image before inpainting

Overview

Projects showcasing my ability to work with input data and generate creative outputs.

Expanded Spider-Man’s wardrobe using SDXL Inpainting and style transfer, swapping Spider-Man into Marvel heroes while preserving facial identity


Problem

Character outfit variation in AI art often comes at the cost of losing facial consistency. Most models struggle to maintain the subject’s unique features when swapping clothes or costumes. The goal was to:

  • Replace Spider-Man outfit with different Marvel character costumes.
  • Keep the face intact and consistent across all generated versions.
  • Build a flexible workflow for wardrobe expansion using inpainting.

Approach

  1. Segmentation

    • Started with a reference image.
    • Applied the Segment Anything node to isolate the Spider-Man suit.
    • Generated a clean mask of the outfit, keeping the face untouched.
  2. Inpainting

    • Used the SDXL Inpainting model to fill in the masked regions with new outfits.
    • Ensured identity preservation by protecting the facial region.
  3. Style Guidance

    • Integrated Style Transfer IPAdapters for controlled outfit generation.
    • Supplied reference images of Marvel characters (Doctor Strange, Captain America, Iron Man, Star-Lord, Thor) to guide the design.
  4. Iteration & Refinement

    • Ran multiple trials with different prompts and reference passes.
    • Fine-tuned until the output combined Marvel outfit fidelity with accurate facial details.

Tools & Stack

  • Segmentation: Segment Anything (SAM) node in ComfyUI
  • Inpainting: SDXL Inpainting model
  • Style Transfer: IPAdapters with Marvel references
  • Workflow: ComfyUI

Outcome

  • Successfully generated five Marvel-inspired outfit variations (Doctor Strange, Captain America, Iron Man, Star-Lord, Thor).
  • Preserved the original facial identity across all outputs.
  • Created a repeatable wardrobe expansion workflow that can adapt to any reference style or outfit.

Gallery

Marvel Wardrobe Expansion

From Spider-Man to Doctor Strange, Iron Man, and more.

Spider-Man
Base Image • Spider-Man
Captain America inspired outfit
Variant • Captain America
Doctor Strange inspired outfit
Variant • Doctor Strange
Iron Man inspired outfit
Variant • Iron Man
Star-Lord inspired outfit
Variant • Star-Lord
Thor inspired outfit
Variant • Thor

Let’s collaborate

Need this energy on your iOS or AI team?

I’m open to full-time roles and love building with teams shipping GenAI into production.

me@ankitgoyal.io