fix: minimum version 1.4.0 to 1.1.0

This commit is contained in:
Dowon
2023-10-24 20:13:32 +09:00
parent cebd492613
commit 10fd2906a3
2 changed files with 13 additions and 10 deletions

View File

@@ -4,9 +4,19 @@ import importlib
import re
from functools import lru_cache
from pathlib import Path
from textwrap import dedent
from modules import extensions, sd_models, shared
from modules.paths import extensions_builtin_dir, extensions_dir, models_path
try:
from modules.paths import extensions_builtin_dir, extensions_dir, models_path
except ImportError as e:
msg = """
[-] ADetailer: `stable-diffusion-webui < 1.1.0` is no longer supported.
Please upgrade to stable-diffusion-webui >= 1.1.0.
or you can use ADetailer v23.10.1 (https://github.com/Bing-su/adetailer/archive/refs/tags/v23.10.1.zip)
"""
raise RuntimeError(dedent(msg)) from e
ext_path = Path(extensions_dir)
ext_builtin_path = Path(extensions_builtin_dir)

View File

@@ -126,14 +126,6 @@ class AfterDetailerScript(scripts.Script):
self.controlnet_ext = None
if not hasattr(self, "before_process"):
msg = """
[-] ADetailer: `stable-diffusion-webui < 1.4.0` is no longer supported.
Please upgrade to stable-diffusion-webui >= 1.4.0.
or you can use ADetailer v23.10.1.
"""
raise RuntimeError(dedent(msg))
def __repr__(self):
return f"{self.__class__.__name__}(version={__version__})"
@@ -755,7 +747,8 @@ class AfterDetailerScript(scripts.Script):
if self.need_call_process(p):
with preseve_prompts(p):
copy_p = copy(p)
p.scripts.before_process(copy_p)
if hasattr(p.scripts, "before_process"):
p.scripts.before_process(copy_p)
p.scripts.process(copy_p)
self.write_params_txt(p)