Fix lora_stack tuple unpacking to support both 3-tuple and 4-tuple formats

Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-03 23:05:44 +00:00
parent 7a150ac766
commit 82bdf04271
3 changed files with 5 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1745,7 +1745,11 @@ class TSC_KSampler:
if X_type not in lora_types and Y_type not in lora_types: if X_type not in lora_types and Y_type not in lora_types:
if lora_stack: if lora_stack:
names_list = [] names_list = []
for name, model_wt, clip_wt in lora_stack: for lora_tuple in lora_stack:
# Support both 3-tuple and 4-tuple
name = lora_tuple[0]
model_wt = lora_tuple[1]
clip_wt = lora_tuple[2]
base_name = os.path.splitext(os.path.basename(name))[0] base_name = os.path.splitext(os.path.basename(name))[0]
formatted_str = f"{base_name}({round(model_wt, 3)},{round(clip_wt, 3)})" formatted_str = f"{base_name}({round(model_wt, 3)},{round(clip_wt, 3)})"
names_list.append(formatted_str) names_list.append(formatted_str)