From 36ddf0e69461f616d3fde4ec6c6794cb93daaf1d Mon Sep 17 00:00:00 2001 From: LaVie024 <62406970+LaVie024@users.noreply.github.com> Date: Fri, 30 May 2025 03:15:34 +0000 Subject: [PATCH] Quick patch for the LoRA Stacker node (#314) * Update efficiency_nodes.py Properly restrict the node to a max of three LoRA, a quick patch. * Update efficiency_nodes.py Edit range so it includes 3 LoRA-related widgets instead of 2 (didn't catch this the first time) --- efficiency_nodes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/efficiency_nodes.py b/efficiency_nodes.py index a41b74e..e74381b 100644 --- a/efficiency_nodes.py +++ b/efficiency_nodes.py @@ -18,7 +18,7 @@ import subprocess import json import psutil -from comfy_extras.nodes_align_your_steps import AlignYourStepsScheduler +from comfy_extras.nodes_align_your_steps import AlignYourStepsScheduler from comfy_extras.nodes_gits import GITSScheduler # Get the absolute path of various directories @@ -300,11 +300,11 @@ class TSC_LoRA_Stacker: inputs = { "required": { "input_mode": (cls.modes,), - "lora_count": ("INT", {"default": 3, "min": 0, "max": 50, "step": 1}), + "lora_count": ("INT", {"default": 3, "min": 0, "max": 3, "step": 1}), } } - for i in range(1, 50): + for i in range(1, 4): inputs["required"][f"lora_name_{i}"] = (loras,) inputs["required"][f"lora_wt_{i}"] = ("FLOAT", {"default": 1.0, "min": -10.0, "max": 10.0, "step": 0.01}) inputs["required"][f"model_str_{i}"] = ("FLOAT", {"default": 1.0, "min": -10.0, "max": 10.0, "step": 0.01}) @@ -480,8 +480,8 @@ class TSC_KSampler: def calculate_sigmas(model_sampling, scheduler_name: str, steps): if scheduler_name.startswith("AYS"): return AlignYourStepsScheduler().get_sigmas(scheduler_name.split(" ")[1], steps, denoise=1.0)[0] - elif scheduler_name == "GITS": - return GITSScheduler().get_sigmas(1.20, steps, denoise=1.0)[0] + elif scheduler_name == "GITS": + return GITSScheduler().get_sigmas(1.20, steps, denoise=1.0)[0] return original_calculation(model_sampling, scheduler_name, steps) comfy.samplers.KSampler.SCHEDULERS = SCHEDULERS