-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add from single file to StableDiffusionUpscalePipeline and StableDiffusionLatentUpscalePipeline #5194
Conversation
@patrickvonplaten Added the mixins to the upscale pipelines. Little confused on how to test this. Is the expectation that the user is supposed to provide the appropriate |
The following should work:
And then doing: from diffusers import StableDiffusionUpscalePipeline
pipeline = StableDiffusionUpscalePipeline.from_single_file("./x4-upscaler-ema.safetensors") without giving any config. No need to test the latent upscaler, I don't think there is even an official single file for this |
So that snippet will fail since there is a mismatch in the layer shapes in the UNet.
Without a config |
Then we should add a new if statement that automatically detects when the input model is a upsampling model just from the checkpoint and then set the correct configs |
@patrickvonplaten this is ready for another review. There's a failing ShapE test that's unrelated. Rest of the CI is green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! Nice job
ldm unet model can not load after this pr, exception. (in 0.21.0, ldm model can be loaded correctly) |
@xiaoyong-z could you open a new PR? cc @DN6 here as well for viz |
…usionLatentUpscalePipeline (huggingface#5194) * add from single file * clean up * make style * add single file loading for upscaling
…usionLatentUpscalePipeline (huggingface#5194) * add from single file * clean up * make style * add single file loading for upscaling
What does this PR do?
Add from single file mixin to StableDiffusionUpscalePipeline and StableDiffusionLatentUpscalePipeline
Fixes # (issue)
#5150
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.