jhc13 / taggui

Tag manager and captioner for image datasets
GNU General Public License v3.0
774 stars 37 forks source link

(Info) Location of Downloaded models #124

Closed PsiClone99 closed 7 months ago

PsiClone99 commented 7 months ago

Please share where the models are downloaded or stored, in case we want to clean up space and delete old models.

jhc13 commented 7 months ago

They are stored in the Hugging Face cache directory (where the HF_HOME environment variable is set to, or ~/.cache/huggingface by default).

paulerbear commented 2 months ago

They are stored in the Hugging Face cache directory (where the HF_HOME environment variable is set to, or ~/.cache/huggingface by default).

i don't know where to find this, can you provide a full example file path please?

jhc13 commented 2 months ago

i don't know where to find this, can you provide a full example file path please?

On Windows, it's C:\Users\(your username)\.cache\huggingface.

paulerbear commented 2 months ago

i don't know where to find this, can you provide a full example file path please?

On Windows, it's C:\Users\(your username)\.cache\huggingface.

Thanks! TagGUI is amazing by the way. Loving it

quasiblob commented 2 months ago

Worst possible location IMO, I don't want to pollute boot drive.

paulerbear commented 2 months ago

Worst possible location IMO, I don't want to pollute boot drive.

I tend to agree

pterrien commented 1 month ago

@quasiblob, @paulerbear, I also tend to agree, some models are very big... For those interested, here are some useful info from HuggingFace:

TL;DR: For people running on Windows, just search for "set environment variable", and set HF_HOME to the folder you wish to store the cache in.

For Linux users, you may add export HF_HOME=/path/to/cache/huggingface to your .bashrc, which will be useful for other apps (forge, comfy, ...) but not TagGUI that doesn't run on bash... If you use KDE / Plasma, this wiki page is your best friend: just create a .sh file in ~/.config/plasma-workspace/env/ and you're good to go (after a logout / login). Example:

cat > ~/.config/plasma-workspace/env/huggingface.sh << EOF
export HF_HOME=/path/to/cache/huggingface
EOF

I hope this will help some!

merket commented 1 month ago

Hi, in the settings, there is an option to choose the directory for auto-captioning models, which I manually set, but the software still downloads the models to the default location. I can use symbolic links or set variables as mentioned in this topic, but I am wondering what is that directory setting is for? If I move the models to that directory, would it redownload or read from there?

jhc13 commented 1 month ago

It was added so people who downloaded the models separately could put the models there and the program would load the models from there.

Ideally it should also download new models into that directory, but that is more complicated and has not been implemented yet.