Added inputs-referenceAudios support

This commit is contained in:
Sirshendu Ganguly
2026-04-15 21:52:54 +05:30
parent 6253871ef4
commit 21fb42b44d
6 changed files with 68 additions and 10 deletions
+5 -3
View File
@@ -63,6 +63,7 @@ from .modules.speechInput import RunwareSpeechInput
from .modules.speechInputCombine import RunwareSpeechInputCombine
from .modules.referenceVideos import referenceVideos
from .modules.referenceVoices import referenceVoices
from .modules.referenceAudios import referenceAudios
from .modules.videoInferenceInputs import videoInferenceInputs
from .modules.videoInferenceElements import (
RunwareVideoInferenceElements,
@@ -182,8 +183,9 @@ NODE_CLASS_MAPPINGS = {
"Runware Video Audio Input": RunwareAudioInput,
"Runware Video Speech Input": RunwareSpeechInput,
"Runware Speech Inputs Combine": RunwareSpeechInputCombine,
"Runware Reference Videos": referenceVideos,
"Runware Reference Voices": referenceVoices,
"Runware Video Inference Inputs Reference Videos": referenceVideos,
"Runware Video Inference Inputs Reference Voices": referenceVoices,
"Runware Video Inference Inputs Reference Audios": referenceAudios,
"Runware Video Inference Inputs": videoInferenceInputs,
"Runware Video Inference Elements": RunwareVideoInferenceElements,
"Runware Video Inference Elements Combine": RunwareVideoInferenceElementsCombine,
@@ -212,7 +214,7 @@ NODE_CLASS_MAPPINGS = {
"Runware Vectorize": vectorize,
"Runware Video Background Removal": videoBgRemoval,
"Runware Video Upscaler": videoUpscaler,
"Runware Video Inputs References": videoInputsReferences,
"Runware Video Inference Inputs Reference Images": videoInputsReferences,
"Runware Video Inputs Frame Images": RunwareVideoInputsFrameImages,
"Runware Safety Inputs": safetyInputs,
"Runware Settings": RunwareSettings,
+8 -3
View File
@@ -105,8 +105,9 @@ const RUNWARE_NODE_TYPES = {
INPUTAUDIOS: "Runware Input Audios",
AUDIOINPUT: "Runware Video Audio Input",
SPEECHINPUT: "Runware Video Speech Input",
REFERENCEVIDEOS: "Runware Reference Videos",
REFERENCEVOICES: "Runware Reference Voices",
REFERENCEVIDEOS: "Runware Video Inference Inputs Reference Videos",
REFERENCEVOICES: "Runware Video Inference Inputs Reference Voices",
REFERENCEAUDIOS: "Runware Video Inference Inputs Reference Audios",
VIDEOINFERENCEINPUTS: "Runware Video Inference Inputs",
VIDEOINFERENCEELEMENTS: "Runware Video Inference Elements",
VIDEOINFERENCEELEMENTSCOMBINE: "Runware Video Inference Elements Combine",
@@ -134,7 +135,7 @@ const RUNWARE_NODE_TYPES = {
VECTORIZE: "Runware Vectorize",
VIDEOBGREMOVAL: "Runware Video Background Removal",
VIDEOUPSCALER: "Runware Video Upscaler",
VIDEOINPUTSREFERENCES: "Runware Video Inputs References",
VIDEOINPUTSREFERENCES: "Runware Video Inference Inputs Reference Images",
VIDEOINPUTSFRAMEIMAGES: "Runware Video Inputs Frame Images",
ACCELERATOROPTIONS: "Runware Accelerator Options",
VIDEOTRANSCRIPTION: "Runware Video Transcription",
@@ -405,6 +406,10 @@ const RUNWARE_NODE_PROPS = {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.REFERENCEAUDIOS]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.VIDEOINFERENCEINPUTS]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
+44
View File
@@ -0,0 +1,44 @@
from typing import List
class referenceAudios:
"""Reference Audios node for configuring reference audio inputs"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {},
"optional": {
"Audio1": ("STRING", {
"tooltip": "MediaUUID for the first reference audio from Runware Media Upload node.",
}),
"Audio2": ("STRING", {
"tooltip": "MediaUUID for the second reference audio from Runware Media Upload node.",
}),
"Audio3": ("STRING", {
"tooltip": "MediaUUID for the third reference audio from Runware Media Upload node.",
}),
"Audio4": ("STRING", {
"tooltip": "MediaUUID for the fourth reference audio from Runware Media Upload node.",
}),
}
}
DESCRIPTION = "Configure multiple reference audios (mediaUUIDs) for video inference inputs."
FUNCTION = "createReferenceAudios"
RETURN_TYPES = ("RUNWAREINPUTAUDIOS",)
RETURN_NAMES = ("Reference Audios",)
CATEGORY = "Runware"
def createReferenceAudios(self, **kwargs) -> tuple[List[str]]:
"""Create list of reference audio UUIDs from provided parameters"""
audioList = []
for i in range(1, 5):
audioKey = f"Audio{i}"
audioUuid = kwargs.get(audioKey)
if audioUuid and audioUuid.strip() != "":
audioList.append(audioUuid.strip())
return (audioList,)
+9 -2
View File
@@ -41,12 +41,15 @@ class videoInferenceInputs:
"Background": ("IMAGE", {
"tooltip": "Background image for video generation. Connect a Load Image node to provide the background.",
}),
"References": ("RUNWAREVIDEOINPUTSREFERENCEIMAGES", {
"References Images": ("RUNWAREVIDEOINPUTSREFERENCEIMAGES", {
"tooltip": "Connect the Video Inputs References node to provide reference images."
}),
"Reference Videos": ("RUNWAREREFERENCEVIDEOS", {
"tooltip": "Connect the Reference Videos node to provide reference video mediaUUIDs."
}),
"Reference Audios": ("RUNWAREINPUTAUDIOS", {
"tooltip": "Connect the Runware Video Inference Inputs Reference Audios node to provide reference audio mediaUUIDs."
}),
"Reference Voices": ("RUNWAREREFERENCEVOICES", {
"tooltip": "Connect the Reference Voices node to provide reference voice URLs or mediaUUIDs."
}),
@@ -86,8 +89,9 @@ class videoInferenceInputs:
frame = kwargs.get("Frame", None)
background = kwargs.get("Background", None)
frameImages = kwargs.get("Frame Images", None)
references = kwargs.get("References", None)
references = kwargs.get("References Images", None)
referenceVideos = kwargs.get("Reference Videos", None)
referenceAudios = kwargs.get("Reference Audios", None)
referenceVoices = kwargs.get("Reference Voices", None)
draftId = kwargs.get("draftId", "")
videoId = kwargs.get("videoId", "")
@@ -143,6 +147,9 @@ class videoInferenceInputs:
if referenceVideos is not None and len(referenceVideos) > 0:
inputs["referenceVideos"] = referenceVideos
if referenceAudios is not None and len(referenceAudios) > 0:
inputs["referenceAudios"] = referenceAudios
if referenceVoices is not None and len(referenceVoices) > 0:
inputs["referenceVoices"] = referenceVoices
+1 -1
View File
@@ -63,5 +63,5 @@ NODE_CLASS_MAPPINGS = {
}
NODE_DISPLAY_NAME_MAPPINGS = {
"RunwareVideoInputsReferences": "Runware Video Inputs Reference Images",
"RunwareVideoInputsReferences": "Runware Video Inference Inputs Reference Images",
}
File diff suppressed because one or more lines are too long