mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -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
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"trigger_words": ("STRING", {"defaultInput": True, "forceInput": True}),
|
||||
"required": {},
|
||||
"optional": {
|
||||
**FlexibleOptionalInputType(any_type),
|
||||
"trigger_words": ("STRING", {"default": "", "defaultInput": True}),
|
||||
},
|
||||
"optional": FlexibleOptionalInputType(any_type),
|
||||
"hidden": {
|
||||
"id": "UNIQUE_ID", # 会被 ComfyUI 自动替换为唯一ID
|
||||
},
|
||||
@@ -23,7 +24,7 @@ class TriggerWordToggle:
|
||||
RETURN_NAMES = ("filtered_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
|
||||
PromptServer.instance.send_sync("trigger_word_update", {
|
||||
"id": id,
|
||||
|
||||
Reference in New Issue
Block a user