hnmr293 / sd-webui-cutoff

Cutoff - Cutting Off Prompt Effect
Other
1.2k stars 85 forks source link

(Documentation Request) Descriptive Colours & General Questions #4

Closed Daniel-Poke closed 1 year ago

Daniel-Poke commented 1 year ago

I was testing this out in Automatic1111 SD and it looks to be pretty promising. I have a few questions though, and I hope you could add to the README after clarifying.

How does this handles multi word colours and also other non-colour adjectives? Say for example you have 1girl, white shirt, dark brown jacket, denim jeans, blonde hair. Would my target tokens be: white, dark brown, denim, blonde?

There are two things I am curious about, can it do the dark brown part or are multi-word colours not supported?

Secondly, say I'm using denim instead of say blue, or blonde/brunette instead of gold/brown, will this still work?

I also have general questions regarding some points someone mentioned on the CIVITAI promotion of this extension. Can you elaborate on the 75 token limit they might be referring to? Is that a limit on it functioning, or is it more of a performance limit and it still works despite this?

Also they mentioned the targets must have a trailing comma, e.g. white, blue, instead of white, blue, is this true? Seems like a fairly simply bug to fix and wouldn't surprise me if it has been resolved.

That's all I need to know for now, great work on this πŸ‘ I look forward to how it will improve in the future, maybe some QoL things like auto detection/autofill like another user suggested.

hnmr293 commented 1 year ago

oh, many questions!πŸ˜‡ Thanks for your feedback.

Would my target tokens be: white, dark brown, denim, blonde?

πŸ‘‰Yes. With these target tokens, the prompt will be replaced to: 1girl, _ shirt, _ _ jacket, _ jeans, _ hair and so on. This replacement is simply carried out by standard re library.

say I'm using denim instead of say blue, or blonde/brunette instead of gold/brown, will this still work?

πŸ‘‰I think it will work. Of cource, it depends on whether your checkpoint interprets those words correctly. If your checkpoint believes all women are blonde, any efforts to change her hair color will be waste of time.

Can you elaborate on the 75 token limit they might be referring to?

πŸ‘‰This is a difficult question to answer for me. As far as my environment, it is working without any errors - whether it is working "correctly" or not.

Prompt (87 tokens):
  a cute girl, white shirt with green tie, red shoes, blue hair, yellow eyes, pink skirt
, a cute girl, white shirt with green tie, red shoes, blue hair, yellow eyes, pink skirt
, a cute girl, white shirt with green tie, red shoes, blue hair, yellow eyes, pink skirt
, a cute girl, white shirt with green tie, red shoes, blue hair, yellow eyes, pink skirt
Negative prompt:
(low quality, worst quality:1.4), nsfw
Target tokens:
white, green, red, blue, yellow, pink

long prompt test

WebUI handles the prompt contains more than 75 tokens in a special way. I don't understand it properly. Actually I don't use long prompts, so I'm not even going to delve into this issue. However, I know there are people who like long prompts. Pull Requests are always welcome.

Also they mentioned the targets must have a trailing comma

πŸ‘‰I think no trailing comma is needed. Actually, Cutoff had a bug about this issue. With the trailing comma (or consecutive commas such as blue, red, , , gold), the prompt was converted to the broken form, such as:

Input:  (low quality, worst quality:1.4)
Output: (low quality, worst quality : 1 . 4 )
                                   ~~~~~~~~~

So prompt multipliers were broken.

I've fix this issue at 20e87ce264338b824296b7559679ed1bb0bdacd7 and added a note on README.md about corrupted images - Change weight or try SLerp.

Daniel-Poke commented 1 year ago

Awesome, that answered all my questions! Excellent write up too πŸ‘

I was struggling with this problem just yesterday with hair colour blending and clothes coming in incorrectly, but this has definitely helped the issue immensely.

Is your work on this (any unknown bugs aside) done or do you have a plan to extend the functionality? I'm loathe to call it a roadmap, but are there any things you had in mind or are actively working towards?

Happy for you to close the issue after your response, thanks again πŸ€œπŸ€›

hnmr293 commented 1 year ago

Grad I could help you. Currently no. This extension is just an idea. But suggestions for interesting usages and feature requests are welcome.