mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-21 21:22:13 -03:00
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:
@@ -18,7 +18,7 @@ import subprocess
|
|||||||
import json
|
import json
|
||||||
import psutil
|
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
|
from comfy_extras.nodes_gits import GITSScheduler
|
||||||
|
|
||||||
# Get the absolute path of various directories
|
# Get the absolute path of various directories
|
||||||
@@ -300,11 +300,11 @@ class TSC_LoRA_Stacker:
|
|||||||
inputs = {
|
inputs = {
|
||||||
"required": {
|
"required": {
|
||||||
"input_mode": (cls.modes,),
|
"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_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"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})
|
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):
|
def calculate_sigmas(model_sampling, scheduler_name: str, steps):
|
||||||
if scheduler_name.startswith("AYS"):
|
if scheduler_name.startswith("AYS"):
|
||||||
return AlignYourStepsScheduler().get_sigmas(scheduler_name.split(" ")[1], steps, denoise=1.0)[0]
|
return AlignYourStepsScheduler().get_sigmas(scheduler_name.split(" ")[1], steps, denoise=1.0)[0]
|
||||||
elif scheduler_name == "GITS":
|
elif scheduler_name == "GITS":
|
||||||
return GITSScheduler().get_sigmas(1.20, steps, denoise=1.0)[0]
|
return GITSScheduler().get_sigmas(1.20, steps, denoise=1.0)[0]
|
||||||
return original_calculation(model_sampling, scheduler_name, steps)
|
return original_calculation(model_sampling, scheduler_name, steps)
|
||||||
|
|
||||||
comfy.samplers.KSampler.SCHEDULERS = SCHEDULERS
|
comfy.samplers.KSampler.SCHEDULERS = SCHEDULERS
|
||||||
|
|||||||
Reference in New Issue
Block a user