mirror of
https://github.com/sontungdo/sd-image-editor.git
synced 2026-01-26 19:29:45 +00:00
handle when image is None
This commit is contained in:
@@ -13,6 +13,8 @@ from PIL import Image, ImageEnhance, ImageFilter, ImageTransform
|
||||
save_path = os.path.join("output", "img2img-images", "sd-image-editor")
|
||||
|
||||
def edit(img, degree, expand, flip, interpolate_mode, color, contrast, brightness, sharpness):
|
||||
if img is None:
|
||||
return None
|
||||
# Flip
|
||||
if flip:
|
||||
img = img.transpose(method=Image.Transpose.FLIP_LEFT_RIGHT)
|
||||
|
||||
Reference in New Issue
Block a user