From fa7b3ae72ca6052190ef5a7a3d505da609b2719c Mon Sep 17 00:00:00 2001 From: Blanchon Date: Fri, 26 Jul 2024 13:36:28 +0200 Subject: [PATCH] Avoid crashing just for the LUTs --- image.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/image.py b/image.py index a0f6c4f..62ceb7e 100644 --- a/image.py +++ b/image.py @@ -972,12 +972,13 @@ class ImageApplyLUT: # TODO: check if we can do without numpy def execute(self, image, lut_file, gamma_correction, clip_values, strength): - from colour.io.luts.iridas_cube import read_LUT_IridasCube - lut_file_path = folder_paths.get_full_path("luts", lut_file) if not lut_file_path or not Path(lut_file_path).exists(): - raise FileNotFoundError(f"Could not find LUT file: {lut_file_path}") - + print(f"Could not find LUT file: {lut_file_path}") + return (image,) + + from colour.io.luts.iridas_cube import read_LUT_IridasCube + device = image.device lut = read_LUT_IridasCube(lut_file_path) lut.name = lut_file