mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Set can_generate for SpeechT5ForTextToSpeech (#25493)
add can_generate=True to SpeechT5ForTextToSpeech
This commit is contained in:
parent
87c9d8a10f
commit
ee7d6694ed
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user