shiimizu / ComfyUI_smZNodes

Custom nodes for ComfyUI such as CLIP Text Encode++
GNU General Public License v3.0
168 stars 12 forks source link

Error with get_steps when steps input of KSampler is converted to input #36

Open Dystasia opened 7 months ago

Dystasia commented 7 months ago

Hi,

When converting the steps of the nearest KSampler to the smZNodes to input comfy throws the following error:

[ERROR] An error occurred during the on_prompt_handler processing Traceback (most recent call last): File "C:\Users\username\ComfyUI_windows_portable\ComfyUI\server.py", line 633, in trigger_on_prompt json_data = handler(json_data) File "C:\Users\username\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 824, in prompt_handler tmp() File "C:\Users\username\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 819, in tmp steps = find_nearest_ksampler(clip_id) File "C:\Users\username\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 769, in find_nearest_ksampler return get_steps(data, ksampler_id) File "C:\Users\username\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 781, in get_steps return min(max(1, int(steps_input_value)), 10000) ValueError: invalid literal for int() with base 10: ''

Converting it back to a widget makes the error go away.

I have multiple KSamplers and other detailers that I want to use an input steps with, so it is a pain having to change them all manually just for this node.

shiimizu commented 7 months ago

It looks like you're on a previous commit. Update the node and try again.