Unverified Commit ee7d6694 authored by Yoach Lacombe's avatar Yoach Lacombe Committed by GitHub
Browse files

Set can_generate for SpeechT5ForTextToSpeech (#25493)

add can_generate=True to SpeechT5ForTextToSpeech
parent 87c9d8a1
......@@ -2783,6 +2783,13 @@ class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel):
encoder_attentions=outputs.encoder_attentions,
)
def can_generate(self) -> bool:
"""
Returns True. This model can `generate` and must therefore have this property set to True in order to be used
in the TTS pipeline.
"""
return True
@torch.no_grad()
def generate(
self,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment