s0md3v / sd-webui-roop

roop extension for StableDiffusion web-ui
GNU Affero General Public License v3.0
3.36k stars 857 forks source link

AttributeError: 'NoneType' object has no attribute 'shape' #308

Open GiorgioRafael opened 1 month ago

GiorgioRafael commented 1 month ago

When i click live pops up an error on the powershell

full powershell: C:\Windows\System32\Deep-Live-Cam\modules\processors\frame\face_enhancer.py:21: SyntaxWarning: invalid escape sequence '\m' download_directory_path = resolve_relative_path('..\models') C:\Windows\System32\Deep-Live-Cam\modules\processors\frame\face_enhancer.py:39: SyntaxWarning: invalid escape sequence '\m' model_path = resolve_relative_path('..\models\GFPGANv1.4.pth') Frame processor face_enhancer not found C:\Windows\System32\Deep-Live-Cam\modules\processors\frame\face_enhancer.py:21: SyntaxWarning: invalid escape sequence '\m' download_directory_path = resolve_relative_path('..\models') C:\Windows\System32\Deep-Live-Cam\modules\processors\frame\face_enhancer.py:39: SyntaxWarning: invalid escape sequence '\m' model_path = resolve_relative_path('..\models\GFPGANv1.4.pth') Frame processor faceenhancer not found [ WARN:0@17.648] global loadsave.cpp:241 cv::findDecoder imread('C:/Users/Juker/OneDrive/Área de Trabalho/deepfake/5616819 (1).png'): can't open/read file: check file path/integrity Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\Juker/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\Juker/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\Juker/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\Juker/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\Juker/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (640, 640) Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Juker\AppData\Local\Programs\Python\Python312\Lib\tkinter__init.py", line 1968, in call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\Juker\AppData\Local\Programs\Python\Python312\Lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked self._command() File "C:\Windows\System32\Deep-Live-Cam\modules\ui.py", line 104, in live_button = ctk.CTkButton(root, text='Live', cursor='hand2', command=lambda: webcam_preview())

 ^^^^^^^^^^^^^^^^

File "C:\Windows\System32\Deep-Live-Cam\modules\ui.py", line 281, in webcam_preview source_image = get_one_face(cv2.imread(modules.globals.source_path)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Windows\System32\Deep-Live-Cam\modules\face_analyser.py", line 20, in get_one_face face = get_face_analyser().get(frame) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Juker\AppData\Local\Programs\Python\Python312\Lib\site-packages\insightface\app\face_analysis.py", line 59, in get bboxes, kpss = self.det_model.detect(img, ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Juker\AppData\Local\Programs\Python\Python312\Lib\site-packages\insightface\model_zoo\retinaface.py", line 211, in detect im_ratio = float(img.shape[0]) / img.shape[1] ^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'shape'

Nikita23w commented 3 weeks ago

I have the same problem, have you been able to solve it?

Nikita23w commented 3 weeks ago

AttributeError: 'NoneType' object has no attribute 'shape' it gives such an error after clicking the "Start" button and choosing where to save the result, what should I do?

He-Wu commented 2 weeks ago

I had this problem and solved it by using a high definition image You should use a higher resolution photo.