yolain / ComfyUI-Easy-Use

In order to make it easier to use the ComfyUI, I have made some optimizations and integrations to some commonly used nodes.
GNU General Public License v3.0
924 stars 61 forks source link

ValueError: invalid literal for int() with base 10: '1574.0.0.3.0.0.1694' #383

Open MaraScott opened 2 weeks ago

MaraScott commented 2 weeks ago
2024-09-12 17:07:34,332 - root - INFO - Prompt executed in 2.37 seconds
2024-09-12 17:07:50,111 - root - INFO - got prompt
2024-09-12 17:07:52,649 - root - ERROR - !!! Exception during processing !!! invalid literal for int() with base 10: '1574.0.0.3.0.0.1694'
2024-09-12 17:07:52,651 - root - ERROR - Traceback (most recent call last):
  File "C:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 317, 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:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, 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:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "C:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-KJNodes\nodes\nodes.py", line 762, in get_widget_value
    if node["type"] == "WidgetToString" and node["id"] == int(unique_id) and not link_id:
                                                          ^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '1574.0.0.3.0.0.1694'

2024-09-12 17:07:52,660 - root - INFO - Prompt executed in 2.53 seconds
2024-09-12 17:10:38,074 - root - INFO - got prompt
2024-09-12 17:10:40,664 - root - ERROR - !!! Exception during processing !!! invalid literal for int() with base 10: '1574.0.0.3.0.0.1694'
2024-09-12 17:10:40,665 - root - ERROR - Traceback (most recent call last):
  File "C:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 317, 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:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, 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:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "C:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Shadow\Program_Files\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-KJNodes\nodes\nodes.py", line 762, in get_widget_value
    if node["type"] == "WidgetToString" and node["id"] == int(unique_id) and not link_id:
                                                          ^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '1574.0.0.3.0.0.1694'

workflow can be found here SD3_SchedulerSamplerCompare_Loop.json

MaraScott commented 2 weeks ago

I had the same error when I was doing a loop within a loop

yolain commented 2 weeks ago

Related to WidgetToString with kjnode, Node ids in a forloop have a different format than node ids in a non-loop.

MaraScott commented 2 weeks ago

Hi, Thanks. Do you have any suggestion to replace WidgetToString in a loop ?

MaraScott commented 2 weeks ago

Using https://github.com/alexopus/ComfyUI-Image-Saver with Scheduler Selector which has a scheduler_name string and it works fine.

thanks

MaraScott commented 2 weeks ago

Do you have an example of subloop ?

yolain commented 2 weeks ago

Do you have an example of subloop ?

I didn't try the sub-loop.