Closed furqan4545 closed 1 year ago
Do get the same error with just Whisper? If you do, then it is an PyTorch Issue. If not, you can try load the Whisper model then modify it:
model = whisper.load_model('large-v2', device="cpu")
stable_whisper.modify_model(model)
I tried that but it seems like there is a memory leakage problem. I get this error usually when the model fails to reset the memory and i perform the inference again so at that point it start throwing the above error I showed in first msg. Also there is one more issue i saw which is : for german language somehow it is missing word level time stamp... do you have any advise for that too?
What were the settings you used for transcribe_minimal()
? Which type was audio
(str/np.ndarray/torch.Tensor/bytes)?
actually transcribe_minimal() is working ok for now i guess. In model.transcribe() i am facing one issue which is: when i load the model on cuda:0... inference and everything works fine. but when i load the model on gpu:1 or any other gpu other than 0.. it start throwing the error which i posted above. This is strange. let me show you my parameters.
result = model.transcribe(video_file, mel_first=True, language=lang, suppress_silence=False, ts_num=5,time_scale=1.0,temperature=(0.3,0.4,0.5), verbose=True)
this is what i am using.
I managed to replicate this error when using device='cuda:1'
, but works fine when I call cuda(1)
on the loaded model.
model = stable_whisper.load_model('base').cuda(1)
It worked, thanks a lot man.
It worked
import whisper, stable_whisper model = stable_whisper.load_model('large-v2', device="cpu") # stable whisper ############# Hi, when I am passing cpu in device section my model is not runing on cpu. It automatically detects the gpu and shift it's inference on GPU. Can we control device as like we do in whisper. Your help will be highly appreciated.
The thing is, I am trying to run it on multiple GPUs so, once I can control selection of device then i will run each instance of stable-ts on a seperate GPU id.
here is the error that I am getting: