haofanwang / inswapper

One-click Face Swapper and Restoration powered by insightface 🔥

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexError: list index out of range (not duplicated)

JakubOmrt opened this issue · comments

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

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

Examples that I use:
MAN1
man1

MAN2
man2

MANS1
mans1