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 1/2] 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(), From 025368f51c31050544934a972ad77b149276bcf1 Mon Sep 17 00:00:00 2001 From: Kohya S Date: Mon, 9 Oct 2023 14:06:58 +0900 Subject: [PATCH 2/2] may work dropout in LyCORIS #859 --- train_network.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/train_network.py b/train_network.py index 99179814c..2232a384a 100644 --- a/train_network.py +++ b/train_network.py @@ -283,7 +283,10 @@ def train(self, args): if args.dim_from_weights: network, _ = network_module.create_network_from_weights(1, args.network_weights, vae, text_encoder, unet, **net_kwargs) else: - # LyCORIS will work with this... + if "dropout" not in net_kwargs: + # workaround for LyCORIS (;^ω^) + net_kwargs["dropout"] = args.network_dropout + network = network_module.create_network( 1.0, args.network_dim,