mirror of
https://github.com/idrirap/ComfyUI-Lora-Auto-Trigger-Words.git
synced 2026-03-21 21:22:12 -03:00
Merge pull request #5 from idrirap/fix_cache_stacker
fix: bug where lora_stack input get stacked with the lora_stack output exponentially
This commit is contained in:
@@ -84,12 +84,11 @@ class LoraLoaderStackedVanilla:
|
|||||||
civitai_tags_list = append_lora_name_if_empty(civitai_tags_list, lora_name, append_loraname_if_empty)
|
civitai_tags_list = append_lora_name_if_empty(civitai_tags_list, lora_name, append_loraname_if_empty)
|
||||||
meta_tags_list = append_lora_name_if_empty(meta_tags_list, lora_name, append_loraname_if_empty)
|
meta_tags_list = append_lora_name_if_empty(meta_tags_list, lora_name, append_loraname_if_empty)
|
||||||
|
|
||||||
|
loras = [(lora_name,lora_weight,lora_weight,)]
|
||||||
if lora_stack is not None:
|
if lora_stack is not None:
|
||||||
lora_stack.append((lora_name,lora_weight,lora_weight,))
|
loras.extend(lora_stack)
|
||||||
else:
|
|
||||||
lora_stack = [(lora_name,lora_weight,lora_weight,)]
|
|
||||||
|
|
||||||
return (civitai_tags_list, meta_tags_list, lora_stack)
|
return (civitai_tags_list, meta_tags_list, loras)
|
||||||
|
|
||||||
class LoraLoaderAdvanced:
|
class LoraLoaderAdvanced:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -185,10 +184,9 @@ class LoraLoaderStackedAdvanced:
|
|||||||
civitai_tags_list = append_lora_name_if_empty(civitai_tags_list, lora_name["content"], append_loraname_if_empty)
|
civitai_tags_list = append_lora_name_if_empty(civitai_tags_list, lora_name["content"], append_loraname_if_empty)
|
||||||
meta_tags_list = append_lora_name_if_empty(meta_tags_list, lora_name["content"], append_loraname_if_empty)
|
meta_tags_list = append_lora_name_if_empty(meta_tags_list, lora_name["content"], append_loraname_if_empty)
|
||||||
|
|
||||||
|
loras = [(lora_name["content"],lora_weight,lora_weight,)]
|
||||||
if lora_stack is not None:
|
if lora_stack is not None:
|
||||||
lora_stack.append((lora_name["content"],lora_weight,lora_weight,))
|
loras.extend(lora_stack)
|
||||||
else:
|
|
||||||
lora_stack = [(lora_name["content"],lora_weight,lora_weight,)]
|
|
||||||
|
|
||||||
if enable_preview:
|
if enable_preview:
|
||||||
_, preview = copy_preview_to_temp(lora_name["image"])
|
_, preview = copy_preview_to_temp(lora_name["image"])
|
||||||
@@ -198,9 +196,9 @@ class LoraLoaderStackedAdvanced:
|
|||||||
"subfolder": "lora_preview",
|
"subfolder": "lora_preview",
|
||||||
"type": "temp"
|
"type": "temp"
|
||||||
}
|
}
|
||||||
return {"ui": {"images": [preview_output]}, "result": (civitai_tags_list, meta_tags_list, lora_stack)}
|
return {"ui": {"images": [preview_output]}, "result": (civitai_tags_list, meta_tags_list, loras)}
|
||||||
|
|
||||||
return {"result": (civitai_tags_list, meta_tags_list, lora_stack)}
|
return {"result": (civitai_tags_list, meta_tags_list, loras)}
|
||||||
|
|
||||||
|
|
||||||
# A dictionary that contains all nodes you want to export with their names
|
# A dictionary that contains all nodes you want to export with their names
|
||||||
|
|||||||
Reference in New Issue
Block a user