Fix AttributeError: 'NoneType' object has no attribute 'tokenizer'

#1
by raytency - opened

Steps to reproduce the issue:

import transformers
import librosa

model_name = "fixie-ai/ultravox-v0_4-mistral_nemo"
pipe = transformers.pipeline(model=model_name, trust_remote_code=True)

path = "foo.ogg"
audio, sr = librosa.load(path, sr=16000)

turns = [
    {"role": "user", "content": "Explain what is happening in the audio"}
]

pipe({'audio': audio, 'turns': turns, 'sampling_rate': sr}, max_new_tokens=30)
Fixie.ai org
Fixie.ai org

Yeah the error is likely because in the new version of transformers, the pipeline object also has a processor, which overrides ours. I've already updated model here. Let me know if that fix isn't good enough.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment