adieyal / comfyui-dynamicprompts

ComfyUI custom nodes for Dynamic Prompts
MIT License
187 stars 20 forks source link

Output the parsed prompt? #18

Open Brandelan opened 10 months ago

Brandelan commented 10 months ago

I'm wanting to take the final parsed prompt that's been generated (basically what the console prints out after "Prompt:" with all the wildcards/variants subbed for concrete words) and pass that to the file name.

I'm doing this by trying to grab the string the way the comfyui manual describes. Here are some examples of this syntax where the first term is the name of the node, and the second is the named input.: %XL Mix Sampler.base_positive%, or %Seed.seed%.

Is there any way to grab the parsed string from your node?

halr9000 commented 9 months ago

Check out other custom nodes eg:

  1. Output the generated text to another node such as Show Text from ComfyUI-Custom-Scripts, and then pass that along as input to the prefix field in the built-in save image node.
  2. Check out Mikey's save-image-with-prompt-data node, that might be your quickest path

There's a bunch of other ways.