Derfuu / Derfuu_ComfyUI_ModdedNodes

366 stars 40 forks source link

Feature request: Nested dynamic prompts #32

Open merc4derp opened 4 months ago

merc4derp commented 4 months ago

I'll give an example of the functionality I would like to see if possible. {black skirt|white {dress|gown}|jeans and {t-shirt|sweater}}

I often find myself wishing I could nest a few extra options in the prompts and working around the limitation is a real pain. Would love to see something like that implemented.

Keep up the good work.

Derfuu commented 4 months ago

As far as i know dynamic prompts nodes already have similar functionality, but with using variables like this.

${PARAM1={dress|gown}}
${PARAM2={t-shirt|sweater}}
{black skirt|white ${PARAM1}|jeans and ${PARAM2}}

I'll try do something like this (not promise), but also recommend to learn dynamic prompts' syntax about it.

merc4derp commented 3 months ago

That's a good suggestion, thanks. Didn't know those dynamic prompts could work like that. Tried it for a bit and it can get the job done, although adding constantly variables and keeping track of them can get a bit messy. Being able to nest on the fly would be a more elegant solution I believe, if you ever feel like looking into it.