mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-01-26 19:29:54 +00:00
fix(modules): conditional imports
This commit is contained in:
16
aaaaaa/conditional.py
Normal file
16
aaaaaa/conditional.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from PIL import Image
|
||||
|
||||
try:
|
||||
from modules.processing import create_binary_mask
|
||||
except ImportError:
|
||||
|
||||
def create_binary_mask(image: Image.Image):
|
||||
return image.convert("L")
|
||||
|
||||
|
||||
try:
|
||||
from modules.sd_schedulers import schedulers
|
||||
except ImportError:
|
||||
schedulers = []
|
||||
Reference in New Issue
Block a user