From 592014923fdc2905588c37d7b417549f608d49c5 Mon Sep 17 00:00:00 2001 From: Isotr0py <41363108+Isotr0py@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:48:25 +0800 Subject: [PATCH] Support JPEG-XL on windows --- library/train_util.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/library/train_util.py b/library/train_util.py index 5433357ac..51610e700 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -96,6 +96,7 @@ except: pass +# JPEG-XL on Linux try: from jxlpy import JXLImagePlugin @@ -103,6 +104,14 @@ except: pass +# JPEG-XL on Windows +try: + import pillow_jxl + + IMAGE_EXTENSIONS.extend([".jxl", ".JXL"]) +except: + pass + IMAGE_TRANSFORMS = transforms.Compose( [ transforms.ToTensor(),