adieyal / comfyui-dynamicprompts

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

Only one dynamic parameter is parsed #40

Open That-Dude opened 6 months ago

That-Dude commented 6 months ago

I have a simple graph (attached)

When I run it only the last dynamic section is being changed e.g this prompt:

portrait by artists/Photography/by_country/united_kingdom ,{blue|green|brown} eyes, __jumbo/aesthetics/general_aesthetics__

Results in these outputs outputs:

New prompt: portrait by Abbie Trayler-Smith ,blue eyes, American Pioneers New prompt: portrait by Abbie Trayler-Smith ,blue eyes, American Revolution New prompt: portrait by Abbie Trayler-Smith ,blue eyes, American Thanksgiving New prompt: portrait by Abbie Trayler-Smith ,blue eyes, American Tourist Traps New prompt: portrait by Abbie Trayler-Smith ,blue eyes, Americana New prompt: portrait by Abbie Trayler-Smith ,blue eyes, Analog Horror New prompt: portrait by Abbie Trayler-Smith ,blue eyes, Ancient Egypt

Do you have any idea what I'm doing wrong?

test.json

rjgoif commented 4 months ago

You are using a combinatorial prompt node. Think of each wildcard as a digit in a number. You are counting up from 000. So next it's 001, 002, 003, 004, ....

meaning the "tens" digit doesn't change until the "ones" digit has gone through all options. "jumbo/aesthetics/general_aesthetics" has nearly 650 items, so you need to run that many before finally you get green eyes.

650ish more for green to cycle, then 650ish more for brown.

only after almost 2000 iterations will you finally get to the second artist. Then the grind repeats.

Combinatorial math gets out of hand really fast. Each dimension you add is multiplicative. if you added {night | day} at the end, you would need to go through 1300 iterations to get eye color to change.

dangerweenie commented 1 week ago

You are using a combinatorial prompt node. Think of each wildcard as a digit in a number. You are counting up from 000. So next it's 001, 002, 003, 004, ....

meaning the "tens" digit doesn't change until the "ones" digit has gone through all options. "jumbo/aesthetics/general_aesthetics" has nearly 650 items, so you need to run that many before finally you get green eyes.

650ish more for green to cycle, then 650ish more for brown.

only after almost 2000 iterations will you finally get to the second artist. Then the grind repeats.

Combinatorial math gets out of hand really fast. Each dimension you add is multiplicative. if you added {night | day} at the end, you would need to go through 1300 iterations to get eye color to change.

that makes sense - however, even just doing a simple prompt like:

a {red|green|blue} ball only outputs a single color ball every single time.