[BUG] "Existing masks" feature not working
erohin opened this issue · 0 comments
erohin commented
Trying to use predefined masks from "Masks directory"
Will process 1 images, generating 1 new images for each.
Error running process: /Users/user/Projects/ai/stable-diffusion-webui/extensions/batch-face-swap/scripts/batch_face_swap.py
Traceback (most recent call last):
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/scripts.py", line 451, in process
script.process(p, *script_args)
File "/Users/user/Projects/ai/stable-diffusion-webui/extensions/batch-face-swap/scripts/batch_face_swap.py", line 965, in process
finishedImages = generateImages(p, facecfg, input_image, input_path, searchSubdir, viewResults, int(divider), howSplit, saveMask, output_path, saveToOriginalFolder, onlyMask, saveNoFace, overridePrompt, bfs_prompt, bfs_nprompt, overrideSampler, sd_sampler, overrideModel, sd_model, overrideDenoising, denoising_strength, overrideMaskBlur, mask_blur, overridePadding, inpaint_full_res_padding, overrideSeed, overrideSteps, steps, overrideCfgScale, cfg_scale, overrideSize, bfs_width, bfs_height, invertMask, singleMaskPerImage, countFaces, maskWidth, maskHeight, keepOriginalName, pathExisting, pathMasksExisting, output_pathExisting, selectedTab, mainTab, loadGenParams, rotation_threshold)
File "/Users/user/Projects/ai/stable-diffusion-webui/extensions/batch-face-swap/scripts/batch_face_swap.py", line 546, in generateImages
finishedImages = faceSwap(p, masks, image, finishedImages, invertMask, forced_filename, output_pathExisting, info, selectedTab, mainTab, faces_info, rotation_threshold, overridePrompt, bfs_prompt, bfs_nprompt, overrideSampler, sd_sampler, overrideModel, sd_model, overrideDenoising, denoising_strength, overrideMaskBlur, mask_blur, overridePadding, inpaint_full_res_padding, overrideSeed, overrideSteps, steps, overrideCfgScale, cfg_scale, overrideSize, bfs_width, bfs_height,)
UnboundLocalError: local variable 'faces_info' referenced before assignment
Error completing request
Arguments: ('task(iura7z4o8dn4247)', 4, 'A a portrait person', 'cartoon, 3d, ((disfigured)), ((bad art)), ((deformed)), ((poorly drawn)), ((extra limbs)), ((b&w)), weird colors, blurry', [], None, None, None, None, None, None, None, 100, 0, 4, 0, 1, False, False, 1, 1, 2, 1.5, 0.75, -1.0, -1.0, 0, 0, 0, False, 0, 512, 512, 1, 0, 0, 32, 0, '', '', '', [], 0, True, 'img2img', False, '', '', False, 'Euler a', False, 'realistic-vision.safetensors [f1d0443cbb]', True, 0.5, True, 4, True, 32, False, False, 30, False, 6, False, 512, 512, '/Users/user/Projects/video/faces/test/images', False, 1, 'Both ▦', False, '', False, True, True, False, False, False, False, 110, 120, False, '/Users/user/Projects/video/faces/test/images', '/Users/user/Projects/video/faces/test/masks', '', 'existingMasksTab', 4, 4, 2.5, 30, 1.03, 1, 1, 5, 0.5, 5, False, True, True, 20, '<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) {}
Traceback (most recent call last):
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/img2img.py", line 178, in img2img
processed = process_images(p)
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/processing.py", line 610, in process_images
res = process_images_inner(p)
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/processing.py", line 670, in process_images_inner
p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/processing.py", line 1184, in init
image = images.flatten(img, opts.img2img_background_color)
File "/Users/user/Projects/ai/stable-diffusion-webui/modules/images.py", line 710, in flatten
if img.mode == "RGBA":
AttributeError: 'NoneType' object has no attribute 'mode'
@kex0 any suggestions?