Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - The Prompt Reader doesn't populate when image is loaded, and can display the wrong information to the user. #50

Open
Jellybit opened this issue Feb 1, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Jellybit
Copy link

Jellybit commented Feb 1, 2024

Description

I feel like the only person running into this, since no one has mentioned it here so far, but whenever I drag an image or manually choose an image for the prompt reader node, the boxes stay blank. It can populate with the wrong information if changing images, causing problems if the user isn't aware that the prompt info doesn't match the current image. I added steps into the Reproduction Steps that you can follow.

Here's what it ends up looking like. It displays information from the wrong image.

image

Sorry if I'm doing something stupid. I'm on ComfyUI: 1930d1533d.

Reproduction steps

  1. Add an SD Prompt Reader node
  2. Add an SD Prompt Saver node (not necessary, but done because the usage instructions says to do that, even if you're not using it)
  3. Connect the Prompt Reader node to the Prompt Saver image input (not required for the bug, but just to be safe).
  4. Drag an image into the standalone SD Prompt Reader program, to confirm that it has metadata that can be read.
  5. In the SD Prompt Reader node, either drag the image from step 4 onto the node, or click on the "choose file to upload" button, and choose the file in step 4.
  6. Notice that nothing is being populated. It's completely blank.
  7. Add the generation to the queue.
  8. Notice that it's populated.
  9. Add several generations to the queue.
  10. Change the image in the SD Prompt Reader node.
  11. Notice that it doesn't change due to actions taking place, but only when adding it to a queue.

Image file

No response

@Jellybit Jellybit added the bug Something isn't working label Feb 1, 2024
@leo0eloi
Copy link

leo0eloi commented Feb 5, 2024

Hi Friend! I has same issue.

@receyuki
Copy link
Owner

receyuki commented Feb 8, 2024

First, let me explain why the metadata shown in the Prompt Reader node may not match the current image.
When you select an image, the change in the image preview is real-time, but reading metadata can only be triggered by image generation. Therefore, the complete process is as follows:

Select the image → Update the image preview → Press the Queue button → The prompt reader reads the metadata from the image → Outputs the metadata → Updates the text box.

Anytime you see metadata, it is data from the image used by the previous generation.
This is a feature of comfyui (python script can only be triggered by image generation), and I currently have no solution to this.

@Jellybit
Copy link
Author

Jellybit commented Feb 11, 2024

Anytime you see metadata, it is data from the image used by the previous generation. This is a feature of comfyui (python script can only be triggered by image generation), and I currently have no solution to this.

I see. Some nodes have a right click "View Info..." action that lets you view model data when you set a Lora or Checkpoint. Is it maybe possible to right click to populate your node in the same way? Similarly, the latent node has a right click action that swaps the height/width. RGThree has general right click actions on empty space that can convert several nodes in the graph, or can bring you to a place to rate the add-on on Github. Or is there a way to get it to hook into the "Refresh" action, which repopulates all the checkpoints/loras?

Sorry, I'm sure you've thought this through. I just wanted to bring up any possibilities that may have been missed. Generating an image/video/whatever seems a bit wasteful if it can be avoided.

@receyuki
Copy link
Owner

Some nodes have a right click "View Info..." action that lets you view model data when you set a Lora or Checkpoint. Is it maybe possible to right click to populate your node in the same way? Similarly, the latent node has a right click action that swaps the height/width. RGThree has general right click actions on empty space that can convert several nodes in the graph, or can bring you to a place to rate the add-on on Github. Or is there a way to get it to hook into the "Refresh" action, which repopulates all the checkpoints/loras?

This is very useful to me! As far as I know, this can only trigger JS code, not Python code. Anyway, I will go check their source code.

@receyuki
Copy link
Owner

Bad news: my guess was correct, no one can trigger Python code using the right-click menu. That's to say, I can't use right-click to update the text box.

@dicksondickson
Copy link

Install https://github.com/rgthree/rgthree-comfy
Then you can execute selected nodes.

@Jellybit
Copy link
Author

Install https://github.com/rgthree/rgthree-comfy Then you can execute selected nodes.

Ohhh, I have that. I didn't know it had that feature. SO many features on that one. In case anyone else finds this, it seems to be the "Queue Selected Output Nodes (rgthree)" feature. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants