Fixed dynamic inputs again.

This commit is contained in:
moonwhaler
2025-06-20 15:31:18 +02:00
parent 2f1543e081
commit 790b2fdeea
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -16,7 +16,8 @@ class DynamicLoraStack:
def stack_loras(self, **kwargs):
loras = []
# Sort kwargs by key to maintain the order of inputs
for key, value in sorted(kwargs.items()):
sorted_items = sorted(kwargs.items(), key=lambda item: int(item[0].split('_')[1]))
for key, value in sorted_items:
if key.startswith("lora_") and value is not None:
loras.append(value)