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

[FEATURE REQUEST] - File Input Pipeline #26

Closed RangerFrank closed 11 months ago

RangerFrank commented 11 months ago

Summary

Re-adding this request, though I found it but it's just a text input.

Requesting a proper image pipeline into the prompt reader so that we can feed images generated in the workflow straight into it for metadata parsing.

Basic Example

generate image > parse metadata > use metadata

Reference Issues.

No response

RangerFrank commented 11 months ago

SDpromptsuggestion

Like this, but for images instead of a filename.

receyuki commented 11 months ago

There might be some details I need to explain. The images transferred in the workflow don't contain any metadata; they are just a bunch of pixels. Prompt Reader can only read metadata from images that have been saved as files.

If you could provide me with a complete application scenario, I might be able to think of alternative solutions to help you complete your pipeline.

BTW, if you convert the image widget to an input, you can input any image file by inputting the complete file path in STRING format.

RangerFrank commented 11 months ago

Wasn't aware that the metadata was being applied at save and not in a pre-save process. I was hoping to take the image reference with attached meta data and feed it straight back into the Prompt Reader, I assume given how it's set up that I would need to take the output filename from Prompt Saver and feed that back into Prompt Reader so it can read the files from disc, correct? The File Name output from Prompt saver doesn't provide path data so I'd have to manually append the path to the filename myself, correct?

receyuki commented 11 months ago

Theoretically, yes. But currently, since the reader cannot directly accept a string format path, you need to find a workaround.

However, you’ve also made me realise that having the prompt saver output the complete file path could be a very practical feature. Also, I will modify the batch loader node so that it can also accept a single image input, meaning that it will also work when the path points to a single image instead of a folder. I'll add these two features in version 1.2.

receyuki commented 11 months ago

Please try out the single file string support in the new version of the Batch Loader.

RangerFrank commented 11 months ago

Excellent, this will work as needed. One thing I noticed if using the Batch Loader into the Prompt reader the display image doesn't update, though this doesn't affect other functionality.