这个仓库是OOTDiffusion的官方实现
(感谢ZeroGPU提供A100 GPUs)
OOTDiffusion: 基于Outfitting Fusion的可控虚拟试穿的潜在扩散 [arXiv论文]
徐宇昊, 古涛, 陈伟锋, 陈成才
晓艾研究院
我们在VITON-HD(半身)和Dress Code(全身)上训练的模型检查点已经发布
- 🤗 Hugging Face链接获取检查点(ootd, humanparsing, 和openpose)
- 📢📢 我们现在支持用于humanparsing的ONNX。大多数环境问题应该已经解决了 : )
- 请将clip-vit-large-patch14下载到checkpoints文件夹
- 我们的代码和模型只在Linux(Ubuntu 22.04)上测试过
-
克隆仓库
git clone https://github.com/levihsu/OOTDiffusion
-
创建conda环境并安装所需包
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
-
半身模型
cd OOTDiffusion/run python run_ootd.py --model_path <模型图像路径> --cloth_path <服装图像路径> --scale 2.0 --sample 4
-
全身模型
服装类别必须配对:0 = 上半身;1 = 下半身;2 = 连衣裙
cd OOTDiffusion/run python run_ootd.py --model_path <模型图像路径> --cloth_path <服装图像路径> --model_type dc --category 2 --scale 2.0 --sample 4
@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}
}
- Paper
- Gradio demo
- Inference code
- Model weights
- Training code