SamKhoze / ComfyUI-DeepFuze

DeepFuze is a state-of-the-art deep learning tool that seamlessly integrates with ComfyUI to revolutionize facial transformations, lipsyncing, Face Swapping, Lipsync Translation, video generation, and voice cloning.
https://cogidigm.com/
Other
209 stars 13 forks source link

AttributeError: 'dict' object has no attribute 'sample_rate' #12

Open dancemanUK opened 1 week ago

dancemanUK commented 1 week ago
wechat_20240621220321

[rgthree] Using rgthree's optimized recursive execution. None 24.0 video/h265-mp4 video h265-mp4 {'enhancer': 'None', 'frame_enhancer': 'None', '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': ['8', 0], 'audio': ['4', 0], 'format': 'video/h265-mp4', 'pix_fmt': 'yuv420p10le', 'crf': 22, 'save_metadata': ['save_metadata', 'BOOLEAN', {'default': True}]} F:\ComfyUI_windows_portable_torch23cu121\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 "F:\ComfyUI_windows_portable_torch23cu121\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "F:\ComfyUI_windows_portable_torch23cu121\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 "F:\ComfyUI_windows_portable_torch23cu121\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "F:\ComfyUI_windows_portable_torch23cu121\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'

SamKhoze commented 1 week ago

@dancemanUK try to load audio via load audio file not load audio path and see if it works. Screenshot 2024-06-21 at 8 42 12 AM

leiweiqiang commented 1 week ago

The issue is a conflict with Load Audio between AudioScheduler and _for_testing. My solution is to comment out line 1192 in ComfyUI/nodes.py: "nodes_audio.py". After restarting ComfyUI, Load Audio will appear in the AudioScheduler submenu.

Screenshot 2024-06-21 at 10 32 50 PM Screenshot 2024-06-21 at 10 09 59 PM
Maelstrom2014 commented 4 days ago

The issue is a conflict with Load Audio between AudioScheduler and _for_testing. My solution is to comment out line 1192 in ComfyUI/nodes.py: "nodes_audio.py". After restarting ComfyUI, Load Audio will appear in the AudioScheduler submenu.

Screenshot 2024-06-21 at 10 32 50 PM Screenshot 2024-06-21 at 10 09 59 PM

may be better to change AudioSchedler naming.

SamKhoze commented 1 day ago

@Maelstrom2014 @leiweiqiang @dancemanUK The code is updated, now you can load your audio with VHS Load Audio Node and you will not get this error.