receyuki / comfyui-prompt-reader-node

The ultimate solution for managing image metadata and multi-tool compatibility. ComfyUI node version of the SD Prompt Reader
MIT License
289 stars 22 forks source link

[BUG] - Error occurred when executing SDPromptReader #68

Open BFGesus opened 6 months ago

BFGesus commented 6 months ago

Description

Error occurs when selecting certain images generated using ComfyUI. SD Prompt Reader fails to execute. Attached is an example ComfyUI image that fails to load.

Reproduction steps

Error occurred when executing SDPromptReader:

invalid literal for int() with base 10: 'None'

File "K:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-reader-node\nodes.py", line 184, in load_image seed = int( ^^^^

Image file

ComfyUI_01312_

receyuki commented 6 months ago

Under normal circumstances, parsing this image should display

The workflow is overly complex, or unsupported custom nodes have been used.
Please see the README for more details.
https://github.com/receyuki/comfyui-prompt-reader-node#prompt-reader-node

However, the prompt reader mistakenly thought it had successfully parsed the image (but it actually hadn't). I will fix the issue of throwing an error, but overall, this image is still too complex for the prompt reader.

Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability to read image metadata correctly, it is recommended to embed the Prompt Saver Node within the workflow to ensure maximum compatibility.