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] - When attempting to read the prompt of a .png file in Comfyui that does not have any prompt data an error is produced #58

Closed MokkaBoss1 closed 8 months ago

MokkaBoss1 commented 9 months ago

Description

the following error is produced when the above the condition is met.

Error occurred when executing SDPromptReader:

No data detected or unsupported format

File "F:\comfynew\ComfyUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\comfynew\ComfyUI\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\comfynew\ComfyUI\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\comfynew\ComfyUI\ComfyUI\custom_nodes\comfyui-prompt-reader-node\nodes.py", line 159, in load_image raise ValueError(MESSAGE["format_error"][1])

Reproduction steps

  1. insert SD prompt reader node
  2. include image
  3. queue prompt
  4. error

Image file

654987

receyuki commented 9 months ago

The image you uploaded doesn't contain any metadata. It may have been compressed.

MokkaBoss1 commented 9 months ago

sd prompt reader (1).json

Untitled

hope this works now - I just included the .json file and the image as an example

receyuki commented 9 months ago

I'm sorry to tell you that your photo still doesn't contain any metadata. It seems to have been edited with Affinity Photo, which may be the reason.

MokkaBoss1 commented 9 months ago

Hi, yes that is the point

The node works fine where there is meta data. It is just the error handling when there is no metadata. Ideally the workflow shouldn’t crash if there is no metada.

Kind regards

Mokkaboss1

On Sat, 17 Feb 2024 at 13:45, Rhys Yang @.***> wrote:

I'm sorry to tell you that your photo still doesn't contain any metadata. It seems to have been edited with Affinity Photo, which may be the reason.

— Reply to this email directly, view it on GitHub https://github.com/receyuki/comfyui-prompt-reader-node/issues/58#issuecomment-1950197884, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAPFHJFHEDYFT3YGCXFH6TTYUCYAZAVCNFSM6AAAAABDCHMB66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGE4TOOBYGQ . You are receiving this because you authored the thread.Message ID: @.***>

receyuki commented 8 months ago

You're right! I'm currently planning to add more user-friendly warnings.

MokkaBoss1 commented 8 months ago

Thank you. Just thought to let you know.

I'll close the issue

On Mon, 26 Feb 2024 at 16:31, Rhys Yang @.***> wrote:

You're right! I'm currently planning to add more user-friendly warnings.

— Reply to this email directly, view it on GitHub https://github.com/receyuki/comfyui-prompt-reader-node/issues/58#issuecomment-1964584233, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAPFHJBVYNKV5HR2CAEVUT3YVS2GFAVCNFSM6AAAAABDCHMB66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRUGU4DIMRTGM . You are receiving this because you authored the thread.Message ID: @.***>