Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range (not duplicated) #16

Open
JakubOmrt opened this issue Dec 22, 2023 · 5 comments
Open

IndexError: list index out of range (not duplicated) #16

JakubOmrt opened this issue Dec 22, 2023 · 5 comments

Comments

@JakubOmrt
Copy link

When I run the default test command, it always ends with an error:

Command: python swapper.py --source_img="./data/man1.jpeg;./data/man2.jpeg" --target_img "./data/mans1.jpeg" --source_indexes=0 --target_indexes=0 --face_restore --background_enhance --face_upsample --upscale=2 --codeformer_fidelity=0.5

Error:
Traceback (most recent call last):
File "C:\inswapper\swapper.py", line 239, in
result_image = process(source_img, target_img, args.source_indexes, args.target_indexes, model)
File "C:\inswapper\swapper.py", line 112, in process
temp_frame = swap_face(
File "C:\inswapper\swapper.py", line 67, in swap_face
source_face = source_faces[source_index]
IndexError: list index out of range

But if I run a modified command that only works with the current file, the command passes without any problems
"./data/mans1.jpeg" --source_indexes=0 --target_indexes=0 --background_enhance --face_upsample --upscale=2 --codeformer_fidelity=0.5

@ashleykleynhans
Copy link
Contributor

I must have accidentally broken the multiple source images with the new features I added 🙈

@JakubOmrt
Copy link
Author

JakubOmrt commented Dec 22, 2023

Examples that I use:
MAN1
man1

MAN2
man2

MANS1
mans1

@alonzuman
Copy link

Try uploading custom images, the default ones we're broken for me when I cloned it, so I just used my own images on the data folder and it worked

@paulocoutinhox
Copy link

i have the same error

@FuturisticWizard
Copy link

Same here :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants