Files
ComfyUI-H3-Continuum-Tiled/web/reference_audio_ui.js
T

27 lines
852 B
JavaScript

const NORMALIZED_INPUT_LABELS = {
reference_video_1: "Video Guide Frames",
driving_audio: "Driving Audio",
audio_vae: "Driving Audio VAE",
audio_references: "Reference Audios (Optional)",
reference_audio_1: "Reference Audio (Legacy)",
reference_audio_vae: "Reference Audio VAE (Legacy)",
};
export function normalizeReferenceAudioLabels(node) {
if (!node) {
return false;
}
if (node.comfyClass === "H3ContinuumReferenceAudios") {
const output = node.outputs?.find((item) => item.name === "audio_references");
if (output) output.label = "Reference Audios";
return true;
}
for (const input of node.inputs || []) {
const label = NORMALIZED_INPUT_LABELS[input.name];
if (label) {
input.label = label;
}
}
return true;
}