Commit d23c2148 authored by Your Name's avatar Your Name

Force CPU mode for faster-whisper (CUDA not compatible with Vulkan)

parent 1dafc558
...@@ -2464,7 +2464,7 @@ async def create_transcription( ...@@ -2464,7 +2464,7 @@ async def create_transcription(
whisper_model = WhisperModel( whisper_model = WhisperModel(
model_to_use, model_to_use,
device="cuda" if torch.cuda.is_available() else "cpu", device="cpu", # faster-whisper CUDA doesn't work with AMD/Vulkan
compute_type=compute_type compute_type=compute_type
) )
# Store in multi_model_manager # Store in multi_model_manager
...@@ -3796,13 +3796,14 @@ def main(): ...@@ -3796,13 +3796,14 @@ def main():
model_path = download_model(model_to_use, cache_dir) model_path = download_model(model_to_use, cache_dir)
model_to_use = model_path model_to_use = model_path
# Determine compute type # Determine compute type - always use CPU on Vulkan backend
compute_type = "float16" if torch.cuda.is_available() else "int8" # faster-whisper CUDA doesn't work with AMD/Vulkan GPUs
compute_type = "int8"
# Load the model # Load the model - always use CPU (faster-whisper CUDA doesn't work with AMD/Vulkan)
whisper_model = WhisperModel( whisper_model = WhisperModel(
model_to_use, model_to_use,
device="cuda" if torch.cuda.is_available() else "cpu", device="cpu",
compute_type=compute_type compute_type=compute_type
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment