Reduce duplicated code in stable diffusion pipelines
Duplicated code is bad codding practice and makes fixing and changing code harder.
This pr removes some of duplicated code from multiple stable diffusion pipelines by making all StableDiffusionPipeline's inherit from StableDiffusionPipeline rather than DiffusionPipeline and placing common functionalities there.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.
There's been a lot of discussion on this lately. See #551 if you haven't yet.
There's been a lot of discussion on this lately. See #551 if you haven't yet.
I didn't realize that.
I've picked the CoreStableDiffusionPipeline suggestion.
Hey @emsi,
Thanks a lot for the PR - it's super useful to see what code is shared between pipelines! Given that there was a lot of discussion on #551 that concluded on a slightly different design and given that #551 is blocked by https://github.com/huggingface/diffusers/issues/336 would it be ok if we wait with this PR 1 week?
Would love to work with you to get something similar to this merged though to close @336 then
would it be ok if we wait with this PR 1 week?
Absolutely. Feel free to do with this PR whatever makes sense. I started it when I realized that there's a lot of code duplication that required me to repeat the same modification multiple times. I was not aware of any work on that at that time.
I think we can close this as we have the copy mechanism now in place to solve https://github.com/huggingface/diffusers/issues/551