vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.61k stars 411 forks source link

[Issue]: changing resolution manually gets ignored, resets output to startup resolution after hires step #3411

Closed Tillerz closed 1 month ago

Tillerz commented 1 month ago

Issue Description

Please fill this form with as much information as possible

ui-config.json

Version Platform Description

WLS-2, Win11, SDNext version d75047d0

Relevant log output

Says 1024x1536, but output shown in UI is square!

15:06:15-006148 WARNING  Token merging not supported with HyperTile for UNet
15:06:15-006922 INFO     Applying free-u: b1=1.2 b2=1.4 s1=0.9 s2=0.2
15:06:15-007592 INFO     Applying hypertile: unet=512
15:06:15-024271 INFO     Base: class=StableDiffusionXLPAGPipeline
Progress  3.11it/s █████████████████████████████████ 100% 10/10 00:03 00:00 Base
15:06:18-352537 INFO     Upscale: upscaler="ESRGAN 4x Remacri" resize=1024x1536 upscale=1024x1536
15:06:19-064783 INFO     HiRes: class=StableDiffusionXLImg2ImgPipeline sampler="Same as primary"
Progress  4.33it/s ██████████████████████████████████ 100% 3/3 00:00 00:00 Hires
15:06:20-862402 INFO     Processed: images=1 time=5.85 its=1.71 memory={'ram': {'used': 2.9, 'total': 39.18}, 'gpu': {'used': 8.78, 'total': 23.99}, 'retries':
                         0, 'oom': 0}
15:06:21-596417 INFO     Control: pipeline units=0 process=0 time=5.89 init=0.00 proc=0.00 ctrl=5.89 outputs=1

Backend

Diffusers

UI

ModernUI

Branch

Dev

Model

StableDiffusion XL

Acknowledgements

Tillerz commented 1 month ago

Update: Looks like when you disable "Force HiRes", this squishing/stretching inbetween doesn't happen. Does the HiRes step maybe pick up wrong resolution data, not the ones from the UI?

EDIT: SOMETIMES, I just clicked the height/width SWAP button and generated, and the result is distorted again despiter Force HiRes being off.

vladmandic commented 1 month ago

i still cannot reproduce. this is 90% related to whatever you saved as your ui defaults - its forcing some operation. any chance you can delete ui-config.json?

in either case, pls update as i've added some debug logging, reproduce and upload full log (with debug flag enabled). and write step-by-step description of the workflow so i can match it to uploaded log.

Tillerz commented 1 month ago

Ok, I deleted the UI settings and retried, the error does not occur then. I saved the settings and compared them to the ones I had before.

The relevant difference is (new, working one):

  "control/Force HiRes/value": true,
  "control/Rescale by/value": 1,

vs (old one):

  "control/Force HiRes/value": true,
  "control/Rescale by/value": 1,
  "control/Width resize/value": 1024,
  "control/Height resize/value": 1536,

Looks like it doesn't matter if you have "Resize by" or "Resize to" visibe/active in the UI. If you have values != 0 in "Resize to", it just ignores "Resize by" completely and uses the given height/width.

vladmandic commented 1 month ago

Looks like it doesn't matter if you have "Resize by" or "Resize to" visibe/active in the UI. If you have values != 0 in "Resize to", it just ignores "Resize by" completely and uses the given height/width.

that is correct - and that is the new behavior as of an update few hours ago. previous behavior was mixed logic that would "guess" what user wanted - and honestly, i got a bit lost trying to decipher it.