kijai / ComfyUI-CogVideoXWrapper

321 stars 19 forks source link

Just logging a solved error: h264_nvenc codec failed to work #20

Closed Grant-CP closed 1 week ago

Grant-CP commented 2 weeks ago

Hi, just logging my issue and solution in case it can help someone else who is searching for a solution on the internet.

I ran the default workflow after changing the t5 model path name. Everything went well until I got to the video combine node. It appears that the default video codec setting of h264_nvenc-mp4 didn't work for me. I swapped it to video/h264-mp4 and it worked just fine.

This is on an ubuntu machine with a A100 attached. Potentially worth noting I have some misconfigured Nvidia drivers somewhere.

The full error message:

!!! Exception during processing !!! An error occurred in the ffmpeg subprocess:
[h264_nvenc @ 0x55d754c3ce80] OpenEncodeSessionEx failed: unsupported device (2): (no details)
[h264_nvenc @ 0x55d754c3ce80] No capable devices found
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Traceback (most recent call last):
  File "/home/azureuser/code/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py", line 128, in ffmpeg_process
    proc.stdin.write(frame_data)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/azureuser/code/ComfyUI/execution.py", line 317, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/azureuser/code/ComfyUI/execution.py", line 192, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/azureuser/code/ComfyUI/execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "/home/azureuser/code/ComfyUI/execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/azureuser/code/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py", line 490, in combine_video
    output_process.send(image)
  File "/home/azureuser/code/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py", line 141, in ffmpeg_process
    raise Exception("An error occurred in the ffmpeg subprocess:\n" \
Exception: An error occurred in the ffmpeg subprocess:
[h264_nvenc @ 0x55d754c3ce80] OpenEncodeSessionEx failed: unsupported device (2): (no details)
[h264_nvenc @ 0x55d754c3ce80] No capable devices found
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
kijai commented 2 weeks ago

Hmm yeah nvenc shouldn't be the default, noted, thanks.