From 5d3465c4b2d5dacfdd6caa38b71b23b4f88401c0 Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Wed, 12 Apr 2023 05:39:43 -0700 Subject: [PATCH] add warning message for UniPC + HR Fix for #27 --- scripts/dynamic_thresholding.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dynamic_thresholding.py b/scripts/dynamic_thresholding.py index c9a9bd0..7eba434 100644 --- a/scripts/dynamic_thresholding.py +++ b/scripts/dynamic_thresholding.py @@ -76,6 +76,8 @@ class Script(scripts.Script): return if p.sampler_name in ["DDIM", "PLMS"]: raise RuntimeError(f"Cannot use sampler {p.sampler_name} with Dynamic Thresholding") + if p.sampler_name == 'UniPC' and p.enable_hr: + raise RuntimeError(f"UniPC does not support Hires Fix. Auto WebUI silently swaps to DDIM for this, which DynThresh does not support. Please swap to a sampler capable of img2img processing for HR Fix to work.") mimic_scale = getattr(p, 'dynthres_mimic_scale', mimic_scale) threshold_percentile = getattr(p, 'dynthres_threshold_percentile', threshold_percentile) mimic_mode = getattr(p, 'dynthres_mimic_mode', mimic_mode)