Closed Leezp99 closed 1 year ago
i think it was introduced in https://github.com/lucidrains/audiolm-pytorch/pull/195 based on the PR we could just check is None
instead of truthiness, or probably better yet just put it inside the if return_encoded
conditional. Want to make a PR?
whoops, my bad for merging it too quickly, should be good!
it work correctly now? Thanks you for your work
Code: wav24k = wav24k.unsqueeze(0) codec.eval() codes, , = codec(wav24k, return_encoded = True)
Problem: File "preprocess.py", line 117, in processone codes, , _ = codec(wav24k, return_encoded = True) File "/home/lab-li.zhipeng/miniconda/enter/envs/ns2vc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/home/lab-li.zhipeng/miniconda/enter/envs/ns2vc/lib/python3.8/site-packages/audiolm_pytorch/encodec.py", line 103, in forward if emb: RuntimeError: Boolean value of Tensor with more than one value is ambiguous
How can i solve this problem? Input wav24k.shape = (1, 1, T)