Skip to content

Commit

Permalink
Fix "AttributeError: 'NoneType' object has no attribute 'tokenizer'" (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
farzadab authored Jan 13, 2025
1 parent 86ae957 commit aa301b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ultravox/model/ultravox_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def __init__(
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 aa301b5

Please sign in to comment.