[Fix] use torch.cat instead of torch.concat to prevent entering the Autograd backends. (#4466)

This commit is contained in:
JieXin Liang
2025-03-16 15:02:47 +08:00
committed by GitHub
parent 81f431eded
commit 1a3fa75f2f
14 changed files with 20 additions and 20 deletions

View File

@@ -1289,7 +1289,7 @@ class MlpProjector(nn.Module):
high_x, low_x = x_or_tuple
high_x = self.high_up_proj(high_x)
low_x = self.low_up_proj(low_x)
x = torch.concat([high_x, low_x], dim=-1)
x = torch.cat([high_x, low_x], dim=-1)
else:
x = x_or_tuple

View File

@@ -828,7 +828,7 @@ class MiniCPMVBaseModel(nn.Module):
)
if isinstance(image_embeds, list):
image_embeds = torch.concat(image_embeds)
image_embeds = torch.cat(image_embeds)
return MiniCPMVImageEmbeddingInputs(
image_bounds=image_bounds,