mirror of
https://github.com/openai/whisper.git
synced 2025-09-15 15:18:35 +08:00
Fix possible mistake when loading model to device (#57)
Before this change, the model is loaded into GPU regardless of the value of "device" argument in CLI. (e.g. whisper "test.wav" --device cpu loads into GPU anyway)
This commit is contained in:
parent
f296bcd3fa
commit
61989529b7
@ -273,7 +273,7 @@ def cli():
|
||||
temperature = [temperature]
|
||||
|
||||
from . import load_model
|
||||
model = load_model(model_name).to(device)
|
||||
model = load_model(model_name, device=device)
|
||||
|
||||
for audio_path in args.pop("audio"):
|
||||
result = transcribe(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user