facebookresearch / seamless_communication

Foundational Models for State-of-the-Art Speech and Text Translation
Other
10.53k stars 1.02k forks source link

typeerror #88

Closed sunny-rbl closed 9 months ago

sunny-rbl commented 10 months ago

translator = Translator("seamlessM4T_large", vocoder_name_or_card="vocoder_36langs", device=torch.device("cuda:0"), dtype = "float16") this line is throwing TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=int, device=torch.device), but expected one of:

YashasviMantha commented 10 months ago

The dtype is supposed to be an instance of torch.dtype and it seems like you are passing a string. Change the dtype = "float16" to dtype= torch.float16. The Translator object will look something like this after the changes:

translator = Translator("seamlessM4T_large", vocoder_name_or_card="vocoder_36langs", device=torch.device("cuda:0"), dtype=torch.float16)