adieyal / sd-dynamic-prompts

A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variables do not regenerate for each prompt

spooji opened this issue · comments

"Immediate evaluation" of variables using the ! as in ${season=!{summer|autumn|winter|spring}} results in all generations in a Batch Count to use the same value (i.e. 10 images using 'summer').

Without the !, the variable is evaluated every time the variable is mentioned in a prompt so there will be three random seasons in one prompt when ${season} is called three times.

I cannot find documentation which explains how to get the same value in throughout each generation and then reevaluate on the next generation (i.e. each of the 10 batch count only uses a single season for all instances of ${season} in that generation so image 1 might be summer whereas image 2 might be autumn).

Is this a bug or by design?

commented

Same issue here

commented

I did a workaround in ComfyUI using some find and replace magic. Unfortunately I had to add another find and replace thingy to remove the line breaks. But at least the variables keep being regenerated for each run.

grafik

Same problem for me, using Forge.