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

Open
opened 2023-08-10 10:05:06 +02:00 by glucauze · 4 comments
glucauze commented 2023-08-10 10:05:06 +02:00 (Migrated from github.com)

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

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 2023-08-10 10:07:39 +02:00 (Migrated from github.com)

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

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 2023-08-15 01:14:35 +02:00 (Migrated from github.com)

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

@jet3004 : I was not able to reproduce your error. Did you use the last version ?
925-Studio commented 2023-08-29 16:13:28 +02:00 (Migrated from github.com)

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!

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 2023-08-29 16:21:41 +02:00 (Migrated from github.com)

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

Are you sure it is the same problem if you don't see any error ?
Sign in to join this conversation.