Stable-Diffusion-ONNX-FP16 icon indicating copy to clipboard operation
Stable-Diffusion-ONNX-FP16 copied to clipboard

How to use VAE file ends with *.vae.pt

Open 1205146589 opened this issue 2 years ago • 3 comments

lots of models use their own VAE file named .vae.pt Now I have some VAE file (.vae.pt) and try to use them How can I combine one (*.vae.pt) with more models, move *.vae.pt to models/model/vae ?

1205146589 avatar Apr 13 '23 06:04 1205146589

Hi, VAE in separate pickletensor files is currently not supported because contrary to your claim I have found hardly any models that have them. Would be good if you can post some links to examples.

Amblyopius avatar Apr 13 '23 09:04 Amblyopius

This VAC file made by user is combined with different percentage of VAC file such as https://huggingface.co/stabilityai/sd-vae-ft-mse-original/tree/main When I try to combine mse with model, it exit with error: OSError: It looks like the config file at 'L:\stable-diffusion-webui-directml-02-19\models\VAE\vae-ft-mse-840000-ema-pruned.ckpt' is not a valid JSON file.

another one likes https://huggingface.co/sp8999/test_VAE/tree/main

and another sample: https://huggingface.co/WarriorMama777/OrangeMixs/tree/main/VAEs

OSError: It looks like the config file at 'L:\stable-diffusion-webui-directml-02-19\models\Stable-diffusion\orangemix.vae.pt' is not a valid JSON file.

1205146589 avatar Apr 13 '23 14:04 1205146589

Hi, 2 of them are essentially covered in the documentation:

  • the first one (which is indeed used a lot) should be used in diffusers format. Just add --vae_path "stabilityai/sd-vae-ft-mse"
  • The last one is as far as I know still the same one from anything v3. You can just grab it from a diffusers version by using: --vae_path "Linaqruf/anything-v3.0/vae"

The second one I'm not sure about but if you can find anything in diffusers format on huggingface that has it, you could just point to it with the methods as demonstrated. This is better than pt files as these can be insecure while things in diffusers format on huggingface have typically been at least scanned and are often in safetensors (which is guaranteed to be secure).

In my experience the leaked NAI VAE and the updated 1.5 MSE (which they still use in SD 2.1) are the only common ones as hardly anyone trains unique VAEs.

Amblyopius avatar Apr 13 '23 16:04 Amblyopius