fix bugradio (#455)

This commit is contained in:
lllyasviel 2023-09-20 06:00:52 -07:00 committed by GitHub
parent 5456a5784b
commit 6597b3df64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,10 +265,11 @@ class Image(
if x is None:
return x
mask = ""
mask = None
if self.tool == "sketch" and self.source in ["upload", "webcam"]:
assert isinstance(x, dict)
x, mask = x["image"], x["mask"]
if isinstance(x, dict):
x, mask = x["image"], x["mask"]
assert isinstance(x, str)
im = processing_utils.decode_base64_to_image(x)