You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse CUDA device in format cuda:1 and set CUDA_VISIBLE_DEVICES accordingly.
30
+
Due to faster-whisper's problematic handling of device parameters, CUDA_VISIBLE_DEVICES requires special configuration.
31
+
There are 3 methods to specify the GPU device for faster-whisper models:
32
+
1. Manually set `CUDA_VISIBLE_DEVICES={gpu_index}` and use "--device cuda:0" in CLI parameters.
33
+
2. If env `IS_FASTER_WHISPER` is unset AND the model path/name contains "faster-whisper", CUDA_VISIBLE_DEVICES will be set based on the GPU selector's device choice.
34
+
3. When `IS_FASTER_WHISPER=True`, CUDA_VISIBLE_DEVICES will be set based on the GPU selector's device choice.
30
35
"""
31
-
ifcfg.device.startswith("cuda:"):
36
+
is_faster_whisper: Optional[bool] =None
37
+
ifos.getenv("IS_FASTER_WHISPER"):
38
+
is_faster_whisper=os.getenv("IS_FASTER_WHISPER") in ("true", "1", "yes", "y")
39
+
40
+
ifis_faster_whisperisFalse:
41
+
return
42
+
43
+
# If unset is_faster_whisper, check if the model name contains "faster-whisper"
0 commit comments