I am actually running into a very similar issue myself. I get that exact runtime exception if I simply pass an image Tensor of the right dimensions to my model directly during inference.
Not sure what I’m doing wrong either…