Update modeling_minicpmo.py (#32)
Browse files- Update modeling_minicpmo.py (cdca350426179d35200fe3d66352ceca8261dc19)
Co-authored-by: Zhangchi Feng <BUAADreamer@users.noreply.huggingface.co>
- 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 |
)
|