adieyal / dynamicprompts

Templating language for generating prompts for text to image generators such as Stable Diffusion
MIT License
124 stars 20 forks source link

fix(range): `min` range not work when `max` is unset #132

Open bluelovers opened 4 months ago

bluelovers commented 4 months ago

https://github.com/adieyal/dynamicprompts/issues/130 https://github.com/adieyal/sd-dynamic-prompts/issues/794

akx commented 3 months ago

This still needs documentation. I have no idea how to use this, or what I'd use it for.

bluelovers commented 3 months ago

This still needs documentation. I have no idea how to use this, or what I'd use it for.

      wings-angel:
        prompts:
          - >-
            angel,
            {1-$$__lazy-wildcards/subject/costume/wings-angel/costume__},
            ({2-$$__lazy-wildcards/subject/costume/wings-angel/costume-wings__}
            {,{3-$$__lazy-wildcards/subject/costume/wings-elem/prompts__}|}:1.3)
            {4-$$__lazy-wildcards/subject/costume/wings-angel/env__}

without this fix, max is always 1 when it is unset, then min will become 1 too

bluelovers commented 3 months ago

w

a
b
c

before fix

{1-$$__w__} == {1$$a|b|c}
{2-$$__w__} == {1$$a|b|c}
{3-$$__w__} == {1$$a|b|c}

after fix

{1-$$__w__} == {1-3$$a|b|c}
{2-$$__w__} == {2-3$$a|b|c}
{3-$$__w__} == {3-3$$a|b|c}
bluelovers commented 2 months ago

@akx @adieyal