Skip to content

Commit

Permalink
Fix processor being overwritten by parent class
Browse files Browse the repository at this point in the history
  • Loading branch information
farzadab authored Nov 27, 2024
1 parent 6f8f255 commit 63ec189
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ultravox/model/ultravox_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 63ec189

Please sign in to comment.