comfyui-reactor-node
comfyui-reactor-node copied to clipboard
Video / Frames refuse to output to file when video starts with a non-detectable frame
First, confirm
- [X] I have read the instruction carefully
- [X] I have searched the existing issues
- [X] I have updated the extension to the latest version
What happened?
Faceswap process outputs nothing after running a complete faceswap workflow when scene starts with no detectable face. Process works fine when selected frames starts with a detectable face even when in the middle or end part of the frame range the face suddenly becomes undetectable. This behavior was first noticed after the last update where a face detect input face order additional feature was added.
Steps to reproduce the problem
Test any video that has a non detectable face in the first frame or first part of the video. Video will not output anything even though process takes place and completed. This also is a problem when you select frame range in the video that starts with a non detectable frame even though the base video input itself starts with a detected face. For example if a video is 100 frames long and you select a frame range of 50-100 (start at frame 51, 50 frame limit), and on frame 51 it does not detect a face, it will not output anything.
Sysinfo
Windows 10 Pro (64-bit) Firefox 125.0.2 (64-bit) Zotac RTX 2070 Super 8GB VRAM
Relevant console log
[ReActor] 06:26:21 - STATUS - Swapping 0...
[ReActor] 06:26:22 - STATUS - Trying to halve 'det_size' parameter
[ReActor] 06:26:22 - STATUS - No target face found for 0
[ReActor] 06:26:22 - STATUS - Trying to halve 'det_size' parameter
[ReActor] 06:26:23 - STATUS - No target face found for 0
[ReActor] 06:26:23 - STATUS - Trying to halve 'det_size' parameter
[ReActor] 06:26:24 - STATUS - No target face found for 0
[ReActor] 06:26:24 - STATUS - Trying to halve 'det_size' parameter
[ReActor] 06:26:25 - STATUS - No target face found for 0
[ReActor] 06:26:25 - STATUS - Swapping 5...
[ReActor] 06:26:26 - STATUS - Swapping 6...
[ReActor] 06:26:27 - STATUS - Swapping 7...
[ReActor] 06:26:28 - STATUS - Swapping 8...
[ReActor] 06:26:29 - STATUS - Swapping 9...
[ReActor] 06:26:29 - STATUS - Swapping 10...
[ReActor] 06:26:30 - STATUS - Swapping 11...
[ReActor] 06:26:31 - STATUS - Swapping 12...
[ReActor] 06:26:32 - STATUS - Swapping 13...
[ReActor] 06:26:33 - STATUS - Swapping 14...
[ReActor] 06:26:34 - STATUS - Swapping 15...
[ReActor] 06:26:35 - STATUS - Swapping 16...
[ReActor] 06:26:36 - STATUS - Swapping 17...
[ReActor] 06:26:36 - STATUS - Swapping 18...
[ReActor] 06:26:37 - STATUS - Swapping 19...
[ReActor] 06:26:38 - STATUS - Swapping 20...
Additional information
Node used for Loading video is LoadVideo from ComfyUI-N-Nodes Node used for video/frames output is SaveVideo from ComfyUI-N-Nodes
Could you please provide your workflow as JSON?
Could you please provide your workflow as JSON?
FaceSwap_VideoSequenceFrames04_Clean.json
Here you go
This happens to me to, I figured it must be the face restorer. It crashes after the Done prompt right before the restoration starts. The error i get is the following:
[ReActor] 19:19:54 - STATUS - Trying to halve 'det_size' parameter [ReActor] 19:19:54 - STATUS - No target face found for 0 [ReActor] 19:19:54 - STATUS - --Done!-- !!! Exception during processing!!! torch.cat(): expected a non-empty list of Tensors Traceback (most recent call last): File "/home/AI/ComfyUI2401/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/home/AI/ComfyUI2401/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/home/AI/ComfyUI2401/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/home/AI/ComfyUI2401/custom_nodes/comfyui-reactor-node/nodes.py", line 380, in execute result = reactor.execute( File "/home/AI/ComfyUI2401/custom_nodes/comfyui-reactor-node/nodes.py", line 324, in execute result = batched_pil_to_tensor(p.init_images) File "/home/AI/ComfyUI2401/custom_nodes/comfyui-reactor-node/reactor_utils.py", line 44, in batched_pil_to_tensor return torch.cat([pil_to_tensor(image) for image in images], dim=0) RuntimeError: torch.cat(): expected a non-empty list of Tensors
RuntimeError: torch.cat(): expected a non-empty list of Tensors
This can happen if no faces are detected Will be fixed in future updates
Could you please provide your workflow as JSON?
FaceSwap_VideoSequenceFrames04_Clean.json
Here you go
I will take a look this week
I figure this issue seems to have a bigger impact, reactor simply doesn't return any images where no face was detected. In other words, the output of a small clip is just skipping frames completely, rendering the output unusable.
Edit: I reverted back to commit 31753b4b28c533cc8af30e1534dd6a19b953603f and works flawlessly. Until fixed won't update no more
I'm having a similar issue. The video gets cut off in the middle.
Already fixed in the Evolve guys I will merge it soon into Main
Merged