You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I've just been trying some stuff with Python 3.11 installed, and a workflow where I use the integer output in the Random Number node breaks with this error:
2024-12-07T22:50:47.090732 - !!! Exception during processing !!! 'float' object cannot be interpreted as an integer
2024-12-07T22:50:47.094414 - Traceback (most recent call last):
File "C:\SDAI\ComfyUI\ComfyUI\execution.py", line 324, 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:\SDAI\ComfyUI\ComfyUI\execution.py", line 199, 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:\SDAI\ComfyUI\ComfyUI\execution.py", line 170, in _map_node_over_list
process_inputs(input_dict, i)
File "C:\SDAI\ComfyUI\ComfyUI\execution.py", line 159, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\SDAI\ComfyUI\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 12342, in return_randm_number
number = random.randint(minimum, maximum)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "random.py", line 336, in randint
File "random.py", line 301, in randrange
TypeError: 'float' object cannot be interpreted as an integer
I think this is similar to this issue: wolph/numpy-stl#188
eg. randint no longer allows you to pass floats?
Confirmed (I think...) by changing this line 12342:
number = random.randint(minimum, maximum)
To this:
number = random.randint(int(minimum), int(maximum))
And the error goes away.
The text was updated successfully, but these errors were encountered:
I believe there was a PR that changed some of the functionality to make it more random with seed, and may not have been tested well. I apologize for that, been rather busy. But yes because of float input definitely would need to be converted to int first.
Hi
I've just been trying some stuff with Python 3.11 installed, and a workflow where I use the integer output in the Random Number node breaks with this error:
I think this is similar to this issue: wolph/numpy-stl#188
eg. randint no longer allows you to pass floats?
Confirmed (I think...) by changing this line 12342:
number = random.randint(minimum, maximum)
To this:
number = random.randint(int(minimum), int(maximum))
And the error goes away.
The text was updated successfully, but these errors were encountered: