ankush13r commited on
Commit
3acf3a4
1 Parent(s): 18b7be0

Update whisper2.py

Browse files
Files changed (1) hide show
  1. whisper2.py +2 -2
whisper2.py CHANGED
@@ -10,8 +10,8 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
10
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
 
12
  print("[ INFO ] Device: ", device)
13
- torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
14
-
15
 
16
  model = WhisperForConditionalGeneration.from_pretrained(MODEL_NAME, torch_dtype=torch_dtype).to(device)
17
  processor = WhisperProcessor.from_pretrained(MODEL_NAME)
 
10
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
 
12
  print("[ INFO ] Device: ", device)
13
+ #torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
14
+ torch_dtype = torch.float32
15
 
16
  model = WhisperForConditionalGeneration.from_pretrained(MODEL_NAME, torch_dtype=torch_dtype).to(device)
17
  processor = WhisperProcessor.from_pretrained(MODEL_NAME)