CodeFormer icon indicating copy to clipboard operation
CodeFormer copied to clipboard

IndexError: list index out of range - pytorch nightly/cuda 12.1

Open sloflo opened this issue 2 years ago • 1 comments

Ran the entire setup but had to install pytorch nightly to match my cuda version. Verified pytorch and cuda are working fine.

print(torch.__version__) 2.1.0.dev20230728+cu121 print(torch.version.cuda) 12.1 print(torch.cuda.is_available()) True

But now I get this error:

(codeformer) D:\CodeFormer>python inference_codeformer.py -w 1 --input_path "inputs\whole_imgs\00.jpg"

Traceback (most recent call last):
  File "inference_codeformer.py", line 7, in <module>
    from basicsr.utils import imwrite, img2tensor, tensor2img
  File "D:\CodeFormer\basicsr\__init__.py", line 3, in <module>
    from .archs import *
  File "D:\CodeFormer\basicsr\archs\__init__.py", line 5, in <module>
    from basicsr.utils import get_root_logger, scandir
  File "D:\CodeFormer\basicsr\utils\__init__.py", line 4, in <module>
    from .misc import check_resume, get_time_str, make_exp_dirs, mkdir_and_rename, scandir, set_random_seed, sizeof_fmt
  File "D:\CodeFormer\basicsr\utils\misc.py", line 12, in <module>
    IS_HIGH_VERSION = [int(m) for m in list(re.findall(r"^([0-9]+)\.([0-9]+)\.([0-9]+)([^0-9][a-zA-Z0-9]*)?(\+git.*)?$",\
IndexError: list index out of range

sloflo avatar Jul 29 '23 18:07 sloflo