diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-12-02 06:46:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-02 06:46:00 +0000 |
commit | 9eadc4f146daf9a43290e0f469c22dd5549572a3 (patch) | |
tree | 95b1e46d497229340d563a9c8a99c41ff2b3a523 /modules/textual_inversion/preprocess.py | |
parent | 97c8e7e0c701e0c62ebfc3e2c1f069aa4bc129dd (diff) | |
parent | d608926f817b279d16b39a7875beec80d010a988 (diff) | |
download | stable-diffusion-webui-gfx803-9eadc4f146daf9a43290e0f469c22dd5549572a3.tar.gz stable-diffusion-webui-gfx803-9eadc4f146daf9a43290e0f469c22dd5549572a3.tar.bz2 stable-diffusion-webui-gfx803-9eadc4f146daf9a43290e0f469c22dd5549572a3.zip |
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
Diffstat (limited to 'modules/textual_inversion/preprocess.py')
-rw-r--r-- | modules/textual_inversion/preprocess.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index dbd856bd..789fa083 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -3,7 +3,7 @@ from PIL import Image, ImageOps import math
import tqdm
-from modules import paths, shared, images, deepbooru
+from modules import shared, images, deepbooru
from modules.textual_inversion import autocrop
@@ -196,7 +196,7 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre dnn_model_path = None
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:
print("Unable to load face detection model for auto crop selection. Falling back to lower quality haar method.", e)
|