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

Loading Models Locally #100

Closed
howellmvp opened this issue Feb 26, 2024 · 5 comments
Closed

Loading Models Locally #100

howellmvp opened this issue Feb 26, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@howellmvp
Copy link

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.

@jhj0517
Copy link
Owner

jhj0517 commented Feb 26, 2024

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.

@howellmvp
Copy link
Author

howellmvp commented Feb 26, 2024

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.

@fernvenue
Copy link

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

@jhj0517 jhj0517 added the enhancement New feature or request label May 20, 2024
@jhj0517
Copy link
Owner

jhj0517 commented May 21, 2024

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 jhj0517 closed this as completed May 21, 2024
@fernvenue
Copy link

Wow, thanks!

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

3 participants