Skip to content

Commit

Permalink
fix: webui < 1.6.0 import error
Browse files Browse the repository at this point in the history
  • Loading branch information
Bing-su committed Mar 25, 2024
1 parent 0a07045 commit c083197
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/!adetailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@
from modules.processing import (
Processed,
StableDiffusionProcessingImg2Img,
create_binary_mask,
create_infotext,
process_images,
)
from modules.sd_samplers import all_samplers
from modules.shared import cmd_opts, opts, state

try:
from modules.processing import create_binary_mask
except ImportError:

def create_binary_mask(image: Image.Image):
return image.convert("L")


if TYPE_CHECKING:
from fastapi import FastAPI

Expand Down

0 comments on commit c083197

Please sign in to comment.