-
Notifications
You must be signed in to change notification settings - Fork 67
Description
在mac studio M3 Ultra + python 3.12.0上uv pip install -r requirements.txt安装正常。
运行:python examples/infer_s2s.py 报错:
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:03<00:00, 1.07it/s]
Traceback (most recent call last):
File "/Users/heqing/python/project/Fun-Audio-Chat/examples/infer_s2s.py", line 101, in
infer_example(model_path, audio_path)
File "/Users/heqing/python/project/Fun-Audio-Chat/examples/infer_s2s.py", line 74, in infer_example
generate_ids, audio_ids = model.generate(**inputs, **gen_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/uv/s2s/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/uv/s2s/lib/python3.12/site-packages/transformers/generation/utils.py", line 2597, in generate
result = self._sample(
^^^^^^^^^^^^^
File "/Users/heqing/python/project/Fun-Audio-Chat/funaudiochat/modeling_funaudiochat.py", line 1332, in _sample
outputs = model_forward(**model_inputs, return_dict=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/uv/s2s/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/uv/s2s/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/python/project/Fun-Audio-Chat/funaudiochat/modeling_funaudiochat.py", line 1133, in forward
speech_output = self.audio_invert_tower(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/uv/s2s/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/uv/s2s/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/python/project/Fun-Audio-Chat/funaudiochat/modeling_funaudiochat.py", line 663, in crq_generate_forward
crq_audio_tokens, logits = self.sampling_step(logits)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/heqing/python/project/Fun-Audio-Chat/funaudiochat/modeling_funaudiochat.py", line 609, in sampling_step
next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: probability tensor contains either inf, nan or element < 0