kex0 / batch-face-swap

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

TypeError: cannot unpack non-iterable int object #83

Open 4DeepThought2 opened 1 year ago

4DeepThought2 commented 1 year ago

Hitting this issue after updating A1111


Counting faces...
*** Error running process: Z:\Programs\stable-diffusion-ui\extensions\batch-face-swap\scripts\batch_face_swap.py
    Traceback (most recent call last):
      File "Z:\Programs\stable-diffusion-ui\modules\scripts.py", line 619, in process
        script.process(p, *script_args)
      File "Z:\Programs\stable-diffusion-ui\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 "Z:\Programs\stable-diffusion-ui\extensions\batch-face-swap\scripts\batch_face_swap.py", line 418, in generateImages
        masks, totalNumberOfFaces, faces_info, skip = findFaces(facecfg, image, width, height, divider, onlyHorizontal, onlyVertical, file, totalNumberOfFaces, singleMaskPerImage, countFaces, maskWidth, maskHeight, skip)
    TypeError: cannot unpack non-iterable int object```
4DeepThought2 commented 1 year ago

Apparently unchecking - Count faces before generating (accurate progress bar but NOT recommended) fixes it.