stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Feature Request]: Having a dropdown for VAE so we don't have to duplicate them for each model

Open Mozoloa opened this issue 3 years ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Since Stability has released an improved VAE encoder for SD1.5 and that we can actually use it with other models as well by just placing it in the models folder as a model.vae.pt, I thought it would be good to have an option to apply it to the current selected checkpoint, instead of having to duplicate the same vae file for each model, or create symlinks as I do (which is still annoying)

Proposed workflow

Two proposals: • A setting in the settings page to chose which VAE to use from a list • Another dropdown next to the checkpoint dropdown

Additional information

No response

Mozoloa avatar Oct 22 '22 14:10 Mozoloa

Yeah, the VAE usage is pretty clunky at the moment and could be greatly improved.

ProGamerGov avatar Oct 22 '22 14:10 ProGamerGov

In the meantime, there's actually a commandline arg doing this:

  1. At the root of the stable diffusion webui folder you've got a webui-user.bat that you've probably heard about, it allows you to launch the UI with some specific parameters, like --medvram --autolaunch etc.
  2. add --vae-path "path\to\your\vae\file\\modelname.vae.pt"to the webui-user.bat COMMANDLINE_ARGS=
  3. Relaunch the UI and enjoy
  4. Now unless the backend finds a .vae.pt file exactly named after the model you select, it's going to take the one you've set as --vae-path by default !

Mozoloa avatar Oct 22 '22 17:10 Mozoloa

I was about to make a request for this as well, because I just downloaded a bunch of vae.pt files to test, hoping this can be a select box soon to easily compare differences

Kavukamari avatar Oct 22 '22 23:10 Kavukamari

The path has to be inside " " ? I'm editing the webui-user.sh (Linux) I see only export COMMANDLINE_ARGS=" " so it should work with: export COMMANDLINE_ARGS= --vae-path "path\to\your\vae\file\modelname.vae.pt"

jjpb44 avatar Oct 23 '22 05:10 jjpb44

regardless of being able to do this with a commandline arg, (tried that and it works fine), it would be nice to be able to switch it on and off (and between different vae's) from the ui without having to completely restart.

Nyxeka avatar Oct 28 '22 17:10 Nyxeka

To save free space, you can use symbolic links instead of actually duplicating VAEs.

R-N avatar Oct 30 '22 14:10 R-N

https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/3986

ClashSAN avatar Nov 02 '22 20:11 ClashSAN