BUAADreamer commited on
Commit
cdca350
·
verified ·
1 Parent(s): 34a6e7f

Update modeling_minicpmo.py

Browse files
Files changed (1) hide show
  1. 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
  )