MCPcopy
hub / github.com/levihsu/OOTDiffusion

github.com/levihsu/OOTDiffusion @main sqlite

repository ↗ · DeepWiki ↗
2,584 symbols 9,167 edges 285 files 945 documented · 37%
README

OOTDiffusion

This repository is the official implementation of OOTDiffusion

🤗 Try out OOTDiffusion

(Thanks to ZeroGPU for providing A100 GPUs)

OOTDiffusion: Outfitting Fusion based Latent Diffusion for Controllable Virtual Try-on [arXiv paper]

Yuhao Xu, Tao Gu, Weifeng Chen, Chengcai Chen

Xiao-i Research

Our model checkpoints trained on VITON-HD (half-body) and Dress Code (full-body) have been released

  • 🤗 Hugging Face link for checkpoints (ootd, humanparsing, and openpose)
  • 📢📢 We support ONNX for humanparsing now. Most environmental issues should have been addressed : )
  • Please also download clip-vit-large-patch14 into checkpoints folder
  • We've only tested our code and models on Linux (Ubuntu 22.04)

demo  workflow 

Installation

  1. Clone the repository
git clone https://github.com/levihsu/OOTDiffusion
  1. Create a conda environment and install the required packages
conda create -n ootd python==3.10
conda activate ootd
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
pip install -r requirements.txt

Inference

  1. Half-body model
cd OOTDiffusion/run
python run_ootd.py --model_path <model-image-path> --cloth_path <cloth-image-path> --scale 2.0 --sample 4
  1. Full-body model

Garment category must be paired: 0 = upperbody; 1 = lowerbody; 2 = dress

cd OOTDiffusion/run
python run_ootd.py --model_path <model-image-path> --cloth_path <cloth-image-path> --model_type dc --category 2 --scale 2.0 --sample 4

Citation

@article{xu2024ootdiffusion,
  title={OOTDiffusion: Outfitting Fusion based Latent Diffusion for Controllable Virtual Try-on},
  author={Xu, Yuhao and Gu, Tao and Chen, Weifeng and Chen, Chengcai},
  journal={arXiv preprint arXiv:2403.01779},
  year={2024}
}

Star History

Star History Chart

TODO List

  • [x] Paper
  • [x] Gradio demo
  • [x] Inference code
  • [x] Model weights
  • [ ] Training code

Core symbols most depended-on inside this repo

to
called by 137
preprocess/humanparsing/mhp_extension/detectron2/detectron2/structures/boxes.py
cat
called by 128
preprocess/humanparsing/mhp_extension/detectron2/detectron2/structures/boxes.py
get
called by 106
preprocess/humanparsing/mhp_extension/detectron2/demo/predictor.py
get
called by 101
preprocess/humanparsing/mhp_extension/detectron2/detectron2/data/catalog.py
cat
called by 47
preprocess/humanparsing/mhp_extension/detectron2/detectron2/layers/wrappers.py
extend
called by 37
preprocess/humanparsing/mhp_extension/detectron2/detectron2/modeling/anchor_generator.py
clone
called by 36
preprocess/humanparsing/mhp_extension/detectron2/detectron2/structures/boxes.py
resize
called by 34
preprocess/humanparsing/mhp_extension/detectron2/projects/DensePose/densepose/data/structures.py

Shape

Method 1,539
Function 593
Class 452

Languages

Python100%

Modules by API surface

ootd/pipelines_ootd/unet_vton_2d_blocks.py111 symbols
ootd/pipelines_ootd/unet_garm_2d_blocks.py111 symbols
preprocess/humanparsing/mhp_extension/detectron2/detectron2/export/shared.py63 symbols
preprocess/humanparsing/mhp_extension/detectron2/projects/DensePose/densepose/vis/densepose.py55 symbols
preprocess/humanparsing/mhp_extension/detectron2/projects/DensePose/densepose/densepose_head.py55 symbols
preprocess/humanparsing/mhp_extension/detectron2/projects/DensePose/densepose/data/structures.py44 symbols
preprocess/humanparsing/mhp_extension/detectron2/detectron2/utils/visualizer.py44 symbols
preprocess/humanparsing/mhp_extension/detectron2/detectron2/data/transforms/transform_gen.py41 symbols
preprocess/humanparsing/mhp_extension/detectron2/tests/test_config.py36 symbols
preprocess/humanparsing/mhp_extension/detectron2/detectron2/engine/hooks.py36 symbols
preprocess/humanparsing/mhp_extension/detectron2/projects/DensePose/densepose/densepose_coco_evaluation.py34 symbols
preprocess/humanparsing/mhp_extension/detectron2/detectron2/utils/events.py34 symbols

Dependencies from manifests, versioned

accelerate0.26.1 · 1×
config0.5.1 · 1×
diffusers0.24.0 · 1×
einops0.7.0 · 1×
gradio4.16.0 · 1×
matplotlib3.7.4 · 1×
numpy1.24.4 · 1×
onnxruntime1.16.2 · 1×
opencv-python4.7.0.72 · 1×
pillow9.4.0 · 1×
scikit-image0.21.0 · 1×
scipy1.10.1 · 1×

For agents

$ claude mcp add OOTDiffusion \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact