diff --git a/src/transformers/models/bark/modeling_bark.py b/src/transformers/models/bark/modeling_bark.py index de04614075cf80..a40ce794105024 100644 --- a/src/transformers/models/bark/modeling_bark.py +++ b/src/transformers/models/bark/modeling_bark.py @@ -1068,7 +1068,7 @@ def preprocess_histories( x_coarse_history[n, :] += codebook_size * n # flatten x_coarse_history - x_coarse_history = torch.transpose(x_coarse_history, 0, 1).view(-1) + x_coarse_history = torch.transpose(x_coarse_history, 0, 1).reshape(-1) x_coarse_history = x_coarse_history + semantic_generation_config.semantic_vocab_size