diff --git a/basicsr/archs/arch_util.py b/basicsr/archs/arch_util.py index f5e44ef..3a35baa 100644 --- a/basicsr/archs/arch_util.py +++ b/basicsr/archs/arch_util.py @@ -3,7 +3,12 @@ import math import torch import torchvision import warnings -from distutils.version import LooseVersion +import sys +if sys.version_info >= (3, 12): + from packaging.version import Version + LooseVersion = Version +else: + from distutils.version import LooseVersion from itertools import repeat from torch import nn as nn from torch.nn import functional as F @@ -315,4 +320,4 @@ to_1tuple = _ntuple(1) to_2tuple = _ntuple(2) to_3tuple = _ntuple(3) to_4tuple = _ntuple(4) -to_ntuple = _ntuple \ No newline at end of file +to_ntuple = _ntuple diff --git a/readme.md b/readme.md index 3ab1e53..21a542b 100644 --- a/readme.md +++ b/readme.md @@ -19,7 +19,8 @@ git clone https://github.com/mav-rik/facerestore_cf.git If running the portable windows version of ComfyUI, run embedded_install.bat Windows users not running the portable version can run install.bat. Linux and mac users can run install.sh. -If the install fails for whatever reason, you'll need to work out how to install opencv-python yourself (you'll get a cv2 not found error otherwise) +If the install fails for whatever reason, you'll need to work out how to install opencv-python yourself (you'll get a cv2 not found error otherwise). +If you are using Python3.12 or higher version, please use `requirements_312.txt`. diff --git a/requirements_312.txt b/requirements_312.txt new file mode 100644 index 0000000..cc41849 --- /dev/null +++ b/requirements_312.txt @@ -0,0 +1,21 @@ +opencv-python +numpy +torch +torchvision +addict +future +lmdb +Pillow +pyyaml +requests +scikit-image +scipy +tb-nightly +tqdm +yapf +lpips +gdown # supports downloading the large file from Google Drive +# cmake +# dlib +# conda install -c conda-forge dlib +packaging