Skip to content
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

Taesd for SD 1.5 #17

Open
andreineamtu opened this issue May 30, 2024 · 3 comments
Open

Taesd for SD 1.5 #17

andreineamtu opened this issue May 30, 2024 · 3 comments

Comments

@andreineamtu
Copy link

Do you have a version for Stable Diffusion v1.5 that can be loaded using from_single_file method as VAE?
I tried it and got this error:
"diffusers.loaders.single_file_utils.SingleFileComponentError: Failed to load AutoencoderKL. Weights for this component appear to be missing in the checkpoint."

@madebyollin
Copy link
Owner

No, TAESD is not an AutoencoderKL model so you can't load TAESD using AutoencoderKL.from_single_file.

To load TAESD in diffusers, you can instead use AutoencoderTiny.from_pretrained, like this:

import torch
from diffusers import AutoencoderTiny
taesd = AutoencoderTiny.from_pretrained("madebyollin/taesd", torch_dtype=torch.float16)

For more detailed information, see the AutoencoderTiny diffusers docs.

@andreineamtu
Copy link
Author

Yes that's how I did, but this means to load it from HuggingFace.
I wanted to load it from my local machine. Is that possible?

@madebyollin
Copy link
Owner

Yeah, from_pretrained supports local folders, so you can download the taesd folder with git clone https://huggingface.co/madebyollin/taesd and then construct the model from that taesd folder using AutoencoderTiny.from_pretrained("/path/to/taesd").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants