Browse Source

Only enable hr fix if hr scale or upscale in infotext on paste

catboxanon 2 years ago
parent
commit
d89a915b74
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/ui.py

+ 2 - 2
modules/ui.py

@@ -591,8 +591,8 @@ def create_ui():
                 (seed_resize_from_h, "Seed resize from-2"),
                 (seed_resize_from_h, "Seed resize from-2"),
                 (toprow.ui_styles.dropdown, lambda d: d["Styles array"] if isinstance(d.get("Styles array"), list) else gr.update()),
                 (toprow.ui_styles.dropdown, lambda d: d["Styles array"] if isinstance(d.get("Styles array"), list) else gr.update()),
                 (denoising_strength, "Denoising strength"),
                 (denoising_strength, "Denoising strength"),
-                (enable_hr, lambda d: "Denoising strength" in d),
-                (hr_options, lambda d: gr.Row.update(visible="Denoising strength" in d)),
+                (enable_hr, lambda d: "Denoising strength" in d and any(x in ["Hires upscale", "Hires upscaler"] for x in d)),
+                (hr_options, lambda d: gr.Row.update(visible="Denoising strength" in d and any(x in ["Hires upscale", "Hires upscaler"] for x in d))),
                 (hr_scale, "Hires upscale"),
                 (hr_scale, "Hires upscale"),
                 (hr_upscaler, "Hires upscaler"),
                 (hr_upscaler, "Hires upscaler"),
                 (hr_second_pass_steps, "Hires steps"),
                 (hr_second_pass_steps, "Hires steps"),