imb101 / ComfyUI-FaceSwap

Custom node to enable face swapping in ComfyUI
GNU Affero General Public License v3.0
29 stars 2 forks source link

list index out of range #4

Open mohsensd1373 opened 7 months ago

mohsensd1373 commented 7 months ago

what this error: Error occurred when executing FaceSwapNode:

list index out of range

File "H:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-FaceSwap\FaceSwapNode.py", line 52, in swap result = swap_face(face, image, models[0], source_face_index, target_faces)

26medias commented 6 months ago

Same here:

got prompt
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 15.64it/s]
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "/home/julien/Projects/cloned/ComfyUI/execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/home/julien/Projects/cloned/ComfyUI/execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "/home/julien/Projects/cloned/ComfyUI/execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/home/julien/Projects/cloned/ComfyUI/custom_nodes/ComfyUI-FaceSwap/FaceSwapNode.py", line 52, in swap
    result = swap_face(face, image, models[0], source_face_index, target_faces)
IndexError: list index out of range

Prompt executed in 1.43 seconds

Workspace: latent-replace-workflow.json, unchanged (https://i.imgur.com/0E5vqgI.png)

I tried everything, many different pictures, setting the indexes, etc... Nothing ever works.

Mohsyn commented 5 months ago

did anyone find a solution ?

mohsensd1373 commented 5 months ago

My problem was the mismatch between ControlNet and Checkpoint, when I downloaded the appropriate ControlNet, it was solved