diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

from diffusers.loaders.autoencoder import FromOriginalVAEMixin fails with ImportError

Open juancamilog opened this issue 1 year ago • 4 comments

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

juancamilog avatar Jun 07 '24 19:06 juancamilog