yownas / shift-attention

In stable diffusion, generate a sequence of images shifting attention in the prompt.
Other
166 stars 17 forks source link

Negative prompt from style.csv is applied multiple times #7

Closed R-N closed 1 year ago

R-N commented 1 year ago

I have NAI style in style.csv with the following prompts: positive: masterpiece, best quality negative: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet

I use shift attention on this prompt: 1girl, looking at viewer, (heart-shaped pupils: 1~2)

I use the default settings of shift attention, 10 steps.

First image: ![tmpop9md7wx](https://user-images.githubusercontent.com/1442761/201511367-764c6661-3047-4f9b-bc99-002e4c925112.png)
parameters 1girl, looking at viewer, (heart-shaped pupils: 1.0), masterpiece, best quality Negative prompt: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet Steps: 29, Sampler: Euler a, CFG scale: 15, Seed: 42, Size: 512x512, Model hash: 925997e9, Eta: 0.0022321428125, Clip skip: 2, ENSD: 31337
Last image: ![tmp0fox2i2q](https://user-images.githubusercontent.com/1442761/201511399-c3a0cab2-d220-4b99-9747-031db0100197.png)
parameters 1girl, looking at viewer, (heart-shaped pupils: 2.0), masterpiece, best quality Negative prompt: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet Steps: 29, Sampler: Euler a, CFG scale: 15, Seed: 42, Size: 512x512, Model hash: 925997e9, Eta: 0.0022321428125, Clip skip: 2, ENSD: 31337

But if I just put the style prompts in the field (not as a style, style is none):

Last image: ![tmppi03lkv1](https://user-images.githubusercontent.com/1442761/201511329-def7ea6c-7438-4ae0-b7a0-0b21f3c89001.png)
parameters 1girl, looking at viewer, (heart-shaped pupils: 2.0), masterpiece, best quality Negative prompt: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, bad feet Steps: 29, Sampler: Euler a, CFG scale: 15, Seed: 42, Size: 512x512, Model hash: 925997e9, Eta: 0.0022321428125, Clip skip: 2, ENSD: 31337
yownas commented 1 year ago

It took a while before I figured out what was wrong since my script doesn't use the negative prompt at all. But it was a simple issue. I use the same object over and over again when generating the images, and didn't know the styles get added each time you use it.

I simply fixed it by letting my script take care of the negative prompt, which will "reset" it before it starts generating. :) So the bug is fixed now and as a bonus you can use ranges in the negative prompt as well.