move some settings to the new Optimization page

add slider for token merging for img2img
rework StableDiffusionProcessing to have the token_merging_ratio field
fix a bug with applying png optimizations for live previews when they shouldn't be applied
This commit is contained in:
AUTOMATIC
2023-05-17 20:22:38 +03:00
parent f6c06e3ed2
commit 9fd6c1e343
4 changed files with 55 additions and 45 deletions

View File

@@ -98,7 +98,11 @@ def progressapi(req: ProgressRequest):
if opts.live_previews_image_format == "png":
# using optimize for large images takes an enormous amount of time
save_kwargs = {"optimize": max(*image.size) > 256}
if max(*image.size) <= 256:
save_kwargs = {"optimize": True}
else:
save_kwargs = {"optimize": False, "compress_level": 1}
else:
save_kwargs = {}