diff --git a/src-python/models/transcription/transcription_whisper.py b/src-python/models/transcription/transcription_whisper.py index 971d8d71..77976ef0 100644 --- a/src-python/models/transcription/transcription_whisper.py +++ b/src-python/models/transcription/transcription_whisper.py @@ -51,7 +51,7 @@ def checkWhisperWeight(root, weight_type): try: WhisperModel( path, - device="cpu", + device="cuda", device_index=0, compute_type="int8", cpu_threads=4, @@ -79,7 +79,7 @@ def getWhisperModel(root, weight_type): path = os_path.join(root, "weights", "whisper", weight_type) return WhisperModel( path, - device="cpu", + device="cuda", device_index=0, compute_type="int8", cpu_threads=4, diff --git a/src-python/models/translation/translation_translator.py b/src-python/models/translation/translation_translator.py index f035c099..6c22a2c2 100644 --- a/src-python/models/translation/translation_translator.py +++ b/src-python/models/translation/translation_translator.py @@ -37,7 +37,7 @@ class Translator(): tokenizer_path = os_path.join(path, "weights", "ctranslate2", directory_name, "tokenizer") self.ctranslate2_translator = ctranslate2.Translator( weight_path, - device="cpu", + device="cuda", device_index=0, compute_type="int8", inter_threads=1,