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] - Generic string placeholder input for prompt saver #53

Closed vidyava closed 9 months ago

vidyava commented 9 months ago

Summary

Hello, I'm loving this node set, and one thing I'd like to have is the ability to pass in a string to the prompt saver node that would get filled in as a placeholder. This way I could craft custom strings that I wanted to be part of a filename. Currently I've just modified scheduler_str back into existence and use %scheduler to do this, but it would be nice to not redo this any time I update.

I don't know whether the node should handle filename sanitation or leave that up to the user, though.

Basic Example

Example: I want to make a series of images with a specific theme that gets passed into the prompt, e.g. "cyberpunk". I would pass this string into the prompt saver node as an input, say "custom", then set an output filename of %date_%custom_%counter to get 2024-02-02_cyberpunk_00001.png

Reference Issues.

No response

receyuki commented 9 months ago

Interesting idea. But in fact, you can absolutely achieve the effect you mentioned by combining multiple nodes.

截屏2024-02-08 下午9 11 22

Primitive node → Text Concatenate (WAS Node Suite) → filename This is why we love ComfyUI, isn't it?

vidyava commented 9 months ago

For some reason I didn't think you'd be able to pass in placeholders as text and have them still replaced, no idea why. Thanks for the solution!