Update modeling_minicpmo.py
Browse files- modeling_minicpmo.py +2 -0
modeling_minicpmo.py
CHANGED
@@ -584,6 +584,8 @@ class MiniCPMO(MiniCPMOPreTrainedModel):
|
|
584 |
|
585 |
if self.config.chunk_input:
|
586 |
for i in range(bs):
|
|
|
|
|
587 |
audio_embs = torch.cat(audio_embeddings[i], dim=0).to(
|
588 |
device=input_embeddings.device, dtype=input_embeddings.dtype
|
589 |
)
|
|
|
584 |
|
585 |
if self.config.chunk_input:
|
586 |
for i in range(bs):
|
587 |
+
if not audio_embeddings[i]:
|
588 |
+
continue
|
589 |
audio_embs = torch.cat(audio_embeddings[i], dim=0).to(
|
590 |
device=input_embeddings.device, dtype=input_embeddings.dtype
|
591 |
)
|