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

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

Closed
dancemanUK opened this issue Jun 21, 2024 · 4 comments
Closed

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

dancemanUK opened this issue Jun 21, 2024 · 4 comments

Comments

@dancemanUK
Copy link

dancemanUK commented Jun 21, 2024

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
Copy link
Owner

@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
Copy link

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
Copy link

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
Copy link
Owner

@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.

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

4 participants