fix: version requirements

This commit is contained in:
Dowon
2024-05-27 23:43:38 +09:00
parent 479f5f4a2e
commit 72647e5bfa
5 changed files with 18 additions and 30 deletions

View File

@@ -1,19 +1,14 @@
from __future__ import annotations
from PIL import Image
from rich import print
try:
from modules.processing import create_binary_mask
except ImportError:
msg = "[-] ADetailer: Support for webui versions below 1.6.0 will be discontinued."
print(msg)
def create_binary_mask(image: Image.Image):
return image.convert("L")
from modules.processing import create_binary_mask # noqa: F401
except ImportError as e:
msg = "[-] ADetailer: WebUI versions below 1.6.0 are not supported."
raise RuntimeError(msg) from e
try:
from modules.sd_schedulers import schedulers
except ImportError:
# webui < 1.9.0
schedulers = []