kex0 / batch-face-swap

Automaticaly detects faces and replaces them
338 stars 40 forks source link

AttributeError: 'NoneType' object has no attribute 'mode' #71

Open shaaraa opened 1 year ago

shaaraa commented 1 year ago

While trying to do batch , folder to folder Error completing request Arguments: ('task(r98geqewwibyduq)', 4, '', '', [], None, None, None, None, None, None, None, 20, 0, 4, 0, 1, False, False, 1, 1, 7, 1.5, 0.75, 2650298530.0, -1.0, 0, 0, 0, False, 512, 512, 0, 0, 32, 0, '', '', '', [], 0, True, 'img2img', False, '', '', False, 'Euler a', False, 'aZovyaRPGArtistTools_v3.safetensors [c7751e6108]', True, 0.5, True, 4, True, 32, False, False, 30, False, 6, False, 512, 512, 'C:\\Temporal\\output', False, 1, 'Both ▦', None, 'C:\\Temporal\\output1', False, True, True, True, False, False, False, 100, 100, False, '', '', '', 'generateMasksTab', 4, 4, 2.5, 30, 1.03, 1, 1, 5, 0.5, 5, False, True, True, 20, False, 'MultiDiffusion', False, True, 1024, 1024, 96, 96, 48, 4, 'None', 2, False, 10, 1, 1, 64, False, False, False, False, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 960, 64, True, True, True, False, True, False, 1, False, False, False, 1.1, 1.5, 100, 0.7, False, False, True, False, False, 0, 'Gustavosta/MagicPrompt-Stable-Diffusion', '', <controlnet.py.UiControlNetUnit object at 0x000001B400A55360>, <controlnet.py.UiControlNetUnit object at 0x000001B400A57EE0>, <controlnet.py.UiControlNetUnit object at 0x000001B400A562F0>, <controlnet.py.UiControlNetUnit object at 0x000001B400A57670>, '<ul>\n<li><code>CFG Scale</code> should be 2 or lower.</li>\n</ul>\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 0.5, 'Linear', 'None', '<p style="margin-bottom:0.75em">Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8</p>', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, 'positive', 'comma', 0, False, False, '', '<p style="margin-bottom:0.75em">Will upscale the image by the selected scale factor; use width and height sliders to set tile size</p>', 64, 0, 2, 1, '', 0, '', 0, '', True, False, False, False, 0, None, False, None, False, None, False, None, False, 50, '<p style="margin-bottom:0.75em">Will upscale the image depending on the selected target size type</p>', 512, 0, 8, 32, 64, 0.35, 32, 0, True, 0, False, 8, 0, 0, 2048, 2048, 2) {} Traceback (most recent call last): File "C:\AI\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, **kwargs)) File "C:\AI\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "C:\AI\stable-diffusion-webui\modules\img2img.py", line 172, in img2img processed = process_images(p) File "C:\AI\stable-diffusion-webui\modules\processing.py", line 503, in process_images res = process_images_inner(p) File "C:\AI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs) File "C:\AI\stable-diffusion-webui\modules\processing.py", line 594, in process_images_inner p.init(p.all_prompts, p.all_seeds, p.all_subseeds) File "C:\AI\stable-diffusion-webui\modules\processing.py", line 1010, in init image = images.flatten(img, opts.img2img_background_color) File "C:\AI\stable-diffusion-webui\modules\images.py", line 674, in flatten if img.mode == "RGBA": AttributeError: 'NoneType' object has no attribute 'mode'

Jonseed commented 1 year ago

I see the same issue, although it only shows when the face detection is set to YuNet. If I set it to mediapipe, then that error goes away.