Skip to content

Commit

Permalink
fix tokenizer processor for DS-VL2
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaizzy committed Dec 31, 2024
1 parent cdb722c commit 575bb39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlx_vlm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ def stream_generate(
Yields:
Generator[Tuple[mx.array, mx.array]]: A generator producing text.
"""
tokenizer = processor if hasattr(processor, "encode") else processor.tokenizer
tokenizer = processor.tokenizer if hasattr(processor, "tokenizer") else processor
prompt_tokens = mx.array(tokenizer.encode(prompt))

resize_shape = kwargs.pop("resize_shape", None)
Expand Down

0 comments on commit 575bb39

Please sign in to comment.