kijai / ComfyUI-LivePortraitKJ

ComfyUI nodes for LivePortrait
MIT License
1.67k stars 129 forks source link

ValueError: The number of driving images should be larger than the number of source images. #120

Closed O-O1024 closed 3 months ago

O-O1024 commented 3 months ago

If the frame count of driving video is less than frame_load_cap,

image

this error will be raised:

Traceback (most recent call last):
  File "/root/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/root/ComfyUI/execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "/root/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/root/ComfyUI/custom_nodes/ComfyUI-LivePortraitKJ/nodes.py", line 317, in process
    raise ValueError("The number of driving images should be larger than the number of source images.")
ValueError: The number of driving images should be larger than the number of source images.

😳 Is it necessary ? Why don't choose the same strategy like the official repo the 3th point ?

kijai commented 3 months ago

Rude? I find it the opposite, rude would be to assume the user knows of this limitation and leave them wondering why is it not working. You can easily limit the frame load cap of the source as well with that same value.

O-O1024 commented 3 months ago

En en, yes. But I don't know how many frames the video contains before runing workflows to get this info, and VideoHelperSuit node doesn't provider it. @Kosinkadink