Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with deepfuse lipsync #4

Open
Maelstrom2014 opened this issue Jun 18, 2024 · 13 comments
Open

Problems with deepfuse lipsync #4

Maelstrom2014 opened this issue Jun 18, 2024 · 13 comments

Comments

@Maelstrom2014
Copy link

Hi!
I tried mp3 and wav, but all the same error:

Error occurred when executing DeepFuzeAdavance:

'str' object has no attribute 'sample_rate'

File "C:\ai\comfyui\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ai\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 "C:\ai\comfyui\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ai\comfyui\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1333, in lipsyncgenerate
write(audio_file,audio.sample_rate,audio.audio_data)
^^^^^^^^^^^^^^^^^
@Aenon1
Copy link

Aenon1 commented Jun 18, 2024

Same here. A search returns this page but I don't know your code, so I don't want to change anything and maybe make matters worse. :)
I got this from another page but the linked page goes deeper on the subject:

In python you cannot access dictionary items using the syntax dict.key , If entry is a dictionary, you can use
entry['key1']
entry.get('key')

https://bobbyhadz.com/blog/python-attributeerror-dict-object-has-no-attribute

@SamKhoze
Copy link
Owner

Hello @Maelstrom2014, can you tell me which node you are using to load audio, currently we are not supporting VHS_load audio, it is only supports (https://github.com/a1lazydog/ComfyUI-AudioScheduler.git) LoadAudio node for this git repo. if you still facing the same issue please let us know.

Thank you

@Maelstrom2014
Copy link
Author

Where?
loadaudio

@SamKhoze
Copy link
Owner

@Maelstrom2014 I'm not sure why the audio load isn't showing up on your AudioScheduler Nodes. Maybe you can try uninstalling and reinstalling it. Here's a screenshot to help you find the node.
Screenshot 2024-06-18 at 11 09 37 AM

@Aenon1
Copy link

Aenon1 commented Jun 18, 2024

I'm using your workflow. I'm getting this error:
Error occurred when executing DeepFuzeAdavance:

'dict' object has no attribute 'sample_rate'

File "D:\Ai\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:\Ai\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:\Ai\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:\Ai\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1333, in lipsyncgenerate
write(audio_file,audio.sample_rate,audio.audio_data)
^^^^^^^^^^^^^^^^^

image

It is throwing the error when the DeepFuze Lipsync node is running.

@shiccup
Copy link

shiccup commented Jun 19, 2024

after i stopped getting that error i started getting this error. IndexError: list index out of range

@rethink-studios
Copy link

Same error, and weirdly, I have audioScheduler loaded, and I can find it in search, but not in the list

image

image

FETCH DATA from: D:\COMFYUI_BETA\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json [DONE]
BilboX LUTs path set to: D:\COMFYUI_BETA\ComfyUI\custom_nodes\bilbox-comfyui\luts
got prompt
'🔥 - 8 Nodes not included in prompt but is activated'
codeformer 24.0 video/h265-mp4
video h265-mp4
{'enhancer': 'codeformer', 'frame_enhancer': 'real_esrgan_x2', 'face_mask_padding_left': 0, 'face_mask_padding_right': 0, 'face_mask_padding_bottom': 0, 'face_mask_padding_top': 0, 'trim_frame_start': 0, 'trim_frame_end': 0, 'device': 'cpu', 'frame_rate': 24.0, 'loop_count': 0, 'filename_prefix': 'deepfuze', 'pingpong': False, 'save_output': True, 'images': ['4', 0], 'audio': ['9', 0], 'format': 'video/h265-mp4', 'pix_fmt': 'yuv420p10le', 'crf': 22, 'save_metadata': ['save_metadata', 'BOOLEAN', {'default': True}]}
D:\COMFYUI_BETA\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite\videohelpersuite..\video_formats\h265-mp4.json
pix_fmt
crf
save_metadata
Output images were not of valid resolution and have had padding applied
!!! Exception during processing!!! 'dict' object has no attribute 'sample_rate'
Traceback (most recent call last):
File "D:\COMFYUI_BETA\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFYUI_BETA\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:\COMFYUI_BETA\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFYUI_BETA\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1333, in lipsyncgenerate
write(audio_file,audio.sample_rate,audio.audio_data)
^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'sample_rate'

Prompt executed in 6.68 seconds
got prompt
'🔥 - 9 Nodes not included in prompt but is activated'
codeformer 24.0 video/h265-mp4
video h265-mp4
{'enhancer': 'codeformer', 'frame_enhancer': 'real_esrgan_x2', 'face_mask_padding_left': 0, 'face_mask_padding_right': 0, 'face_mask_padding_bottom': 0, 'face_mask_padding_top': 0, 'trim_frame_start': 0, 'trim_frame_end': 0, 'device': 'cpu', 'frame_rate': 24.0, 'loop_count': 0, 'filename_prefix': 'deepfuze', 'pingpong': False, 'save_output': True, 'images': ['4', 0], 'audio': ['9', 0], 'format': 'video/h265-mp4', 'pix_fmt': 'yuv420p10le', 'crf': 22, 'save_metadata': ['save_metadata', 'BOOLEAN', {'default': True}]}
D:\COMFYUI_BETA\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite\videohelpersuite..\video_formats\h265-mp4.json
pix_fmt
crf
save_metadata
Output images were not of valid resolution and have had padding applied
!!! Exception during processing!!! 'dict' object has no attribute 'sample_rate'
Traceback (most recent call last):
File "D:\COMFYUI_BETA\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFYUI_BETA\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:\COMFYUI_BETA\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFYUI_BETA\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1333, in lipsyncgenerate
write(audio_file,audio.sample_rate,audio.audio_data)
^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'sample_rate'

Attached is
deepFUZE_error.txt
the installation log

@myprivacygithub
Copy link

image
Using Load Audio from AudioScheduler only, but there is no input to select audio in that node?

@SamKhoze
Copy link
Owner

Hello @myprivacygithub,

if you are still getting error message you can use VHS load audio and attach that node output to VHS load audio from AudioScheduler node.

@drmbt
Copy link

drmbt commented Jul 4, 2024

if you are still getting error message you can use VHS load audio and attach that node output to VHS load audio from AudioScheduler node.

With the AudioScheduler LoadAudio I've still been getting:

Return type mismatch between linked nodes: audio, AUDIO != VHS_AUDIO

with the Load VHS Audio workaround you mentioned i get:

'AudioData' object is not callable

File "C:\AI\StabilityMatrix\Data\Packages\ComfyUI_deepfuze\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\AI\StabilityMatrix\Data\Packages\ComfyUI_deepfuze\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "C:\AI\StabilityMatrix\Data\Packages\ComfyUI_deepfuze\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\AI\StabilityMatrix\Data\Packages\ComfyUI_deepfuze\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1339, in lipsyncgenerate
open(audio_file,"wb").write(audio())

@mmcc1
Copy link

mmcc1 commented Jul 20, 2024

Hello @Maelstrom2014, can you tell me which node you are using to load audio, currently we are not supporting VHS_load audio, it is only supports (https://github.com/a1lazydog/ComfyUI-AudioScheduler.git) LoadAudio node for this git repo. if you still facing the same issue please let us know.

Thank you

There is an issue with Audio Scheduler's Load Audio. A naming conflict.

See here:
a1lazydog/ComfyUI-AudioScheduler#22

@SamKhoze
Copy link
Owner

Deepfuze nodes are now compatible with VHS nodes. If you use example workflows might not work due to recent updates on VHS, and Comfyui, clear your workspace drop nodes manually and build a new workflow.

@mmcc1
Copy link

mmcc1 commented Jul 20, 2024

I have just tried it with the latest version of Deepfuze, both from Manager and from Git. Using VHS Load Audio, I get the following error when linking to the Deepfuze TTS node (DeepFuze_VoiceClonning_Lipsync.json):

Error occurred when executing TTS_generation:

[WinError 267] The directory name is invalid

File "C:\ComfyUI-master\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI-master\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI-master\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI-master\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1431, in generate_audio
result = subprocess.run(command,cwd="ComfyUI/custom_nodes/ComfyUI-DeepFuze",stdout=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Python312\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Python312\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants