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)
This commit is contained in:
LaVie024
2025-05-30 03:15:34 +00:00
committed by GitHub
parent 3c5fc7eb35
commit 36ddf0e694

View File

@@ -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