diff --git a/aiia_qwen_nodes.py b/aiia_qwen_nodes.py index fe0b953..7fe9105 100644 --- a/aiia_qwen_nodes.py +++ b/aiia_qwen_nodes.py @@ -94,7 +94,7 @@ class AIIA_Qwen_TTS: "optional": { "speaker": (QWEN_SPEAKER_LIST, {"default": "Vivian"}), "instruct": ("STRING", {"multiline": True, "default": ""}), - "preset_note": ("STRING", {"default": QWEN_PRESET_NOTE, "label_on_node": True}), + "preset_note": ("STRING", {"default": QWEN_PRESET_NOTE, "is_label": True}), "reference_audio": ("AUDIO",), "reference_text": ("STRING", {"multiline": True, "default": ""}), "x_vector_only": ("BOOLEAN", {"default": False}), @@ -217,7 +217,7 @@ class AIIA_Qwen_Dialogue_TTS: "qwen_custom_model": ("QWEN_MODEL",), "qwen_design_model": ("QWEN_MODEL",), - "preset_note": ("STRING", {"default": QWEN_PRESET_NOTE, "label_on_node": True}), + "preset_note": ("STRING", {"default": QWEN_PRESET_NOTE, "is_label": True}), # Speaker A "speaker_A_mode": (["Clone", "Preset", "Design"], {"default": "Clone"}), diff --git a/js/aiia_labels.js b/js/aiia_labels.js index 6d403b5..60fd7a7 100755 --- a/js/aiia_labels.js +++ b/js/aiia_labels.js @@ -5,16 +5,21 @@ import { app } from "../../../scripts/app.js"; app.registerExtension({ name: "AIIA.Labels", async beforeRegisterNodeDef(nodeType, nodeData, app) { - // Iterate through required inputs to find ones marked as is_label + // Iterate through required and optional inputs to find ones marked as is_label const requiredInputs = nodeData.input?.required || {}; + const optionalInputs = nodeData.input?.optional || {}; let labelWidgetNames = []; - for (const [name, inputDef] of Object.entries(requiredInputs)) { - // inputDef is [type, metadata_dict] - if (inputDef[1] && inputDef[1].is_label === true) { - labelWidgetNames.push(name); + const checkInputs = (inputs) => { + for (const [name, inputDef] of Object.entries(inputs)) { + if (inputDef[1] && inputDef[1].is_label === true) { + labelWidgetNames.push(name); + } } - } + }; + + checkInputs(requiredInputs); + checkInputs(optionalInputs); if (labelWidgetNames.length > 0) { const onNodeCreated = nodeType.prototype.onNodeCreated;