Getting RuntimeError: expected scalar type Double but found Float while using model.generate()
#41
by
Jyothish4
- opened
This was the code that I have used:
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
sample = ds[0]["audio"]
input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features
predicted_ids = model.generate(input_features.to(torch.float64))
and this resulted in "RuntimeError: expected scalar type Double but found Float".
Jyothish4
changed discussion status to
closed
Jyothish4
changed discussion status to
open
Its fixed now , I forgot to restart the kernel.
Jyothish4
changed discussion status to
closed