diff --git a/README.md b/README.md index 2a7fb6a..b5ee6bb 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ These custom nodes provide a rotation aware face extraction, paste back, and var ![Comparison](examples/comparison.jpg) ## Patch notes +- 2024-06-20 - fixed issue [13](https://github.com/dchatel/comfyui_facetools/issues/13) - 2024-06-14 - Sent yolo to cuda device if available (credits: kilroythethird, thanks for the suggestion!) - 2024-06-14 - Dropped the requirement from insightface completely. - 2024-05-22 - Updated GenderFaceFilter node. diff --git a/utils.py b/utils.py index 35dccce..363d177 100644 --- a/utils.py +++ b/utils.py @@ -8,11 +8,10 @@ from scipy.spatial import ConvexHull from folder_paths import models_dir from .BiSeNet import BiSeNet from ultralytics import YOLO -from onnxruntime import InferenceSession +from onnxruntime import InferenceSession, get_available_providers from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation from skimage import transform as trans - arcface_dst = np.array( [[38.2946, 51.6963], [73.5318, 51.5014], [56.0252, 71.7366], [41.5493, 92.3655], [70.7299, 92.2041]], @@ -63,7 +62,7 @@ class Models: @classmethod def lmk(cls, crop): if '_lmk' not in cls.__dict__: - cls._lmk = InferenceSession(os.path.join(models_dir, 'landmarks', 'fan2_68_landmark.onnx')) + cls._lmk = InferenceSession(os.path.join(models_dir, 'landmarks', 'fan2_68_landmark.onnx'), providers=get_available_providers()) lmk = cls._lmk.run(None, {'input': crop})[0] return lmk