Whisper-WebUI icon indicating copy to clipboard operation
Whisper-WebUI copied to clipboard

Loading Models Locally

Open howellmvp opened this issue 1 year ago • 2 comments

Hello, i set this up on a closed network, but I'm having issues with the models. I had the medium model downloaded on my system and placed it in the models directory but the UI gives an error when i try to generate subtitle file, i believe this is because its trying to download the models from the internet. I'm trying to make use of my already downloaded models instead of having whisper try to download a model itself, that cant work for me since I'm on a closed network and cant send requests to the internet. I'm trying to figure out where to make changes so that it makes use of my local models instead of trying to connect to the internet and download one. Any tips ? thanks.

howellmvp avatar Feb 26 '24 13:02 howellmvp

Hi. The model folder structure looks like

  1. whisper
./models/
└── Whisper/
    └── large-v3.pt
    └── large-v2.pt
    └── ...
  1. faster-whisper
./models/
└── Whisper/
    └── faster-whisper/
        └── models--Systran--faster-whisper-large-v3/
            └── ~
        └── models--Systran--faster-whisper-large-v2/
            └── ~

So if you already have the model locally, you can put the model into the appropriate folder by implementation and it will work. And you need to set set DISABLE_FASTER_WHISPER=true in the user-start-webui.bat file if you have the Whisper model not the faster-whisper model.

jhj0517 avatar Feb 26 '24 14:02 jhj0517

Hi,

Thanks for getting back to me, i made the recommended changes and still receive the same error.

In the terminal , it says "An error occured while synchronizing the model Systran/faster-whisper-medium from the Hugging Face Hub:" "Trying to load the model directly from the local cache if it exists."

it seems to keeps focusing on faster whisper even after disabling it like you suggested.

howellmvp avatar Feb 26 '24 16:02 howellmvp

Same here, that will be great if we have option to load local models.

fernvenue avatar May 20 '24 07:05 fernvenue

Hi, sorry for late reply. I've added --faster_whisper_model_dir and --whisper_model_dir arg in #154.

Usage:

python app.py --faster_whisper_model_dir "C:\Whisper-WebUI\my_faster_whisper_model_path"

Or if you start the Web UI with user-start-webui.bat, you can modify the batch file as

set FASTER_WHISPER_MODEL_DIR=C:\Whisper-WebUI\my_faster_whisper_model_path

And the Web UI will use the custom path for the models.

So this is fixed in #154, I'm closing it.

If you encounter any problems with these updates, please re-open and let me know!

jhj0517 avatar May 21 '24 12:05 jhj0517

Wow, thanks!

fernvenue avatar May 21 '24 12:05 fernvenue