Created
October 12, 2023 08:24
-
-
Save deltheil/9ba2c1840c3380e598698a16e0e09e3d to your computer and use it in GitHub Desktop.
Self-Attention Guidance with Refiners: prerequisites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Improving Sample Quality of Diffusion Models Using Self-Attention Guidance | |
# https://arxiv.org/abs/2210.00939 | |
# https://github.com/SusungHong/Self-Attention-Guidance | |
# (1) Install (see also https://github.com/finegrain-ai/refiners#install) | |
git clone https://github.com/finegrain-ai/refiners.git | |
cd refiners | |
poetry install --all-extras | |
poetry run pip install --upgrade torch torchvision | |
# (2) Convert weights into Refiners format | |
poetry shell | |
python scripts/conversion/convert_transformers_clip_text_model.py --to clip_text.safetensors --half | |
python scripts/conversion/convert_diffusers_unet.py --to unet.safetensors --half | |
python scripts/conversion/convert_diffusers_autoencoder_kl.py --to lda.safetensors --half |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternatively, with SDXL convert weights as follows:
And then: