How levihsu/ootdiffusion works
OOTDiffusion is a virtual try-on application: a user supplies a person image and garment, preprocessing derives pose and parsing information, and a half-body or full-body diffusion model produces try-on images. The README also documents a Gradio demo, released checkpoints, and ONNX support for human parsing. The graph reflects documented capabilities and relationships visible in the README or SOURCE INDEX; several subsystem internals were not sampled, so their finer call paths are omitted.
Main entry points: run_ootd.py CLI runner · gradio_ootd.py Gradio demo · parsing_api.py Human parsing · pipeline_ootd.py Diffusion pipeline
Components 20
User entrypoints
- CLI runner
run/run_ootd.py - Gradio demo
run/gradio_ootd.py - Try-on helpers
run/utils_ootd.py
Image preparation
- Pose estimation
preprocess/openpose/run_openpose.py - OpenPose detector
preprocess/openpose/annotator/openpose - Human parsing
preprocess/humanparsing/parsing_api.py - Parsing dataset
preprocess/humanparsing/datasets/simple_extractor_dataset.py - Parsing transforms
preprocess/humanparsing/utils/transforms.py - Parsing network
preprocess/humanparsing/networks/AugmentCE2P.py
Try-on inference
- Half-body model
ootd/inference_ootd_hd.py - Full-body model
ootd/inference_ootd_dc.py
Diffusion components
- Diffusion pipeline
ootd/pipelines_ootd/pipeline_ootd.py - Garment UNet
ootd/pipelines_ootd/unet_garm_2d_condition.py - Try-on UNet
ootd/pipelines_ootd/unet_vton_2d_condition.py - Garment blocks
ootd/pipelines_ootd/unet_garm_2d_blocks.py - Try-on blocks
ootd/pipelines_ootd/unet_vton_2d_blocks.py - Garment transformer
ootd/pipelines_ootd/transformer_garm_2d.py - Try-on transformer
ootd/pipelines_ootd/transformer_vton_2d.py
Other components
- User
- Try-on images
Connections 25
- User → CLI runner: provides inputs
- User → Gradio demo: provides inputs
- CLI runner → Try-on helpers: uses helpers
run/run_ootd.py - Gradio demo → Try-on helpers: uses helpers
run/gradio_ootd.py - CLI runner → Pose estimation: requests pose
run/run_ootd.py - CLI runner → Human parsing: requests parsing
run/run_ootd.py - Gradio demo → Pose estimation: requests pose
run/gradio_ootd.py - Gradio demo → Human parsing: requests parsing
run/gradio_ootd.py - Pose estimation → OpenPose detector: runs detector
preprocess/openpose/run_openpose.py - Human parsing → Parsing dataset: loads dataset
preprocess/humanparsing/parsing_api.py - Human parsing → Parsing transforms: uses transforms
preprocess/humanparsing/parsing_api.py - Human parsing → Parsing network: runs network
- CLI runner → Half-body model: selects model
run/run_ootd.py - CLI runner → Full-body model: selects model
run/run_ootd.py - Gradio demo → Half-body model: selects model
run/gradio_ootd.py - Gradio demo → Full-body model: selects model
run/gradio_ootd.py - Half-body model → Diffusion pipeline: invokes pipeline
ootd/inference_ootd_hd.py - Full-body model → Diffusion pipeline: invokes pipeline
ootd/inference_ootd_dc.py - Diffusion pipeline → Garment UNet: uses garment UNet
ootd/pipelines_ootd/pipeline_ootd.py - Diffusion pipeline → Try-on UNet: uses try-on UNet
ootd/pipelines_ootd/pipeline_ootd.py - Garment UNet → Garment blocks: dispatches blocks
ootd/pipelines_ootd/unet_garm_2d_condition.py - Try-on UNet → Try-on blocks: dispatches blocks
ootd/pipelines_ootd/unet_vton_2d_condition.py - Garment blocks → Garment transformer: uses transformer
ootd/pipelines_ootd/unet_garm_2d_blocks.py - Try-on blocks → Try-on transformer: uses transformer
ootd/pipelines_ootd/unet_vton_2d_blocks.py - Diffusion pipeline → Try-on images: returns images
ootd/pipelines_ootd/pipeline_ootd.py