s9roll7 / face_crop_img2img

AUTOMATIC1111 UI custom script for img2img around face with different "Denoising Strength" settings
26 stars 4 forks source link

[BUG] OpenCV error #4

Open kj4483 opened 11 months ago

kj4483 commented 11 months ago

Hi, awesome extension, but unfortunately when I using YuNET, I have always issue like this :

Traceback (most recent call last): File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\call_queue.py", line 57, in f res = list(func(*args, *kwargs)) File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\call_queue.py", line 36, in f res = func(args, *kwargs) File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\img2img.py", line 206, in img2img processed = modules.scripts.scripts_img2img.run(p, args) File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\scripts.py", line 601, in run processed = script.run(p, *script_args) File "C:\Users\kj4483\SD\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 257, in run face_coords = detect_face(base_img, p.image_mask,face_detection_method) File "C:\Users\kj4483\SD\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 240, in detect_face return self.detect_face(img_array) File "C:\Users\kj4483\SD\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 102, in detectface , result = self.face_detector.detect(img_array) cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\net_impl.cpp:279: error: (-204:Requested object was not found) Layer with requested id=-1 not found in function 'cv::dnn::dnn4_v20230620::Net::Impl::getLayerData'

I've explored the above issues but have not been able to find a solution.

Any chance to fix ?