diffusers
diffusers copied to clipboard
from diffusers.loaders.autoencoder import FromOriginalVAEMixin fails with ImportError
On 0.28.2, this
from diffusers.loaders.autoencoder import FromOriginalVAEMixin
will fail with this error
ImportError: cannot import name 'create_diffusers_vae_model_from_ldm' from 'diffusers.loaders.single_file_utils' (/usr/local/lib/python3.10/dist-packages/diffusers/loaders/single_file_utils.py)
If you look at the source code, create_diffusers_vae_model_from_ldm imported here: https://github.com/huggingface/diffusers/blob/0d68ddf3275b20b0d12cfd3d0a9f002fecfe001c/src/diffusers/loaders/autoencoder.py#L18
does not exist here: https://github.com/huggingface/diffusers/blob/0d68ddf3275b20b0d12cfd3d0a9f002fecfe001c/src/diffusers/loaders/single_file_utils.py
This commit removed it: https://github.com/huggingface/diffusers/commit/cb0f3b49cbd9f67c088a8cd8e96e477a6ae47764#diff-46dbaee212aec178869ccc3db97f026579819d5fbffbd4321e7063cf472139f8
Cc: @DN6
Possible Fix:
from diffusers.loaders.autoencoder import FromOriginalVAEMixin
to
from diffusers.loaders.single_file_model import FromOriginalModelMixin
because in the commit is it replaced with it at the same way?
@DN6 a gentle reminder :)
Hi sorry this should have been removed in 0.28. This PR: https://github.com/huggingface/diffusers/pull/8754 removes these deprecated classes in favour of FromOrignalModelMixin
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Closing due to inactivity and because it looks like this was answered. Feel free to re-open if there's anything else not addressed sufficiently