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] - Exception after updating ComfyUI #37

Closed mwo72 closed 10 months ago

mwo72 commented 10 months ago

Description

There is an exception message "'NoneType' object has no attribute 'endswith'" after updating ComfyUI

Reproduction steps

  1. Go into the ComfyUI Manager Menu
  2. Click 'Update All'
  3. Wait and restart
  4. Create a simple workflow with 'SD Batch Loader' and 'SD Prompt Reader'
  5. Press 'Queue Prompt'

Image file

Exception

receyuki commented 10 months ago

Can you post the original image (ComfyUI_144103.jpg) here?

receyuki commented 10 months ago

That's strange, everything is working fine on my end. Have you tried reloading the browser tab? What is the error message displayed on your server terminal?

mwo72 commented 10 months ago

I have made several tests, including rebooting. At first I thought it was an incompatibility with another package, so I have completely reinstall from scratch ComfyUI. It turned out the problem occurs after the update.

Console

receyuki commented 10 months ago

I've finally found the bug, and I should be able to fix it within a few hours.

receyuki commented 10 months ago

Done!

mwo72 commented 10 months ago

Thank you for the fix, but something else might have been broken in the process. The preview image in the 'SD prompt reader' is no longer updated.

PreviewNotUpdated

receyuki commented 10 months ago

This is not a bug. The preview image won't work when you use the batch loader. Currently, I haven't found a good solution, so I suggest using a preview image node as an alternative.

mwo72 commented 10 months ago

Another issue, the 'single file' mode seems to be broken

SingleFileMode

receyuki commented 10 months ago

I've made some attempts, but the only scenario this error message is triggered is when the image does not exist. So, could you do more testing and let me know the results?

mwo72 commented 10 months ago

Thank you for your time and sorry for all the troubles.

I am using your package with a more complex workflow than the examples that I have posted here.

After seeing your last message, I was unable to reproduce the problem with the previous example ???, but it seems to occur when the 'path' is provided by another node (WAS Suite: Text Multiline)

SingleFileMode2

After some digging, I was able to bypass this problem with the following hack (I am not a expert of Python/ComfyUI)

fix

receyuki commented 10 months ago

The primitive node can work, but anyway, I will fix this.

截屏2024-01-05 下午10 05 19
receyuki commented 10 months ago

Please try the latest version.

mwo72 commented 10 months ago

Hello, thank you for your work.

The good news, the SD batch loader is working.

The not so good news, loading a old workflow seems to be broken, but if we edit it (delete, recreate node and link), then it works again. I have no idea how ComfyUI is supposed to work with updated nodes having new inputs/outputs.

image

Old workflow: workflow.json

receyuki commented 10 months ago

Same here. TinyterraNodes provides a function to reload nodes, but sometimes this feature doesn't work, and I still have to delete and recreate nodes. So, I also wish there was a better way.

https://github.com/TinyTerra/ComfyUI_tinyterraNodes

receyuki commented 10 months ago

BTW, 768x768 is the optimal resolution for SDv2 so you can set the model version to SDv2 and choose 1:1.