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] - SD Prompt Saver node fails to save in jpg and webp formats #10

Closed Dachiko closed 1 year ago

Dachiko commented 1 year ago

Description

Selecting any other format aside from png results in error (png works just fine) (latest build):

Error occurred when executing SDPromptSaver:

[Errno 2] No such file or directory: '00001.webp'

File "C:\Stable Diffusion\GUIs\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Stable Diffusion\GUIs\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Stable Diffusion\GUIs\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Stable Diffusion\GUIs\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-reader-node\nodes.py", line 386, in save_images piexif.insert(metadata, str(file)) File "C:\Stable Diffusion\GUIs\ComfyUI_windows_portable\python_embeded\Lib\site-packages\piexif_insert.py", line 32, in insert with open(image, 'rb') as f: ^^^^^^^^^^^^^^^^^

Reproduction steps

  1. Image generated
  2. SD Prompt Saver node fails to save an image with jpg or webp format selected

Image file

No response

Version

1.0.0

receyuki commented 1 year ago

Fixed in v1.0.1, please update the node to the latest version.