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

[Feature Request]: Set a default clip_models_path #16093

Open
1 task done
allo- opened this issue Jun 26, 2024 · 1 comment
Open
1 task done

[Feature Request]: Set a default clip_models_path #16093

allo- opened this issue Jun 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@allo-
Copy link

allo- commented Jun 26, 2024

Is there an existing issue for this?

  • 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

model, preprocess = clip.load(clip_model_name, download_root=shared.cmd_opts.clip_models_path)

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

  1. Go to img2img
  2. press the interrogate CLIP button
  3. BLIP is downloaded to models/BLIP
  4. CLIP is downloaded to .cache/clip, which is hard to find out, as clip.load and not the webui code contains the default download location.

Proposed solution

Set the default download path to models/CLIP.

@allo- allo- added the enhancement New feature or request label Jun 26, 2024
@w-e-w
Copy link
Collaborator

w-e-w commented Jun 28, 2024

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

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

No branches or pull requests

2 participants