PixArt-alpha / PixArt-sigma

PixArt-Σ: Weak-to-Strong Training of Diffusion Transformer for 4K Text-to-Image Generation
https://pixart-alpha.github.io/PixArt-sigma-project/
GNU Affero General Public License v3.0
1.47k stars 70 forks source link

Better installation tutorial/dependencies? #17

Closed Darksoulmaster31 closed 3 months ago

Darksoulmaster31 commented 3 months ago

The models got released today, so I decided to try them out, but unfortunately, it just doesn't work for me.

No matter how many times I reinstall the (provided .yml) conda environment with multiple python and pytorch versions (settled on python 3.10.11 and pytorch 2.2.2+cu121 because that's what xformers was prebuilt for), it just would not work and it kept throwing errors like: (cannot import name 'CpuOffload' from 'accelerate.hooks'). Even tried to separately update diffusers, transformers and accelerate with pip but that made it worse. The Demo will NOT launch. It's probably just my incompetence really, but I hope someone here can help.

If the future diffusers integration helps with the dependency hell then I can simply wait for it.

Despite these issues, thank you all for your wonderful work. 🙏🙏🙏

(Windows 10 | Conda with multiple python/pytorch versions and pip packages tested | Geforce RTX 3090)

Darksoulmaster31 commented 3 months ago

With some help from Bigfield77, I've got the workflow. Make a conda environment with Python 3.10.9, install the requirements.txt with pip, then install Pytorch 2.2.2 (with cuda 12.1 support)

After this, if you are on windows, go to line 21 of PixArt-sigma\diffusion\utils\logger.py and change the location to somewhere else like this: log_file = 'D:/Temp/log.out'

After downloading the models using the tools/download.py, you need to put the pixart_sigma_sdxlvae_T5_diffusers folder into the output\pretrained_models folder.

Then replace the vae inside the pixart_sigma_sdxlvae_T5_diffusers/vae folder with this: fp16 vae fix model link

Darksoulmaster31 commented 3 months ago

Thank you for the commit, it's greatly appreciated. Issue solved for now, closing....