joycaption icon indicating copy to clipboard operation
joycaption copied to clipboard

How to load model files from a designated drive when using a gradio app.

Open mement703 opened this issue 1 year ago • 1 comments

By default, the gradio app does not allow specifying models downloaded to arbitrary locations. Which part of the code should be modified to allow setting a custom model path? Also, how should the configuration be structured to switch between the full and quantized versions of the model?

mement703 avatar May 19 '25 18:05 mement703

It uses huggingface transformers, so the model gets downloaded by default under ~/.cache/huggingface. According to HF's docs (https://huggingface.co/docs/huggingface_hub/en/package_reference/environment_variables) you can influence that using the environment variables HF_HOME or HF_HUB_CACHE.

fpgaminer avatar May 19 '25 21:05 fpgaminer