ComfyUI-Whisper icon indicating copy to clipboard operation
ComfyUI-Whisper copied to clipboard

I am getting the following error

Open gonzalu opened this issue 1 year ago • 9 comments
trafficstars

Error:

Traceback (most recent call last):
  File "E:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\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 "E:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Whisper\apply_whisper.py", line 31, in apply_whisper
    result = model.transcribe(audio_save_path,word_timestamps=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\python_embeded\Lib\site-packages\whisper\transcribe.py", line 122, in transcribe
    mel = log_mel_spectrogram(audio, model.dims.n_mels, padding=N_SAMPLES)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\python_embeded\Lib\site-packages\whisper\audio.py", line 140, in log_mel_spectrogram
    audio = load_audio(audio)
            ^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\python_embeded\Lib\site-packages\whisper\audio.py", line 58, in load_audio
    out = run(cmd, capture_output=True, check=True).stdout
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "subprocess.py", line 548, in run
  File "subprocess.py", line 1026, in __init__
  File "subprocess.py", line 1538, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified```

gonzalu avatar Jun 25 '24 01:06 gonzalu

If it helps, I am ghetting the above error when using the node in a ComfyUI workflow from FictiVerse that takes a music file and converts it to a Video.

However, when running your workflow example, I get this:

image

!!! Exception during processing!!! a bytes-like object is required, not 'bool'
Traceback (most recent call last):
  File "E:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\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 "E:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Whisper\apply_whisper.py", line 27, in apply_whisper
    f.write(audio())
TypeError: a bytes-like object is required, not 'bool'

gonzalu avatar Jun 25 '24 02:06 gonzalu

not sure what's wrong, might be new updates to video helper suites breaking it, or the input video doesn't have an audio

Does the default whisper workflow works? (https://github.com/yuvraj108c/ComfyUI-Whisper/blob/master/example_workflows/whisper_video_subtitles_workflow.json)

yuvraj108c avatar Jun 26 '24 19:06 yuvraj108c

sorry for delay, let me try it :D

BTW, I cheated and simply found lyrics to songs on the web and plugged in the text manually LOL.

gonzalu avatar Jun 30 '24 00:06 gonzalu

No, same error sorry :(

Looks like it can't find the model/models? Where can I find them downloaded so I can take a look there... ?

Thanks for your help.

image

gonzalu avatar Jun 30 '24 02:06 gonzalu

ok i'll test it out soon & report back

yuvraj108c avatar Jul 01 '24 05:07 yuvraj108c

Fixed

yuvraj108c avatar Aug 06 '24 05:08 yuvraj108c

OK, I am not sure I updated properly?

I still get this error:

!!! Exception during processing!!! [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
  File "E:\ComfyUI\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\ComfyUI\execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\ComfyUI\execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Whisper\apply_whisper.py", line 34, in apply_whisper
    result = model.transcribe(audio_save_path, word_timestamps=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\python_embeded\Lib\site-packages\whisper\transcribe.py", line 122, in transcribe
    mel = log_mel_spectrogram(audio, model.dims.n_mels, padding=N_SAMPLES)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\python_embeded\Lib\site-packages\whisper\audio.py", line 140, in log_mel_spectrogram
    audio = load_audio(audio)
            ^^^^^^^^^^^^^^^^^
  File "E:\ComfyUI\python_embeded\Lib\site-packages\whisper\audio.py", line 58, in load_audio
    out = run(cmd, capture_output=True, check=True).stdout
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "subprocess.py", line 548, in run
  File "subprocess.py", line 1026, in __init__
  File "subprocess.py", line 1538, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

Prompt executed in 1.82 seconds

gonzalu avatar Aug 11 '24 18:08 gonzalu

How should I properly install Whisper models? I have a feeling they're not downloading correctly :(

gonzalu avatar Aug 13 '24 12:08 gonzalu

Ensure that the node is updated properly and the video has an audio The models are automatically installed by the node

yuvraj108c avatar Aug 19 '24 07:08 yuvraj108c