Merge pull request #9 from clindstedt/patch-1

Prevent incompatibility with nighly build / dev versions of torch
This commit is contained in:
ArtemM
2023-11-01 21:11:13 +01:00
committed by GitHub
@@ -17,10 +17,13 @@ from custom_nodes.facerestore_cf.facelib.detection.yolov5face.utils.general impo
scale_coords_landmarks,
)
from torch import torch_version
IS_HIGH_VERSION = torch_version.__version__ >= "1.9.0"
try:
version_str = torch.__version__.split('+')[0]
major, minor, patch = map(int, version_str.split('.'))
IS_HIGH_VERSION = (major, minor, patch) >= (1, 9, 0)
except ValueError:
# Handle the case of a development version here
IS_HIGH_VERSION = False
def isListempty(inList):
if isinstance(inList, list): # Is a list