[Fix] use torch.cat instead of torch.concat to prevent entering the Autograd backends. (#4466)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user