[misc] fix qwen2 omni (#7962)

This commit is contained in:
hoshi-hiyouga 2025-05-06 15:39:13 +02:00 committed by GitHub
parent 52f25651a2
commit 937447bd8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -119,7 +119,7 @@ class HuggingfaceEngine(BaseEngine):
)
prompt_length = len(prompt_ids)
inputs = torch.tensor([prompt_ids], device=model.device)
attention_mask = torch.ones_like(inputs, dtype=torch.bool)
attention_mask = torch.ones_like(inputs, dtype=torch.long)
do_sample: Optional[bool] = input_kwargs.pop("do_sample", None)
temperature: Optional[float] = input_kwargs.pop("temperature", None)