Loading trained model to make prediction of single image

I trained a UNET model using data loaders now I want to use the trained model to get predictions for a new random image of the size (256x256) single channel. How do I do that?
I tried:

predb = model(torch.from_numpy(img).float().cuda())

But getting:

v.py:459, in Conv2d._conv_forward(self, input, weight, bias)
    455 if self.padding_mode != 'zeros':
    456     return F.conv2d(F.pad(input, self._reversed_padding_repeated_twice, mode=self.padding_mode),
    457                     weight, bias, self.stride,
    458                     _pair(0), self.dilation, self.groups)
--> 459 return F.conv2d(input, weight, bias, self.stride,
    460                 self.padding, self.dilation, self.groups)

RuntimeError: GET was unable to find an engine to execute this computation

That looks like a cuDNN error and would be unexpected. Could you provide a code snippet that reproduces the issue (e.g., by calling F.conv2d using random data with the same shape)?

My model code is here incase that helps! UNET model on GPU runtime error