How do I change the cache default folder for "hub"?
I use multiple AI models and tools, and multiple ones keep downloading models inside: C:\Users\name.cache\huggingface\hubI don’t have much space left there.How can I change it?A research led me to: “Change model download folder?” and to:  “Environment variables”My question is: HOW DO I MODIFY THE HF HOME?(I am using UI tools that run multiple AI techs in “the background” sorta")do I have to search in all scripts for the area where HF HOME is located?Isnt there some easier way to know where is it every time please?
2024-10-09T22:50:46Z
If you change theHF_HOMEenvironment variable, all programs will use the modified cache folder on their own.This is the easiest way.However, it does not mean that the cache that has been downloaded so far will be moved or disappear by itself, so you will have to do something about that.stackoverflow.comHow to change huggingface transformers default cache directoryhuggingface-transformersasked byIvan Leeon07:28AM - 08 Aug 20 UTC
2024-10-10T05:16:39Z
The problem Is I am using lot of tools that have this HF_HOME pre written in them, Iwill have to do a research to find them each time:Blender, with an extension called “dream”comfyUI with lot of extensionsFor blender, we have this:github.comGitHub - carson-katri/dream-textures: Stable Diffusion built-in to BlenderStable Diffusion built-in to BlenderWhere is “HF_HOME”? I can’t see it???For comfyui, we have:https://github.com/MrForExample/Comfy**UI-3D-Pack**Where is “HF_HOME”? I don’t see it…And I know this extension alone was responsible for 3 folders on my huggingface .cache directory:
2024-10-10T05:56:58Z
If you set one environment variable, the programs will refer to it on their own, so you don’t have to worry about it.However, some programs ignore environment variables, so if that happens, you will have to modify the program yourself.I’m sure ComfyUI components and such will reference them properly…Setting environment variables in the Windows environment is a bit confusing, so see below.https://www.digitalcitizen.life/simple-questions-what-are-environment-variables/
2024-10-10T11:52:22Z
Something like this?
2024-10-10T12:01:37Z
I confirm it seems to be working (for blender addon that use HG at least). Blender still keep installing the addon data in C: though but that’s a different problem.Edit: Blender solution:Command Line Arguments - Blender 4.2 Manual
2024-10-10T12:33:30Z
Well, Blender is not an HF-related application. But I’m glad you were able to resolve it.If you manually move your old cache, it will work as a cache. It’s better to download it again, though.