From fe19f9c88cc14d64da6c29ea7a5e42282528f962 Mon Sep 17 00:00:00 2001 From: NeonLightning Date: Thu, 19 Jun 2025 16:25:16 -0400 Subject: [PATCH 1/3] Update better_combos.py replaced example with lora name output --- py/better_combos.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/py/better_combos.py b/py/better_combos.py index d31043b..e5519c8 100644 --- a/py/better_combos.py +++ b/py/better_combos.py @@ -130,21 +130,15 @@ async def get_images(request): class LoraLoaderWithImages(LoraLoader): - RETURN_TYPES = (*LoraLoader.RETURN_TYPES, "STRING",) - RETURN_NAMES = (*getattr(LoraLoader, "RETURN_NAMES", - LoraLoader.RETURN_TYPES), "example") - - @classmethod - def INPUT_TYPES(s): - types = super().INPUT_TYPES() - types["optional"] = {"prompt": ("STRING", {"hidden": True})} - return types + RETURN_TYPES = (*LoraLoader.RETURN_TYPES, "STRING") + RETURN_NAMES = ( + *getattr(LoraLoader, "RETURN_NAMES", LoraLoader.RETURN_TYPES), "lora_name") def load_lora(self, **kwargs): - prompt = kwargs.pop("prompt", "") - return (*super().load_lora(**kwargs), prompt) - - + lora_name = kwargs["lora_name"] + result = super().load_lora(**kwargs) + return (*result, lora_name) + class CheckpointLoaderSimpleWithImages(CheckpointLoaderSimple): RETURN_TYPES = (*CheckpointLoaderSimple.RETURN_TYPES, "STRING",) RETURN_NAMES = (*getattr(CheckpointLoaderSimple, "RETURN_NAMES", From 846f8dbaf5e3b446076db042b005b3eb55b96475 Mon Sep 17 00:00:00 2001 From: NeonLightning Date: Thu, 19 Jun 2025 16:36:55 -0400 Subject: [PATCH 2/3] Update better_combos.py fixed --- py/better_combos.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/py/better_combos.py b/py/better_combos.py index e5519c8..855bc48 100644 --- a/py/better_combos.py +++ b/py/better_combos.py @@ -130,15 +130,28 @@ async def get_images(request): class LoraLoaderWithImages(LoraLoader): - RETURN_TYPES = (*LoraLoader.RETURN_TYPES, "STRING") - RETURN_NAMES = ( - *getattr(LoraLoader, "RETURN_NAMES", LoraLoader.RETURN_TYPES), "lora_name") + RETURN_TYPES = (*LoraLoader.RETURN_TYPES, "STRING",) + RETURN_NAMES = (*getattr(LoraLoader, "RETURN_NAMES", + LoraLoader.RETURN_TYPES), "lora_name") # Changed "example" to "lora_name" + + @classmethod + def INPUT_TYPES(s): + types = super().INPUT_TYPES() + # Keep the optional prompt input if needed elsewhere, but we won't use it + types["optional"] = {"prompt": ("STRING", {"hidden": True})} + return types def load_lora(self, **kwargs): + # Get the lora name from the input parameters lora_name = kwargs["lora_name"] + + # Get the base results (model, clip) result = super().load_lora(**kwargs) + + # Return model, clip, and lora_name (replacing the example prompt) return (*result, lora_name) - + + class CheckpointLoaderSimpleWithImages(CheckpointLoaderSimple): RETURN_TYPES = (*CheckpointLoaderSimple.RETURN_TYPES, "STRING",) RETURN_NAMES = (*getattr(CheckpointLoaderSimple, "RETURN_NAMES", From 0ec7da00042a6bd9d01d17570c9fbc9170fa584c Mon Sep 17 00:00:00 2001 From: NeonLightning Date: Thu, 19 Jun 2025 17:42:31 -0400 Subject: [PATCH 3/3] Update better_combos.py fixed properly this time --- py/better_combos.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/py/better_combos.py b/py/better_combos.py index 855bc48..61c9f3b 100644 --- a/py/better_combos.py +++ b/py/better_combos.py @@ -128,30 +128,37 @@ async def get_images(request): return web.json_response(images) - class LoraLoaderWithImages(LoraLoader): RETURN_TYPES = (*LoraLoader.RETURN_TYPES, "STRING",) RETURN_NAMES = (*getattr(LoraLoader, "RETURN_NAMES", - LoraLoader.RETURN_TYPES), "lora_name") # Changed "example" to "lora_name" + LoraLoader.RETURN_TYPES), "lora_name") @classmethod def INPUT_TYPES(s): types = super().INPUT_TYPES() - # Keep the optional prompt input if needed elsewhere, but we won't use it + # Add back the hidden prompt for compatibility types["optional"] = {"prompt": ("STRING", {"hidden": True})} return types def load_lora(self, **kwargs): - # Get the lora name from the input parameters + # Get the lora_name from the input parameters lora_name = kwargs["lora_name"] + # Create a clean set of arguments without the prompt + clean_kwargs = { + "model": kwargs.get("model"), + "clip": kwargs.get("clip"), + "lora_name": kwargs.get("lora_name"), + "strength_model": kwargs.get("strength_model"), + "strength_clip": kwargs.get("strength_clip") + } + # Get the base results (model, clip) - result = super().load_lora(**kwargs) + result = super().load_lora(**clean_kwargs) - # Return model, clip, and lora_name (replacing the example prompt) + # Return model, clip, and lora_name return (*result, lora_name) - class CheckpointLoaderSimpleWithImages(CheckpointLoaderSimple): RETURN_TYPES = (*CheckpointLoaderSimple.RETURN_TYPES, "STRING",) RETURN_NAMES = (*getattr(CheckpointLoaderSimple, "RETURN_NAMES",