#torch.pi and None (data).tobytes() (RVC Mainline)

1 messages · Page 1 of 1 (latest)

vapid glade
#

Python bothers me by saying torch has no pi and data is none when doing data.tobytes().

Traceback (most recent call last):
  File "F:\RVC1006Nvidia\infer\modules\vc\modules.py", line 185, in vc_single
    audio_opt = self.pipeline.pipeline(
  ...
  File "F:\RVC1006Nvidia\infer\lib\infer_pack\models.py", line 427, in forward
    torch.cumsum(rad_values + cumsum_shift, dim=1) * 2 * torch.pi
AttributeError: module 'torch' has no attribute 'pi'

Traceback (most recent call last):
  File "F:\RVC1006Nvidia\lib\site-packages\gradio\routes.py", line 437, in run_predict
    output = await app.get_blocks().process_api(
  ...
  File "F:\RVC1006Nvidia\lib\site-packages\gradio\components.py", line 360, in audio_to_temp_file
    temp_dir = Path(dir) / self.hash_bytes(data.tobytes())
AttributeError: 'NoneType' object has no attribute 'tobytes'
#

found a workaround

#

instead of torch.pi i use math.pi

#

i modified the code (risky) but it still works

#

waiting