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

Support for negative prompt additions in addition to postive #15

Open
iarna opened this issue Jan 17, 2023 · 6 comments
Open

Support for negative prompt additions in addition to postive #15

iarna opened this issue Jan 17, 2023 · 6 comments

Comments

@iarna
Copy link

iarna commented Jan 17, 2023

I have some models that only behave properly with some additional negative prompts. I've patched my local copy to allow me to add both positive and negative prompts -- would you be interested in getting a PR for this change?

@mix1009
Copy link
Owner

mix1009 commented Jan 17, 2023

That's a very good idea.
Are the negative for each keyword? How did you encode the negative prompt?
I think it should be encoded in the keyword(s).

Example for https://civitai.com/models/2856/synthpunk-search :

Original keywords:
SWPUNK|SYNTHWAVEPAINT|SPLATTERS

Keywords with negative prompts (deforum style negative prompt)
SWPUNK --neg watermark|SYNTHWAVEPAINT --neg blurry|SPLATTERS

Do you have better idea for encoding the negative prompts?

Thank you.

@mix1009
Copy link
Owner

mix1009 commented Jan 20, 2023

@iarna Are you working on it?
If not, I could implement it.
Thank you.

@iarna
Copy link
Author

iarna commented Jan 22, 2023

Ok so yeah, I do have this largely implemented. This is how I approached it:

I added another field to the CSV (inserted just after the existing field) that contains the negative prompt. It's added to the user's negative prompt in the same way that the positive prompt is currently handled. (It does this in such a way that it can load current data files so it'll be fully backwards compatible for existing custom entries. It also maintains the existing format if no negative prompt was added so in that respect it's also forward compatible.)

Remaining to be done on this is adding the input box in the UI for the negative prompt.

@mix1009
Copy link
Owner

mix1009 commented Jan 23, 2023

  1. If there is multiple keywords, is the negative prompt for each keyword, or is it per model?
  2. The current csv format is variable in length. the third column(ckpt name) is optional. This will make adding new column harder.

So I'd prefer embedding the negative prompt in the keywords(second column) without adding a new column to the csv file.

@scruffynerf
Copy link

  1. If there is multiple keywords, is the negative prompt for each keyword, or is it per model?
  2. The current csv format is variable in length. the third column(ckpt name) is optional. This will make adding new column harder.

So I'd prefer embedding the negative prompt in the keywords(second column) without adding a new column to the csv file.

I'd prefer (for the sale of consistency) if the negatives were just folded in, with a marker at the front like "neg*"... This would allow the random/multiple stuff to work consistently as now. If you added all, it would add all negative prompts, if you add one or two, it would handle the prefix and put it into the negative prompt.

I agree, making a new column makes less sense.

@tdtrumble
Copy link

Bumping this, it would be a really helpful addition. @iarna, is this implemented in your fork? I did a quick glance at the code and it doesn't seem like its doing anything with a negative prompt, but did I just not look hard enough?

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

4 participants