tkoenig89 / ComfyUI_Load_Image_With_Metadata

MIT License
19 stars 1 forks source link

invalid literal for int() with base 10: #3

Closed robbigoal closed 1 year ago

robbigoal commented 1 year ago

what wrong ? (used workflow sample). thk Error occurred when executing LoadImageWithMetadata:

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

File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\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 "C:\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 "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Load_Image_With_Metadata\nodes.py", line 41, in load_image seed = int(reader.parameter["seed"])

tkoenig89 commented 1 year ago

code seems to be unable to extract the seed (and maybe other data) from the image.

As this node uses a lot of code from this application, it might have either an unsupported format or a complex comfy workflow it is not able to extract data from. I might need to improve on error handling and provide better to understand messages i guess.

For now i think it is better to fail when reading the data than to continue with wrong or made up data

tkoenig89 commented 1 year ago

@robbigoal maybe you can share some information of the image (or the actual image). Where has it been generated, etc.?

karl-von-knecht commented 1 year ago

I can share an image that loads fine in the SD prompt reader but crashes in the LoadImageWithMetadata node. 44

tkoenig89 commented 1 year ago

@karl-von-knecht thanks for the image. This will be a big help nailing down the issue. I'm tight with time this week, but i will try to look at this as soon as possible

tkoenig89 commented 1 year ago

I guess this should be solved. The big issue was, that my node failed as soon as any parameter could not be resolved. in this case the cfg value was saved in a bad format (possible by the save with metadata node). I pushed a commit a few seconds ago which should address this. My node should now work even when some parameters from the metadata fail resolving. This way you can still use the node even if some parameters you might not care about are broken.

tkoenig89 commented 1 year ago

closing. Reopen if this still exists