ShmuelRonen / ComfyUI_wav2lip

A custom node for ComfyUI that allows you to perform lip-syncing on videos using the Wav2Lip model. It takes an input video and an audio file and generates a lip-synced output video.
90 stars 20 forks source link

Error: 'dict' object is not callable #36

Closed bollerdominik closed 2 months ago

bollerdominik commented 3 months ago

Hi

When I open the provided workflow (wav2lip.json) I first get the error

This workflow contains one or more nodes which use the old VHS_AUDIO format. They have been highlighted in red. An AudioToVHSAudio node must be added to convert to this legacy format

If I then ignore the error and continue to run it I get this error:

Error occurred when executing Wav2Lip:

'dict' object is not callable

  File "D:\AI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\ComfyUI_windows_portable_nightly_pytorch\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:\AI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\custom_nodes\ComfyUI_wav2lip\wav2lip.py", line 98, in process
    audio_data = process_audio(audio())
                               ^^^^^^^
ShmuelRonen commented 3 months ago

I can't reproduce the error you are getting:

07 07 24-test

TomySpagnoletti commented 2 months ago

Same error:

Screenshot 2024-07-08 at 14 31 21

To reproduce, please update VHS

TomySpagnoletti commented 2 months ago
Screenshot 2024-07-08 at 14 32 41

Updated VHS Audio Node cannot connect to your node....

TomySpagnoletti commented 2 months ago

Here is the fix:

Screenshot 2024-07-08 at 14 40 14

From: https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/commit/29fae7510ff113011b4e09a47a0676735ed4957f

ShmuelRonen commented 2 months ago

You can also replace the folder 'ComfyUI-VideoHelperSuite' in custom_noads with the contain of the .7zip file that in the repository.

zip

It's should solve the problem.

bollerdominik commented 2 months ago

Trying the fix from https://github.com/ShmuelRonen/ComfyUI_wav2lip/issues/36#issuecomment-2213971185 gives me

Error occurred when executing VHS_VideoCombine:

'function' object is not subscriptable

  File "D:\AI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\ComfyUI_windows_portable_nightly_pytorch\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:\AI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite\videohelpersuite\nodes.py", line 523, in combine_video
    channels = audio['waveform'].size(1)
               ~~~~~^^^^^^^^^^^^
Queue size: 0
Extra options
wenwenwennnnn commented 2 months ago

image Repeated error reporting

Kimthanh27 commented 1 month ago

File "E:\EMPTY\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_wav2lip\wav2lip.py", line 156, in todo audio_data = process_audio(audio()) ^^^^^^^ TypeError: 'dict' object is not callable

Prompt executed in 3.92 seconds can you pls help me^^

ShmuelRonen commented 1 month ago

Two days ago I make a new code for wav2lip include build in audio loader. please delete your wav2lip custom node and replace it with the new one.