diff --git a/ultravox/model/ultravox_pipeline.py b/ultravox/model/ultravox_pipeline.py index c9a8aaa..55e8ff7 100644 --- a/ultravox/model/ultravox_pipeline.py +++ b/ultravox/model/ultravox_pipeline.py @@ -32,15 +32,15 @@ def __init__( audio_processor = transformers.AutoProcessor.from_pretrained( model.config.audio_model_id or model.config.audio_config._name_or_path ) - + + super().__init__(model=model, tokenizer=tokenizer, **kwargs) + self.processor = UltravoxProcessor( audio_processor=audio_processor, tokenizer=tokenizer, stack_factor=model.config.stack_factor, ) - super().__init__(model=model, tokenizer=tokenizer, **kwargs) - def _sanitize_parameters(self, **kwargs): generation_keys = ["temperature", "max_new_tokens", "repetition_penalty"] generation_kwargs = {k: kwargs[k] for k in kwargs if k in generation_keys}