Nuked88 / ComfyUI-N-Nodes

A suite of custom nodes for ConfyUI that includes GPT text-prompt generation, LoadVideo, SaveVideo, LoadFramesFromFolder and FrameInterpolator
MIT License
199 stars 22 forks source link

[BUG]SaveVideo works intermitently #53

Closed mooja77 closed 2 months ago

mooja77 commented 5 months ago

Describe the bug SaveVideo only works for some videos. I'm using ReactorFaceSwap. Some videos save, and some do not. I have tried different video resolutions and lengths(number of frames) but can't get some to work, while others do.

There are no errors on the command line.

update, now getting this error:

!!! Exception during processing!!! list index out of range Traceback (most recent call last): File "D:\SD\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\SD\ComfyUI\ComfyUI_windows_portable\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 "D:\SD\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\SD\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 58, in slice_dict d_new[k] = v[i if len(v) > i else -1] ~^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: list index out of range

To Reproduce Steps to reproduce the behavior: Unsure why it works with some videos and not others, so not sure what to put here, other than running the workflow below.

Expected behavior The video should be saved, as the others are.

Full log [rgthree] Using rgthree's optimized recursive execution. The video has 23 frames per second. Video Path already deleted 32 frames have been extracted from the video and saved in D:\SD\ComfyUI\ComfyUI_windows_portable\ComfyUI\temp\n-suite\frames_out\JM3_61 MoviePy - Writing audio in D:\SD\ComfyUI\ComfyUI_windows_portable\ComfyUI\temp\n-suite\frames_out\JM3_61\audio.mp3 MoviePy - Done. images_limit 0 [ReActor] 18:34:23 - STATUS - Working: source face index [0], target face index [0] [ReActor] 18:34:24 - STATUS - Using Hashed Source Face(s) Model... [ReActor] 18:34:24 - STATUS - Analyzing Target Image 0... [ReActor] 18:34:24 - STATUS - Analyzing Target Image 1... [ReActor] 18:34:25 - STATUS - Analyzing Target Image 2... [ReActor] 18:34:26 - STATUS - Analyzing Target Image 3... [ReActor] 18:34:27 - STATUS - Analyzing Target Image 4... [ReActor] 18:34:28 - STATUS - Analyzing Target Image 5... [ReActor] 18:34:29 - STATUS - Analyzing Target Image 6... [ReActor] 18:34:30 - STATUS - Analyzing Target Image 7... [ReActor] 18:34:31 - STATUS - Analyzing Target Image 8... [ReActor] 18:34:32 - STATUS - Analyzing Target Image 9... [ReActor] 18:34:33 - STATUS - Analyzing Target Image 10... [ReActor] 18:34:34 - STATUS - Analyzing Target Image 11... [ReActor] 18:34:35 - STATUS - Analyzing Target Image 12... [ReActor] 18:34:36 - STATUS - Analyzing Target Image 13... [ReActor] 18:34:37 - STATUS - Analyzing Target Image 14... [ReActor] 18:34:38 - STATUS - Analyzing Target Image 15... [ReActor] 18:34:39 - STATUS - Analyzing Target Image 16... [ReActor] 18:34:40 - STATUS - Analyzing Target Image 17... [ReActor] 18:34:41 - STATUS - Analyzing Target Image 18... [ReActor] 18:34:42 - STATUS - Analyzing Target Image 19... [ReActor] 18:34:43 - STATUS - Analyzing Target Image 20... [ReActor] 18:34:44 - STATUS - Analyzing Target Image 21... [ReActor] 18:34:45 - STATUS - Analyzing Target Image 22... [ReActor] 18:34:46 - STATUS - Analyzing Target Image 23... [ReActor] 18:34:47 - STATUS - Analyzing Target Image 24... [ReActor] 18:34:48 - STATUS - Analyzing Target Image 25... [ReActor] 18:34:49 - STATUS - Analyzing Target Image 26... [ReActor] 18:34:50 - STATUS - Analyzing Target Image 27... [ReActor] 18:34:51 - STATUS - Analyzing Target Image 28... [ReActor] 18:34:52 - STATUS - Analyzing Target Image 29... [ReActor] 18:34:53 - STATUS - Analyzing Target Image 30... [ReActor] 18:34:54 - STATUS - Analyzing Target Image 31... [ReActor] 18:34:55 - STATUS - Swapping 0... [ReActor] 18:34:55 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:34:56 - STATUS - No target face found for 0 [ReActor] 18:34:56 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:34:57 - STATUS - No target face found for 0 [ReActor] 18:34:57 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:34:58 - STATUS - No target face found for 0 [ReActor] 18:34:58 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:34:58 - STATUS - No target face found for 0 [ReActor] 18:34:58 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:34:59 - STATUS - No target face found for 0 [ReActor] 18:34:59 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:35:00 - STATUS - No target face found for 0 [ReActor] 18:35:00 - STATUS - Swapping 7... [ReActor] 18:35:00 - STATUS - Swapping 8... [ReActor] 18:35:00 - STATUS - Swapping 9... [ReActor] 18:35:00 - STATUS - Swapping 10... [ReActor] 18:35:01 - STATUS - Swapping 11... [ReActor] 18:35:01 - STATUS - Swapping 12... [ReActor] 18:35:01 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:35:02 - STATUS - No target face found for 0 [ReActor] 18:35:02 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:35:02 - STATUS - No target face found for 0 [ReActor] 18:35:02 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:35:03 - STATUS - No target face found for 0 [ReActor] 18:35:03 - STATUS - Trying to halve 'det_size' parameter [ReActor] 18:35:04 - STATUS - No target face found for 0 [ReActor] 18:35:04 - STATUS - Swapping 17... [ReActor] 18:35:04 - STATUS - Swapping 18... [ReActor] 18:35:04 - STATUS - Swapping 19... [ReActor] 18:35:04 - STATUS - Swapping 20... [ReActor] 18:35:04 - STATUS - Swapping 21... [ReActor] 18:35:05 - STATUS - Swapping 22... [ReActor] 18:35:05 - STATUS - Swapping 23... [ReActor] 18:35:05 - STATUS - Swapping 24... [ReActor] 18:35:05 - STATUS - Swapping 25... [ReActor] 18:35:05 - STATUS - Swapping 26... [ReActor] 18:35:05 - STATUS - Swapping 27... [ReActor] 18:35:05 - STATUS - Swapping 28... [ReActor] 18:35:05 - STATUS - Swapping 29... [ReActor] 18:35:05 - STATUS - Swapping 30... [ReActor] 18:35:05 - STATUS - Swapping 31... [ReActor] 18:35:05 - STATUS - --Done!--

Prompt executed in 46.13 seconds

Screenshots ComfyUIScreenshot

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

DonBaronFactory commented 5 months ago

This problem is not related to this project but rather to the buggy implementation of Reactor, see issue: https://github.com/Gourieff/comfyui-reactor-node/issues/288#issuecomment-2089602635