Can not able to pickle faster whisper model object ?
I am trying to append model object into python multiprocessing manager sharedObject list but got below error
TypeError: cannot pickle 'ctranslate2._ext.Whisper' object
code snippet:
import multiprocessing from multiprocessing import freeze_support from faster_whisper import WhisperModel
if name == 'main': freeze_support() model = WhisperModel("large-v2", device="cpu", num_workers=1, cpu_threads=8,compute_type='int8') shared_manager = multiprocessing.Manager() shared_object = shared_manager.list() print("append started") shared_object.append(model) print("append finished") print(shared_object)
hey guys, any update on this one? I'm stuck on the same thing.
TypeError: cannot pickle 'ctranslate2._ext.Whisper' object
@Rahulvisio - how did you manage to resolve/work around this?
我也遇到了这个问题
creating the model in the run function of the process will solve this issue.