stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Feature Request]: Set a default clip_models_path
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 ?
The interrogate module is currently loading clip from a given command line parameter
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/feee37d75f1b168768014e4634dcb156ee649c05/modules/interrogate.py#L112
and if the parameter is omitted, clip falls back to using .cache/clip which is outside the usual directories, i.e. models/CLIP inside the webui directory and possibly the huggingface cache directory.
I discovered this when I tried to sandbox the webui and it kept downloading the clip model. Having clearly defined folders like the models folder makes it easier to know where the required files are and where you need to allow access or not.
Steps to reproduce
- Go to img2img
- press the interrogate CLIP button
- BLIP is downloaded to
models/BLIP - CLIP is downloaded to
.cache/clip, which is hard to find out, asclip.loadand not the webui code contains the default download location.
Proposed solution
Set the default download path to models/CLIP.
I believe the intentions of the clip developers for putting their models under ~.cache/clip is so that the clip modules can be shared across multiple software without re-downloading