Update ultravox_pipeline.py
Browse files- ultravox_pipeline.py +5 -3
ultravox_pipeline.py
CHANGED
@@ -23,12 +23,14 @@ class UltravoxPipeline(transformers.Pipeline):
|
|
23 |
)
|
24 |
|
25 |
if audio_processor is None:
|
26 |
-
audio_processor = transformers.
|
27 |
-
model.config.audio_model_id
|
28 |
)
|
29 |
|
30 |
self.processor = UltravoxProcessor(
|
31 |
-
audio_processor
|
|
|
|
|
32 |
)
|
33 |
|
34 |
super().__init__(model=model, tokenizer=tokenizer, **kwargs)
|
|
|
23 |
)
|
24 |
|
25 |
if audio_processor is None:
|
26 |
+
audio_processor = transformers.AutoProcessor.from_pretrained(
|
27 |
+
model.config.audio_model_id or model.config.audio_config._name_or_path
|
28 |
)
|
29 |
|
30 |
self.processor = UltravoxProcessor(
|
31 |
+
audio_processor=audio_processor,
|
32 |
+
tokenizer=tokenizer,
|
33 |
+
stack_factor=model.config.stack_factor,
|
34 |
)
|
35 |
|
36 |
super().__init__(model=model, tokenizer=tokenizer, **kwargs)
|