From 18e587d62610b73a4fbe62e58037a7f1abeed486 Mon Sep 17 00:00:00 2001 From: bmaltais Date: Sat, 2 Nov 2024 07:55:21 -0400 Subject: [PATCH] Update sd-scripts --- kohya_gui/sd_modeltype.py | 8 +++++++- sd-scripts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/kohya_gui/sd_modeltype.py b/kohya_gui/sd_modeltype.py index bb70150a..d7d7ee23 100755 --- a/kohya_gui/sd_modeltype.py +++ b/kohya_gui/sd_modeltype.py @@ -1,9 +1,12 @@ from os.path import isfile from safetensors import safe_open import enum +from .custom_logging import setup_logging -# methodology is based on https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/82a973c04367123ae98bd9abdf80d9eda9b910e2/modules/sd_models.py#L379-L403 +# Set up logging +log = setup_logging() +# methodology is based on https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/82a973c04367123ae98bd9abdf80d9eda9b910e2/modules/sd_models.py#L379-L403 class ModelType(enum.Enum): UNKNOWN = 0 @@ -44,6 +47,9 @@ def hasKeyPrefix(pfx): self.model_type = ModelType.SD2 elif hasKeyPrefix("model."): self.model_type = ModelType.SD1 + else: + log.warning("Unknown model type") + log.warning(st.keys()) except: pass diff --git a/sd-scripts b/sd-scripts index 264328d1..5e32ee26 160000 --- a/sd-scripts +++ b/sd-scripts @@ -1 +1 @@ -Subproject commit 264328d117dc5d17772ec0bdbac2b9f0cf4695f5 +Subproject commit 5e32ee26a13394fdee77149c4e96b78c58eabc5e