When concatenating the input tensor, ensure that the dimensions match. Instead of torch.cat([input] * bs), you might need to adjust the dimensions explicitly:
input = input.unsqueeze(0).repeat(bs, 1, 1, 1)
The error suggests a mismatch between the expected and actual tensor sizes. Ensure that the output of self.unet matches the expected dimensions.
Ensure that the scheduler’s timesteps and alpha values are correctly handled for batch processing. The alphas_cumprod values should be broadcasted to match the batch size
Debug the tensor shapes by adding print statements to check the shapes of tensors at different stages in your code, you might find where the mismatch occurs