How to use with diffusers ?

#7
by DesignAndProd - opened

I've tried to load the files to use with Diffusers but it doesn't work :

vae = AutoencoderKL.from_pretrained(
"stabilityai/sd-vae-ft-mse-original",
use_safetensors=True,
cache_dir=MODEL_CACHE,
torch_dtype=torch.float16,
)

I have this error :

OSError: stabilityai/sd-vae-ft-mse-original does not appear to have a file named diffusion_pytorch_model.bin.

Do we need to convert it ?

Thanks !

I also got this error and can not use it with diffusers.
OSError: stabilityai/sd-vae-ft-mse-original does not appear to have a file named
config.json.
I solved it by using stabilityai/sd-vae-ft-ema

Hi!
You can first clone the scripts of diffusers from https://github.com/huggingface/diffusers
Then convert the ckpt of vae to the diffuser-version like:

python convert_vae_pt_to_diffusers.py --vae_pt_path vae-ft-mse-840000-ema-pruned.ckpt  --dump_path diffusers_files\vae-ft-mse-840000-ema-pruned

``
This comment has been hidden

Sign up or log in to comment