-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Bake in sdxl-vae-fp16-fix model on checkpoint conversion #4468
Conversation
Like the idea, but this seems to be pretty opaque/brittle - User would need to have Also, black format check failing |
Fixed black issues. |
How are we to know whether the VAE in the file we're converting is the broken one? As opposed to one that's deliberately being bundled for use with that model. |
(Also, all of this hacking around the problem could go away if “Stability” would just stop distributing the broken model with the blessing of a stable version number. Do we have the ear of anyone inside with enough pull to get them to fix their shit?) |
I will try to see who I can reach out to. |
I don't know. This worries me too. However, the broken VAE has been baked into all the SDXL Civitai models I've tried so far, so it is a common problem. An alternative approach is to add the vae override to the stanza in |
This vae fix model is already in the InvokeAI Download model cli manual. It is a must for fp16 vae to work. Otherwise black image |
I am aware of that. This PR bakes that fixed vae into any .safetensors SDXL file that you import. After this, you can select “Default” and “fp16” and it will work. |
This is not going to be adopted, so closing it now. |
This version probes the existing VAE to see if it is the broken SDXL-1.0 one. If it is, it replaces the VAE with |
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Have you updated all relevant documentation?
Description
To avoid the ser having to remember to switch to VAE
fp32
whenever rendering with SDXL models, this PR automatically replaces the default fp32-only VAE withsdxl-vae-fp16-fix
during the checkpoint conversion step. This will enable all SDXL.safetensors
files to be run infp16
VAE mode. However, it does not affect diffusers models downloaded from HugginFace. These will have to use a pinned VAE inmodels.yaml
.Related Tickets & Documents
QA Instructions, Screenshots, Recordings
models/.cache
directory so that safetensors files will be re-converted.sdxl-vae-fp16-fix
is installed inmodels/sdxl/vae
.safetensors
modelfp16
when the "Default" VAE is used.Added/updated tests?
[optional] Are there any post deployment tasks we need to perform?