From 8f18058bf6d061f64047c1babab57e2293d3d1e3 Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Mon, 27 Mar 2023 12:50:18 -0700 Subject: [PATCH] add an error check when loading UniPC support to hopefully block the issue spam apparently everybody updates their extensions but nobody updates the WebUI. Relates to #22 #23 #24 #25 #26 --- scripts/dynamic_thresholding.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dynamic_thresholding.py b/scripts/dynamic_thresholding.py index 8fdd120..c9a9bd0 100644 --- a/scripts/dynamic_thresholding.py +++ b/scripts/dynamic_thresholding.py @@ -12,8 +12,12 @@ import gradio as gr import torch, traceback -import dynthres_unipc, dynthres_core +import dynthres_core from modules import scripts, script_callbacks, sd_samplers, sd_samplers_compvis, sd_samplers_kdiffusion, sd_samplers_common +try: + import dynthres_unipc +except Exception as e: + print(f"\n\n======\nError! UniPC sampler support failed to load! Is your WebUI up to date?\n(Error: {e})\n======") ######################### Data values ######################### VALID_MODES = ["Constant", "Linear Down", "Cosine Down", "Half Cosine Down", "Linear Up", "Cosine Up", "Half Cosine Up", "Power Up", "Power Down"]