kijai/ComfyUI-MochiWrapper

TypeError: object of type 'float' has no len() when running a Mochi node / ComfyUI

Opened this issue · 3 comments

!! Exception during processing !!! object of type 'float' has no len()
Traceback (most recent call last):
File "/home/zurich/dev/ComfyUI/execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/home/zurich/dev/ComfyUI/execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/home/zurich/dev/ComfyUI/execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "/home/zurich/dev/ComfyUI/execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/home/zurich/dev/ComfyUI/custom_nodes/ComfyUI-MochiWrapper/nodes.py", line 579, in process
latents = model.run(args)
File "/home/zurich/dev/ComfyUI/custom_nodes/ComfyUI-MochiWrapper/mochi_preview/t2v_synth_mochi.py", line 196, in run
len(cfg_schedule) == sample_steps
TypeError: object of type 'float' has no len()

kijai commented

If the cfg_schedule is not an input in the node, remake the node so that it is or it errors out. It doesn't update automatically on older workflows.

HI Kijai,
I have the same problem. What do you mean by - Remake the Node? Im a non-developer.

!!! Exception during processing !!! object of type 'float' has no len()
Traceback (most recent call last):
File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MochiWrapper\nodes.py", line 579, in process
latents = model.run(args)
^^^^^^^^^^^^^^^
File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MochiWrapper\mochi_preview\t2v_synth_mochi.py", line 196, in run
len(cfg_schedule) == sample_steps
^^^^^^^^^^^^^^^^^
TypeError: object of type 'float' has no len()

Prompt executed in 34.52 seconds

kijai commented

HI Kijai, I have the same problem. What do you mean by - Remake the Node? Im a non-developer.

!!! Exception during processing !!! object of type 'float' has no len() Traceback (most recent call last): File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MochiWrapper\nodes.py", line 579, in process latents = model.run(args) ^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MochiWrapper\mochi_preview\t2v_synth_mochi.py", line 196, in run len(cfg_schedule) == sample_steps ^^^^^^^^^^^^^^^^^ TypeError: object of type 'float' has no len()

Prompt executed in 34.52 seconds

Literally remove the node and add it again. Or right click on it and use the "fix" option to recreate it.