add warning message for UniPC + HR Fix

for #27
This commit is contained in:
Alex "mcmonkey" Goodwin
2023-04-12 05:39:43 -07:00
parent 8f18058bf6
commit 5d3465c4b2
+2
View File
@@ -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)