glucauze / sd-webui-faceswaplab

Extended faceswap extension for StableDiffusion web-ui with multiple faceswaps, inpainting, checkpoints, ....
https://glucauze.github.io/sd-webui-faceswaplab/
GNU Affero General Public License v3.0
715 stars 92 forks source link

img2img : Failed to process : tuple index out of range #41

Open glucauze opened 11 months ago

glucauze commented 11 months ago

Thanks, trying option one now and it's working pretty well... However, @glucauze, in lieu of creating a new discussion, how do I effectively use the tab in img2img? I have a 'classic' image of three people that I am trying to keep everything in tact with and replace all three faces (with face checkpoints) and it's just not working like it does in txt2img. Denoising set at .1 (but have tried every stage) and tried all "Configure swapping. Swapping can occur before img2img, after or both" options – though I cannot lie and say I really get the difference between when to use "Swap in source image (blended face)" and/or "Swap in generated image" in img2img.

I'm primarily getting these two errors:

2023-08-09 22:02:55,942 - FaceSwapLab - INFO - Failed to process : tuple index out of range
Traceback (most recent call last):
  File "/Users/jet/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab.py", line 141, in process
    self.read_config(p, *components)
  File "/Users/jet/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab.py", line 121, in read_config
    classes: List[Any] = dataclasses_from_flat_list(
  File "/Users/jet/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_utils/ui_utils.py", line 33, in dataclasses_from_flat_list
    instance = dataclass_from_flat_list(cls, values[idx : idx + num_fields])
  File "/Users/jet/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_utils/ui_utils.py", line 17, in dataclass_from_flat_list
    value = values[idx]
IndexError: tuple index out of range

and

2023-08-09 21:51:25,640 - FaceSwapLab - ERROR - Failed to swap face in postprocess method : 'FaceSwapScript' object has no attribute 'units'
Traceback (most recent call last):
  File "/Users/jet/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab.py", line 166, in postprocess
    if self.enabled:
  File "/Users/jet/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab.py", line 84, in enabled
    return any([u.enable for u in self.units]) and not shared.state.interrupted
AttributeError: 'FaceSwapScript' object has no attribute 'units'

Thanks!

Originally posted by @jet3004 in https://github.com/glucauze/sd-webui-faceswaplab/discussions/32#discussioncomment-6687269

glucauze commented 11 months ago

I don't have the opportunity to test this week extensively. I'll look into it as soon as I can. I'm surprised by the error

glucauze commented 11 months ago

@jet3004 : I was not able to reproduce your error. Did you use the last version ?

925-Studio commented 11 months ago

I'm facing the similar problem here. I'm using the latest version and there's no error message in terminal. But when I generate image in img2img with faceswaplab enabled, the result shows but won't appear in outputs/img2img-images folder. Any ideas? Thanks in advance!

glucauze commented 11 months ago

Are you sure it is the same problem if you don't see any error ?