ashen-sensored / sd_webui_SAG

MIT License
234 stars 29 forks source link

Images in txt2img with SAG are generated differently after generating an image in img2img. #16

Open Convexity-ai opened 1 year ago

Convexity-ai commented 1 year ago

When using SAG, images generated in txt2img after generating an image in img2img will be generated differently.

I've been able to replicate this behaviour following these steps:

  1. Go to txt2img, enter a prompt with SAG enabled and click 'Generate'
  2. Send generated image to img2img and generate click 'Generate'
  3. Go back to txt2img and without changing anything, click 'Generate'

The generated image from txt2img in step 3 will be different from step 1 until either the UI is reloaded, or the app is restarted.

Example generation in txt2img after booting up A1111 UI

Model: revAnimated_v122
Prompt: cat
Negative prompt:
Sampler: DPM++ 2M SDE Karras
Steps 40
Width: 640
Height: 480
CFG scale: 7
Seed 8888
SAG scale: 0.25
SAG Threshold: 1

output: 00002-8888

Example generation in txt2img after generating an image img2img (Identical to previous example)

Model: revAnimated_v122
Prompt: cat
Negative prompt:
Sampler: DPM++ 2M SDE Karras
Steps 40
Width: 640
Height: 480
CFG scale: 7
Seed 8888
SAG scale: 0.25
SAG Threshold: 1

output: 00003-8888

Testing above was done with no other image altering extensions enabled as to make the testing as simple as possible. This behaviour is seen across other samplers too.

Has anyone else experienced this and does anyone have any ideas?

Convexity-ai commented 1 year ago

I'm unsure who will see this first, so I'll mention @Sakura-Luna too as they've been active in trying to get SAG into A1111. Hope you don't mind.

The behaviour above is the same if I apply your own changes to the SAG python files from AUTOMATIC1111/stable-diffusion-webui/pull/10515

Do you have any ideas?