mirror of
https://github.com/idrirap/ComfyUI-Lora-Auto-Trigger-Words.git
synced 2026-03-21 13:12:13 -03:00
fix: now can use the output lora_name as an input for override_lora_name
This commit is contained in:
@@ -56,7 +56,7 @@ class LoraLoaderVanilla:
|
||||
|
||||
model_lora, clip_lora = load_lora_for_models(model, clip, lora, strength_model, strength_clip)
|
||||
|
||||
return (model_lora, clip_lora, civitai_tags_list, meta_tags_list, get_lora_name_from_lora_path(lora_name))
|
||||
return (model_lora, clip_lora, civitai_tags_list, meta_tags_list, lora_name)
|
||||
|
||||
class LoraLoaderStackedVanilla:
|
||||
@classmethod
|
||||
@@ -96,7 +96,7 @@ class LoraLoaderStackedVanilla:
|
||||
if lora_stack is not None:
|
||||
loras.extend(lora_stack)
|
||||
|
||||
return (civitai_tags_list, meta_tags_list, loras, get_lora_name_from_lora_path(lora_name))
|
||||
return (civitai_tags_list, meta_tags_list, loras, lora_name)
|
||||
|
||||
class LoraLoaderAdvanced:
|
||||
def __init__(self):
|
||||
@@ -162,10 +162,10 @@ class LoraLoaderAdvanced:
|
||||
"subfolder": "lora_preview",
|
||||
"type": "temp"
|
||||
}
|
||||
return {"ui": {"images": [preview_output]}, "result": (model_lora, clip_lora, civitai_tags_list, meta_tags_list, get_lora_name_from_lora_path(lora_name["content"]))}
|
||||
return {"ui": {"images": [preview_output]}, "result": (model_lora, clip_lora, civitai_tags_list, meta_tags_list, lora_name["content"])}
|
||||
|
||||
|
||||
return (model_lora, clip_lora, civitai_tags_list, meta_tags_list, get_lora_name_from_lora_path(lora_name["content"]))
|
||||
return (model_lora, clip_lora, civitai_tags_list, meta_tags_list, lora_name["content"])
|
||||
|
||||
class LoraLoaderStackedAdvanced:
|
||||
@classmethod
|
||||
@@ -218,9 +218,9 @@ class LoraLoaderStackedAdvanced:
|
||||
"subfolder": "lora_preview",
|
||||
"type": "temp"
|
||||
}
|
||||
return {"ui": {"images": [preview_output]}, "result": (civitai_tags_list, meta_tags_list, loras, get_lora_name_from_lora_path(lora_name["content"]))}
|
||||
return {"ui": {"images": [preview_output]}, "result": (civitai_tags_list, meta_tags_list, loras, lora_name["content"])}
|
||||
|
||||
return {"result": (civitai_tags_list, meta_tags_list, loras, get_lora_name_from_lora_path(lora_name["content"]))}
|
||||
return {"result": (civitai_tags_list, meta_tags_list, loras, lora_name["content"])}
|
||||
|
||||
class LoraTagsOnly:
|
||||
@classmethod
|
||||
|
||||
8
utils.py
8
utils.py
@@ -217,10 +217,8 @@ def parse_selector(selector, tags_list):
|
||||
def append_lora_name_if_empty(tags_list, lora_path, enabled):
|
||||
if not enabled or len(tags_list) > 0:
|
||||
return tags_list
|
||||
tags_list.append(get_lora_name_from_lora_path(lora_path))
|
||||
return tags_list
|
||||
|
||||
def get_lora_name_from_lora_path(lora_path):
|
||||
filename = os.path.splitext(lora_path)[0]
|
||||
filename = os.path.basename(filename)
|
||||
return filename
|
||||
|
||||
tags_list.append(filename)
|
||||
return tags_list
|
||||
|
||||
Reference in New Issue
Block a user