hako-mikan / sd-webui-regional-prompter

set prompt to divided region
GNU Affero General Public License v3.0
1.58k stars 133 forks source link

Regions get mixed up if token switching makes a regions prompt length cross the 75 token interval #339

Open methfairy opened 3 months ago

methfairy commented 3 months ago

Describe the bug

Here is a sample prompt that will trigger this bug:

street [:(nuclear explosion:3.0):0.5] ADDCOMM pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land, pink barbie land[:, pink barbie land:0.5] ADDCOL green scifi steampunk

Expected behaviour:

The whole image should get screwed up due to the high weight of the "nuclear explosion" tokens. The correct behavior can be observed by removing one count of "pink barbie land, " from the prompt.

What actually happens:

Only the first column will get screwed up, even though "nuclear explosion" is in the common prompt.

Basically what happens is that the first column starts out with less than 75 tokens but then, due to token switching ends up with more than 75 tokens. This causes the tokens in the common prompt to be assigned to the first column and the tokens in the second column to be assigned to the first column.

Environment Web-UI version: v1.9.4 SD Version: 1.5

Other Enabled Extensions