ljleb / sd-webui-neutral-prompt

Collision-free AND keywords for a1111 webui!
MIT License
187 stars 13 forks source link

Terrible quality after first batch #23

Closed bWm-nubby closed 1 year ago

bWm-nubby commented 1 year ago

When both batch size and batch count are set to values >1, the first batch is generated normally then only the first image of any successive batches in the job are correct. With batch size 2 with batch count 2 the first 3 images will all be normal quality and the 4th looks similar to generating with a typical negative prompt in the regular prompt field. For batch size 4 with batch count 3, images 1-5 and 9 will generate normally, while images 6-8 and 9-12 will look like negative prompts. This occurs even when not using any of the AND, AND_PERP or AND_SALT keywords.

Browser: Chrome Version 114.0.5735.134 OS: Windows 11 - 22H2 build 22621.1848 WebUI: Automatic1111 v1.3.2 commit baf6946 Python: 3.10.10 Torch: 2.0.1+cu118 Gradio: 3.32.0 xformers: not installed Commandline_Args: --listen --opt-sdp-no-mem-attention --api --disable-nan-check Sampling method: DPM++ 2M Karras (didn't test other samplers)

Steps to reproduce:

  1. Set batch size and batch count both to values of 2 or more.
  2. Generate a set of images using any prompt and negative prompt combination.

Examples:

Batch count 2, batch size 2 with Neutral-Prompt extension enabled in Extensions tab: grid-16894

Batch count 2, batch size 2 with Neutral-Prompt extension disabled in Extensions tab: grid-16902

Prompt: superb, 1girl, multicolored hair, pastel colored hair, pink hair, blue hair green hair, light green eyes, short hair, fluffy hair, curly hair, pixel-print hoodie, leggings, pixel-print sneakers, beautiful 8k wallpaper, extremely detailed, intricate Negative Prompt: negative_hand, (KHFB, AuroraNegative), (Worst Quality, Low Quality:1.2), border, nsfw, skimpy, grayscale, multiple_girls, (watermark:1.2)

bWm-nubby commented 1 year ago

This was tested using the latest commit of this extension: ab5c46d

bWm-nubby commented 1 year ago

Also, I just realized I generated the set that has Neutral-Prompt disabled with no upscaler selected for Hires fix which is likely the cause for the differences in images 1-3. Obviously the actual problem image is far more than just a difference in upscaler so I won't bother to redo that set.

bWm-nubby commented 1 year ago

I went ahead and redid the disabled grid to confirm my assumption about the blurriness/pixelated effect and make sure that wasn't due to the extension. grid-16905

ljleb commented 1 year ago

I went ahead and tried to reproduce the prompt inversion issue with adetailer and neutral prompt active, but I am unable to reproduce.

I updated adetailer to https://github.com/Bing-su/adetailer/commit/a1032d898018bd37816f26e2ac1a70c618c1b3e8 (which was the version you were using) and neutral prompt to https://github.com/ljleb/sd-webui-neutral-prompt/commit/ab5c46d44b0324991b4c1fb5008da3b55e9dd073 (latest at this moment).

Generation settings ``` blue Negative prompt: monochrome Steps: 30, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 3164397742, Size: 512x512, Model hash: de329f31ad, Model: silica_models_original_Silicon29-dark, CFG Rescale phi: 0, Version: v1.0.0-pre-1321-gbaf6946e ``` ![image](https://github.com/ljleb/sd-webui-neutral-prompt/assets/32277961/9babbae1-efec-4720-b4df-291d414a750e)
ljleb commented 1 year ago

Adding --opt-sdp-no-mem-attention to launch args does not change anything.

bWm-nubby commented 1 year ago

The problem is now fixed for me after updating WebUI to 394ffa7 and adetailer to a1032d89 as well as a few other extension updates. I'll go ahead and close this issue. Thanks for looking into it and sorry it turned out to be a bit of a wild goose chase.

ljleb commented 1 year ago

No problem, thanks for reporting initially. It's good to be aware of these issues in case there is something that can be done by the maintainers.