From 706e7d85d495d627978541bea03c7d5dd4bad705 Mon Sep 17 00:00:00 2001 From: tazlin Date: Thu, 21 Mar 2024 17:26:27 -0400 Subject: [PATCH] fix: don't crash on missing source image --- hordelib/nodes/node_image_loader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hordelib/nodes/node_image_loader.py b/hordelib/nodes/node_image_loader.py index 9d6d83e9..27a7501f 100644 --- a/hordelib/nodes/node_image_loader.py +++ b/hordelib/nodes/node_image_loader.py @@ -21,7 +21,8 @@ def INPUT_TYPES(s): def load_image(self, image): if image is None: logger.error("Input image is None in HordeImageLoader - this is a bug, please report it!") - raise ValueError("Input image is None in HordeImageLoader") + # Use a default image + image = PIL.Image.new("RGB", (64, 64), (255, 255, 255)) if not isinstance(image, PIL.Image.Image): logger.error(f"Input image is not a PIL Image, it is a {type(image)}")