mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
Make trigger_words input optional for TriggerWord Toggle node. This will fix https://github.com/willmiao/ComfyUI-Lora-Manager/issues/31
This commit is contained in:
@@ -10,10 +10,11 @@ class TriggerWordToggle:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
return {
|
return {
|
||||||
"required": {
|
"required": {},
|
||||||
"trigger_words": ("STRING", {"defaultInput": True, "forceInput": True}),
|
"optional": {
|
||||||
|
**FlexibleOptionalInputType(any_type),
|
||||||
|
"trigger_words": ("STRING", {"default": "", "defaultInput": True}),
|
||||||
},
|
},
|
||||||
"optional": FlexibleOptionalInputType(any_type),
|
|
||||||
"hidden": {
|
"hidden": {
|
||||||
"id": "UNIQUE_ID", # 会被 ComfyUI 自动替换为唯一ID
|
"id": "UNIQUE_ID", # 会被 ComfyUI 自动替换为唯一ID
|
||||||
},
|
},
|
||||||
@@ -23,7 +24,7 @@ class TriggerWordToggle:
|
|||||||
RETURN_NAMES = ("filtered_trigger_words",)
|
RETURN_NAMES = ("filtered_trigger_words",)
|
||||||
FUNCTION = "process_trigger_words"
|
FUNCTION = "process_trigger_words"
|
||||||
|
|
||||||
def process_trigger_words(self, trigger_words, id, **kwargs):
|
def process_trigger_words(self, id, trigger_words="", **kwargs):
|
||||||
# Send trigger words to frontend
|
# Send trigger words to frontend
|
||||||
PromptServer.instance.send_sync("trigger_word_update", {
|
PromptServer.instance.send_sync("trigger_word_update", {
|
||||||
"id": id,
|
"id": id,
|
||||||
|
|||||||
Reference in New Issue
Block a user