AIFSH / CosyVoice-ComfyUI

a comfyui custom node for CosyVoice
Apache License 2.0
174 stars 22 forks source link

RuntimeError: stack expects each tensor to be equal size, but got [1, 88865] at entry 0 and [1, 149466] at entry 1 #45

Open royaiagent opened 2 months ago

royaiagent commented 2 months ago

!!! Exception during processing!!! stack expects each tensor to be equal size, but got [1, 88865] at entry 0 and [1, 149466] at entry 1 Traceback (most recent call last): File "/root/ComfyUI/execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/root/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 "/root/ComfyUI/execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/root/ComfyUI/custom_nodes/CosyVoice-ComfyUI/nodes.py", line 179, in generate audio = {"waveform": torch.stack(output_list),"sample_rate":target_sr} RuntimeError: stack expects each tensor to be equal size, but got [1, 88865] at entry 0 and [1, 149466] at entry 1

image
leegang commented 2 months ago

torch.stack ==> torch.cat

royaiagent commented 2 months ago

torch.stack ==> torch.cat

I changed both lines 179 and 327 in the nodes.py file, but it still reports the same error. And for example, a tts input can be generated without any problem, if I copy this content for multiple lines, it will report the error, it's very strange!

leegang commented 2 months ago

torch.stack ==> torch.cat

I changed both lines 179 and 327 in the nodes.py file, but it still reports the same error. And for example, a tts input can be generated without any problem, if I copy this content for multiple lines, it will report the error, it's very strange!

48 look this pr

royaiagent commented 2 months ago

torch.stack ==> torch.cat

I changed both lines 179 and 327 in the nodes.py file, but it still reports the same error. And for example, a tts input can be generated without any problem, if I copy this content for multiple lines, it will report the error, it's very strange!

48 look this pr

thank U, now is ok.