mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-26 07:35:44 -03:00
fix: correct key reference in process_trigger_words and update comment for widget values. Fixes #254
This commit is contained in:
@@ -50,15 +50,9 @@ class TriggerWordToggle:
|
|||||||
|
|
||||||
def process_trigger_words(self, id, group_mode, default_active, **kwargs):
|
def process_trigger_words(self, id, group_mode, default_active, **kwargs):
|
||||||
# Handle both old and new formats for trigger_words
|
# Handle both old and new formats for trigger_words
|
||||||
trigger_words_data = self._get_toggle_data(kwargs, 'trigger_words')
|
trigger_words_data = self._get_toggle_data(kwargs, 'orinalMessage')
|
||||||
trigger_words = trigger_words_data if isinstance(trigger_words_data, str) else ""
|
trigger_words = trigger_words_data if isinstance(trigger_words_data, str) else ""
|
||||||
|
|
||||||
# Send trigger words to frontend
|
|
||||||
# PromptServer.instance.send_sync("trigger_word_update", {
|
|
||||||
# "id": id,
|
|
||||||
# "message": trigger_words
|
|
||||||
# })
|
|
||||||
|
|
||||||
filtered_triggers = trigger_words
|
filtered_triggers = trigger_words
|
||||||
|
|
||||||
# Get toggle data with support for both formats
|
# Get toggle data with support for both formats
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ app.registerExtension({
|
|||||||
|
|
||||||
// Restore saved value if exists
|
// Restore saved value if exists
|
||||||
if (node.widgets_values && node.widgets_values.length > 0) {
|
if (node.widgets_values && node.widgets_values.length > 0) {
|
||||||
// 0 is group mode, 1 is default_active, 2 is input, 3 is tag widget, 4 is original message
|
// 0 is group mode, 1 is default_active, 2 is tag widget, 3 is original message
|
||||||
const savedValue = node.widgets_values[2];
|
const savedValue = node.widgets_values[2];
|
||||||
if (savedValue) {
|
if (savedValue) {
|
||||||
result.widget.value = Array.isArray(savedValue) ? savedValue : [];
|
result.widget.value = Array.isArray(savedValue) ? savedValue : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user