Welcome to the ZipRight Virtual Try-On (VTO) research repository, containing a modular 15-stage pipeline, benchmark suites, and optimization scripts designed for edge deployments.
ZipRight VTO is a production-functional, modular try-on system designed to process human clothing try-on tasks by splitting the problem into 15 specific, isolated stages. This allows fine-grained optimizations at each layer (e.g. separate networks for parsing, geometry estimation, occlusion handling, shadow matching, and super-resolution) rather than relying on a single end-to-end black box model.
graph TD
A[Inputs: Person Image & Garment Image] --> Stage1[Stage 1: Human Parsing ONNX/OpenPose]
Stage1 --> Stage2[Stage 2: Body Geometry DensePose]
Stage1 --> Stage3[Stage 3: Garment Understanding OCR]
Stage1 --> Stage6[Stage 6: Occlusion Reasoning]
Stage1 --> Stage7[Stage 7: Identity preservation Face Lock]
Stage3 --> Stage4[Stage 4: Garment Flow Warping]
Stage4 --> Stage5[Stage 5: Physics & Shading Map]
Stage5 --> Stage8[Stage 8: Core Diffusion Generator Leffa]
Stage2 --> Stage8
Stage6 --> Stage8
Stage7 --> Stage8
Stage8 --> Stage9[Stage 9: Logo Preservation]
Stage9 --> Stage10[Stage 10: Fabric Texture Enhancement]
Stage10 --> Stage11[Stage 11: Collar Reconstruction]
Stage11 --> Stage12[Stage 12: Sleeve Reconstruction]
Stage12 --> Stage13[Stage 13: Lighting Adaptation]
Stage13 --> Stage14[Stage 14: Super Resolution 2K]
Stage14 --> Stage15[Stage 15: Quality Verification & SSIM]
Stage15 --> Out[Output: result.png]
zipright-vto-lab/
├── engines/ # Core VTO engines
│ ├── base.py # Base class definitions
│ ├── catvton_engine.py # CatVTON model wrapper
│ ├── idmvton_engine.py # IDM-VTON model wrapper
│ ├── leffa_engine.py # Leffa wrapper with dynamic VRAM paging
│ ├── zipright.py # Main 15-Stage pipeline orchestrator
│ └── zipright_stages/ # Implementation files for each stage
├── inputs/ # Sample inputs
├── models/ # Submodule repositories
│ ├── catvton/
│ ├── comfyui_controlnet_aux/
│ └── idmvton/
├── scripts/ # Execution and benchmark scripts
│ ├── benchmark_parsing.py
│ ├── run_all.py
│ └── run_zipright.py
├── .gitignore
├── README.md
└── README_MODELS.md # Weight download instructions
Ensure you have a modern GPU with CUDA support (e.g. RTX 3050 Laptop or higher).
# Clone the repository
git clone <repository_url>
cd zipright-vto-lab
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install requirements
pip install -r requirements.txt
Note: For downloading the required AI model weight checkpoints, please follow the steps in README_MODELS.md.
To run the full 15-stage pipeline on sample input:
python scripts/run_zipright.py
Outputs are written to outputs/zipright/result.png and debugging intermediate maps are saved in outputs/debug/generator/.
To run the complete engine benchmark comparison (comparing ZipRight against baseline CatVTON and IDM-VTON):
python scripts/run_all.py
Running state-of-the-art VTO models typically requires > 12GB of VRAM. To run ZipRight comfortably under a strict 6GB VRAM limit (such as on RTX 3050 Laptop GPUs), the following memory techniques are implemented in engines/leffa_engine.py:
.to("cpu")) and deleted from the GPU immediately after finishing their step.torch.cuda.empty_cache() and Python garbage collection gc.collect() are forced between each phase.| Stage | Name | Status | Notes |
|---|---|---|---|
| Stage 1 | Human Parsing | Production Ready | ONNX Parsing + OpenPose mappings fully verified. |
| Stages 2–7 | Condition Estimations | Functional (Version 1) | Connected to Stage 8. Active for future optimizations. |
| Stage 8 | Core Diffusion Generator | Functional (Version 1) | Leffa Backbone + CFG + VRAM optimizations active and verified. |
| Stages 9–15 | Post-Processing & Quality | Pending | Baselines active in pipeline; pending future optimization rounds. |
torch.compile or TensorRT to accelerate inference steps.Python
93.6%
Cuda
3.1%
C++
2.0%
Welcome to the ZipRight Virtual Try-On (VTO) research repository, containing a modular 15-stage pipeline, benchmark suites, and optimization scripts designed for edge deployments.
ZipRight VTO is a production-functional, modular try-on system designed to process human clothing try-on tasks by splitting the problem into 15 specific, isolated stages. This allows fine-grained optimizations at each layer (e.g. separate networks for parsing, geometry estimation, occlusion handling, shadow matching, and super-resolution) rather than relying on a single end-to-end black box model.
graph TD
A[Inputs: Person Image & Garment Image] --> Stage1[Stage 1: Human Parsing ONNX/OpenPose]
Stage1 --> Stage2[Stage 2: Body Geometry DensePose]
Stage1 --> Stage3[Stage 3: Garment Understanding OCR]
Stage1 --> Stage6[Stage 6: Occlusion Reasoning]
Stage1 --> Stage7[Stage 7: Identity preservation Face Lock]
Stage3 --> Stage4[Stage 4: Garment Flow Warping]
Stage4 --> Stage5[Stage 5: Physics & Shading Map]
Stage5 --> Stage8[Stage 8: Core Diffusion Generator Leffa]
Stage2 --> Stage8
Stage6 --> Stage8
Stage7 --> Stage8
Stage8 --> Stage9[Stage 9: Logo Preservation]
Stage9 --> Stage10[Stage 10: Fabric Texture Enhancement]
Stage10 --> Stage11[Stage 11: Collar Reconstruction]
Stage11 --> Stage12[Stage 12: Sleeve Reconstruction]
Stage12 --> Stage13[Stage 13: Lighting Adaptation]
Stage13 --> Stage14[Stage 14: Super Resolution 2K]
Stage14 --> Stage15[Stage 15: Quality Verification & SSIM]
Stage15 --> Out[Output: result.png]
zipright-vto-lab/
├── engines/ # Core VTO engines
│ ├── base.py # Base class definitions
│ ├── catvton_engine.py # CatVTON model wrapper
│ ├── idmvton_engine.py # IDM-VTON model wrapper
│ ├── leffa_engine.py # Leffa wrapper with dynamic VRAM paging
│ ├── zipright.py # Main 15-Stage pipeline orchestrator
│ └── zipright_stages/ # Implementation files for each stage
├── inputs/ # Sample inputs
├── models/ # Submodule repositories
│ ├── catvton/
│ ├── comfyui_controlnet_aux/
│ └── idmvton/
├── scripts/ # Execution and benchmark scripts
│ ├── benchmark_parsing.py
│ ├── run_all.py
│ └── run_zipright.py
├── .gitignore
├── README.md
└── README_MODELS.md # Weight download instructions
Ensure you have a modern GPU with CUDA support (e.g. RTX 3050 Laptop or higher).
# Clone the repository
git clone <repository_url>
cd zipright-vto-lab
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install requirements
pip install -r requirements.txt
Note: For downloading the required AI model weight checkpoints, please follow the steps in README_MODELS.md.
To run the full 15-stage pipeline on sample input:
python scripts/run_zipright.py
Outputs are written to outputs/zipright/result.png and debugging intermediate maps are saved in outputs/debug/generator/.
To run the complete engine benchmark comparison (comparing ZipRight against baseline CatVTON and IDM-VTON):
python scripts/run_all.py
Running state-of-the-art VTO models typically requires > 12GB of VRAM. To run ZipRight comfortably under a strict 6GB VRAM limit (such as on RTX 3050 Laptop GPUs), the following memory techniques are implemented in engines/leffa_engine.py:
.to("cpu")) and deleted from the GPU immediately after finishing their step.torch.cuda.empty_cache() and Python garbage collection gc.collect() are forced between each phase.| Stage | Name | Status | Notes |
|---|---|---|---|
| Stage 1 | Human Parsing | Production Ready | ONNX Parsing + OpenPose mappings fully verified. |
| Stages 2–7 | Condition Estimations | Functional (Version 1) | Connected to Stage 8. Active for future optimizations. |
| Stage 8 | Core Diffusion Generator | Functional (Version 1) | Leffa Backbone + CFG + VRAM optimizations active and verified. |
| Stages 9–15 | Post-Processing & Quality | Pending | Baselines active in pipeline; pending future optimization rounds. |
torch.compile or TensorRT to accelerate inference steps.Python
93.6%
Cuda
3.1%
C++
2.0%