Open micrazy opened 1 year ago
It will get this issue because your pytorch used the nvidia version pytorch, and it will return non-number pytorch version.
for example, my pytorch.version will return 2.2.0a0+81ea7a4.
Here is temperory solution which can avoid this issue. edit, "stable-diffusion-webui/repositories/CodeFormer/facelib/detection/yolov5face/face_detector.py"
Modify line 20, IS_HIGH_VERSION to following version
20 version_string = torch.version.split('+')[0] 21 version_string = ''.join(filter(str.isdigit, version_string)) 22 IS_HIGH_VERSION = tuple(map(int, version_string.split('.'))) >= (1, 9, 0)
Is there an existing issue for this?
What happened?
*** Error setting up CodeFormer Traceback (most recent call last): File "/home/workspace/AIGC/stable-diffusion-webui/modules/codeformer_model.py", line 32, in setup_model from facelib.utils.face_restoration_helper import FaceRestoreHelper File "/home/workspace/AIGC/stable-diffusion-webui/repositories/CodeFormer/facelib/utils/face_restoration_helper.py", line 7, in
from facelib.detection import init_detection_model
File "/home/workspace/AIGC/stable-diffusion-webui/repositories/CodeFormer/facelib/detection/init.py", line 11, in
from .yolov5face.face_detector import YoloDetector
File "/home/workspace/AIGC/stable-diffusion-webui/repositories/CodeFormer/facelib/detection/yolov5face/face_detector.py", line 20, in
IS_HIGH_VERSION = tuple(map(int, torch.version.split('+')[0].split('.'))) >= (1, 9, 0)
ValueError: invalid literal for int() with base 10: '0a0'
Steps to reproduce the problem
What should have happened?
All go well
Sysinfo
Torch version: 2.1.0a0+b5021ba
What browsers do you use to access the UI ?
No response
Console logs
Additional information
No response