Commit 9eadc4f1 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #14121 from AUTOMATIC1111/fix-Auto-focal-point-crop-for-opencv-4.8.x

Fix auto focal point crop for opencv >= 4.8
parents 97c8e7e0 d608926f
This diff is collapsed.
...@@ -3,7 +3,7 @@ from PIL import Image, ImageOps ...@@ -3,7 +3,7 @@ from PIL import Image, ImageOps
import math import math
import tqdm import tqdm
from modules import paths, shared, images, deepbooru from modules import shared, images, deepbooru
from modules.textual_inversion import autocrop from modules.textual_inversion import autocrop
...@@ -196,7 +196,7 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre ...@@ -196,7 +196,7 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre
dnn_model_path = None dnn_model_path = None
try: try:
dnn_model_path = autocrop.download_and_cache_models(os.path.join(paths.models_path, "opencv")) dnn_model_path = autocrop.download_and_cache_models()
except Exception as e: except Exception as e:
print("Unable to load face detection model for auto crop selection. Falling back to lower quality haar method.", e) print("Unable to load face detection model for auto crop selection. Falling back to lower quality haar method.", e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment