autoset width and height (#1838)

* autoset width and height

When loading into img2img, added an option to autoset Width and Height from image (Settings -> img2img ->After loading into Img2img, automatically update Width and Height).
Also fixed scale_by display, now correctly rounded to multiple of 8
Also fixed img2img new width/height calculation, same way, (affects infotext)

* Update ui.py: hide progress animation on image size change
This commit is contained in:
DenOfEquity
2024-09-16 19:14:31 +01:00
committed by GitHub
parent 210af4f804
commit 791f04f71e
3 changed files with 20 additions and 2 deletions
+2
View File
@@ -229,6 +229,8 @@ options_templates.update(options_section(('img2img', "img2img", "sd"), {
"return_mask_composite": OptionInfo(False, "For inpainting, include masked composite in results for web"),
"img2img_batch_show_results_limit": OptionInfo(32, "Show the first N batch img2img results in UI", gr.Slider, {"minimum": -1, "maximum": 1000, "step": 1}).info('0: disable, -1: show all images. Too many images can cause lag'),
"overlay_inpaint": OptionInfo(True, "Overlay original for inpaint").info("when inpainting, overlay the original image over the areas that weren't inpainted."),
"img2img_autosize": OptionInfo(False, "After loading into Img2img, automatically update Width and Height"),
}))
options_templates.update(options_section(('optimizations', "Optimizations", "sd"), {