-
Notifications
You must be signed in to change notification settings - Fork 172
Enable SDXL model loading from safetensor files #316
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
Conversation
|
@ZeroBomb Thanks for the PR Have you tested it? Please share the model details |
|
I'm using it right now with the Juggernaut XL Lightning version from civitai. I just realized I forgot to copy over the StableDiffusionXLPipeline import, I'll see if I can get that in now. |
|
Does LCM-LoRA mode work with Illustrious based models? I've been trying to make some tests with no success. LCM-LoRA seems to work with SDXL based models but not with Illustrious (haven't tried Pony models), which is weird since I thought the base model was essentially the same SDXL. |
|
I've had mixed results with illustrious models. On the one hand, they definitely work and can generate images. On the other hand, they tend to require more tweaks to the generation settings than the UI allows, so the outputs are low quality (they look a little bit like if I picked the wrong VAE in ComfyUI). One thing I've done is commented out the "set guidance scale to 1" line so that I can run the base models with higher CFG guidance values, which helps a lot with the Illustrious models I've tried. fastsdcpu/src/backend/lcm_text_to_image.py Line 477 in 1ec45f6
|
|
Interesting, gonna have to give it a try. |
|
@ZeroBomb @monstruosoft Does this PR works? It didn't work for me. Please confirm.Thank you! |
|
I thought this PR was for LCM-LoRA mode, then I realized it was for LCM SDXL models, which I don't have any. |
Ok, thank you |
Per issue 274, fastsdcpu cannot load SDXL models from safetensor files. I reviewed the code and saw that the reason for this was the lack of a diffusers "from_single_file" method for SDXL.
The diffusers library now has this method, so I used it.
I am not familiar enough with safetensor files to do anything more sophisticated than "if the model has xl in the name, use the XL pipeline" but if anyone has an actual smart way of differentiating SDXL from SD1.5, feel free to use that instead.
Also, the SDXL pipeline does not appear to support whatever safety_checker parameters you were passing to the StableDiffusion pipeline, so I had to remove it.