Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/transformers/models/whisper/generation_whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,8 @@ def _set_return_timestamps(return_timestamps, is_shortform, generation_config):
"Make sure to initialize the generation config with the correct attributes that are needed such as `no_timestamps_token_id`. "
"For more details on how to generate the approtiate config, refer to https://github.com/huggingface/transformers/issues/21878#issuecomment-1451902363"
)

generation_config.return_timestamps = return_timestamps
if return_timestamps is not None:
generation_config.return_timestamps = return_timestamps

@staticmethod
def _set_language_and_task(language, task, is_multilingual, generation_config):
Expand Down