DiffBIR icon indicating copy to clipboard operation
DiffBIR copied to clipboard

Error in inference

Open ZhouYFeng opened this issue 2 years ago • 3 comments

Thanks for the excellent work. But some errors here: Image_20230907193331 I put lq images with size 512 in /home/notebook/data/group/DiffusionFace/DiffBIR/image/TestCrop. I have no idea about the error. Thanks in advance

ZhouYFeng avatar Sep 07 '23 11:09 ZhouYFeng

The reason may be cuda out of memory. DiffBIR requires at least 10G gpu memory for inference at a resolution of 512 now.

0x3f3f3f3fun avatar Sep 08 '23 01:09 0x3f3f3f3fun

One V100 32G used for the inference. But still failed.

Seems like the data dimensions do not match the actual data dimensions when the nn.Linear is defined, and need to be checked and modified.

The cuda version of mine is 11.4. I am not sure if it is okay for the env requirement provieded in DiffBIR.

ZhouYFeng avatar Sep 08 '23 01:09 ZhouYFeng

Since the program automatically handles data shape, I don't think it's a data shape issue. However, if you still have doubts, you can test it with some 512x512 images. After searching on Google, I found that most people solved this problem by updating their environment:

  • https://github.com/ultralytics/yolov5/issues/10046#issuecomment-1466364839
  • https://stackoverflow.com/questions/68571902/how-to-fix-runtimeerror-cuda-error-cublas-status-invalid-value-when-calling-cub

So, you can try reinstalling your environment, especially PyTorch and CUDA Toolkit, strictly following the instructions in the README.md.

0x3f3f3f3fun avatar Sep 08 '23 08:09 0x3f3f3f3fun