Git Product home page Git Product logo

Comments (12)

brknsoul avatar brknsoul commented on July 21, 2024 2

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)

from sd-webui-cutoff.

RealAzmodeo avatar RealAzmodeo commented on July 21, 2024

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

from sd-webui-cutoff.

nekomimist avatar nekomimist commented on July 21, 2024

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

from sd-webui-cutoff.

HarrisTerry avatar HarrisTerry commented on July 21, 2024

Will try today!

from sd-webui-cutoff.

brknsoul avatar brknsoul commented on July 21, 2024

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

from sd-webui-cutoff.

vladmandic avatar vladmandic commented on July 21, 2024

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.

from sd-webui-cutoff.

HarrisTerry avatar HarrisTerry commented on July 21, 2024

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.

from sd-webui-cutoff.

lbeltrame avatar lbeltrame commented on July 21, 2024

@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).

from sd-webui-cutoff.

vladmandic avatar vladmandic commented on July 21, 2024

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

from sd-webui-cutoff.

vladmandic avatar vladmandic commented on July 21, 2024

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.

from sd-webui-cutoff.

lbeltrame avatar lbeltrame commented on July 21, 2024

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.

from sd-webui-cutoff.

vladmandic avatar vladmandic commented on July 21, 2024

seems to be working

from sd-webui-cutoff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.