Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLEASE add Cutoff to Vladmantic #19

Open
HarrisTerry opened this issue May 11, 2023 · 12 comments
Open

PLEASE add Cutoff to Vladmantic #19

HarrisTerry opened this issue May 11, 2023 · 12 comments

Comments

@HarrisTerry
Copy link

This version of Auto1111 has the perfect features, save one, this extension. Any possibility of making it work? I was testing it and it does not function with it, although it does not make error messages or anything, it just doesn't function.

10k thanks!

@RealAzmodeo
Copy link

I just tried it and looks like it just doesn't work. It's like it is ignored.

@nekomimist
Copy link

Try changing "Settings > Stable Diffusion > Prompt attention parser" to A1111 parser.
In my vladmantic automatic environment, cutoff seems to work with this setting.

@HarrisTerry
Copy link
Author

Will try today!

@brknsoul
Copy link

IMO changing the parser isn't really a solution. cutoff should really work regardless of the parser.

@vladmandic
Copy link

IMO changing the parser isn't really a solution. cutoff should really work regardless of the parser.

i agree. and full parser may work slightly differently internally, but the end result is fully compatible parsed prompt.
what seems to happen is that this extension relies on erroneus , symbols left around by original parser - separator for cutoff should be explicit, not rely on leftovers since ',' on its own has no meaning and is stripped when appearing between terms.

@HarrisTerry
Copy link
Author

If there is a separator for cutoff other than a comma, I would love to know! This extension makes different colors on things so much easier. Any way to delineate a separator like the comma, it could be anything.

@lbeltrame
Copy link

lbeltrame commented Jun 16, 2023

@vladmandic Are you referring to this part of the code?

while p < len(tokens):

I ask because there hasn't been any activity in this repo for a while, so I might want to take a stab at fixing this, however I have zero knowledge of how SD works (I'm good with Python, though).

@vladmandic
Copy link

that would be cool!

and yes, I am.

But there is a bigger conceptual problem - this extension relies that prompt parser will leave some bad artifacts such as , after its done so it can pick them up as separators. extension should not rely on any separator that can be changed/removed or in any way parsed by prompt parser, it should be an explicit separator used by this extension.

if you want to see how prompt goes in and what comes out from prompt parser, set env variable SD_PROMPT_DEBUG=1

@brknsoul
Copy link

brknsoul commented Jun 17, 2023

I imagine using an extension specific character would be better;
a woman, with #blue hair, wearing a #red shirt and a #green skirt
Or something like that. This way, we wouldn't have to place the adjectives in the target tokens box, as the specific character would take the next word as the target token.

At the moment the following characters are already in used by SD or popular extenstions;
[ ] { } ( ) | , : (square brackets, braces, parenthesis, vertical line, comma, and colon)

@vladmandic
Copy link

exactly. just need to select something simple and unique enough and not already taken by prompt parser - that's why there is debug output so you can see what comes out of the parser, not just what goes in.

@lbeltrame
Copy link

I think this fork (https://github.com/pmcculler/sd-webui-cutoff-in-prompt) uses a different separator (&), however I couldn't tell if it worked with SD.Next's parser or not.

@vladmandic
Copy link

seems to be working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants