From 4ba4b1c03b7a6e00b449b08638cc540257f8a728 Mon Sep 17 00:00:00 2001 From: Fred Ostrander Date: Wed, 18 Oct 2023 18:04:21 -0700 Subject: [PATCH] Accomodate Vlad's SD.Next modules refactor (#79) * Accomodate SD.Next modules refactor * remove secondary exception check (redundant) --------- Co-authored-by: Alex "mcmonkey" Goodwin --- dynthres_unipc.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dynthres_unipc.py b/dynthres_unipc.py index 2b9a994..8da9130 100644 --- a/dynthres_unipc.py +++ b/dynthres_unipc.py @@ -3,7 +3,15 @@ import torch import math import traceback from modules import shared -from modules.models.diffusion import uni_pc +try: + from modules.models.diffusion import uni_pc +except Exception as e: + from modules.unipc import sampler + class VladUniPC(object): + def __init__(self): + self.sampler = sampler + self.uni_pc = sampler + uni_pc = VladUniPC() ######################### UniPC Implementation logic #########################