mat1 and mat2 shapes cannot be multiplied (4x256 and 768x1280)
means you're trying to perform a matrix multiplication (e.g. torch.matmul or a linear layer) between two incompatible tensor shapes:
mat1: shape (4, 256)
mat2: shape (768, 1280)
This is invalid because 256 ≠ 768. For matrix multiplication, the inner dimensions must match: e.g., (A×B) × (B×C) = A×C.