We combine PixArt-α and DMD to achieve one step image generation. This document will guide you how to train and test.
Important
Due to the difference between the DiT & Stable Diffusion,
We find that the setting of the start timestep
of the student model is very important for DMD training.
refer to PixArt-Sigma paper's Supplementary for more details: https://arxiv.org/abs/2403.04692
Refer to the PixArt-Sigma Environment Here. To use FSDP, you need to make sure:
python tools/generate_dmd_data_noise_pairs.py \
--pipeline_load_from=PixArt-alpha/PixArt-XL-2-512x512 \
--model_path=PixArt-alpha/PixArt-XL-2-512x512 \
--save_img # (optinal)
python tools/extract_features.py --run_t5_feature_extract \
--t5_models_dir=PixArt-alpha/PixArt-XL-2-512x512 \
--t5_save_root=pixart-sigma-toy-dataset/InternData \
--caption_label=prompt \
--t5_json_path=pixart-sigma-toy-dataset/InternData/data_info.json
bash train_scripts/train_dmd.sh
pip install git+https://github.com/huggingface/diffusers
# PixArt-Sigma One step Sampler(DMD)
DEMO_PORT=12345 python app/app_pixart_dmd.py
Let's have a look at a simple example using the http://your-server-ip:12345
.