Merge pull request #129 from Runware/feature-addreferenceAudios

Added inputs-referenceAudios support
This commit is contained in:
Sirshendu Ganguly
2026-04-16 11:35:05 +05:30
committed by GitHub
6 changed files with 93 additions and 12 deletions
+7 -1
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,13 @@ NODE_CLASS_MAPPINGS = {
"Runware Video Audio Input": RunwareAudioInput,
"Runware Video Speech Input": RunwareSpeechInput,
"Runware Speech Inputs Combine": RunwareSpeechInputCombine,
# Backward-compatible aliases for existing workflows
"Runware Reference Videos": referenceVideos,
"Runware Reference Voices": referenceVoices,
"Runware Video Inputs References": videoInputsReferences,
"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 +218,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,
+23 -3
View File
@@ -105,8 +105,12 @@ 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",
REFERENCEVIDEOS_LEGACY: "Runware Reference Videos",
REFERENCEVOICES: "Runware Video Inference Inputs Reference Voices",
REFERENCEVOICES_LEGACY: "Runware Reference Voices",
REFERENCEAUDIOS: "Runware Video Inference Inputs Reference Audios",
VIDEOINPUTSREFERENCES_LEGACY: "Runware Video Inputs References",
VIDEOINFERENCEINPUTS: "Runware Video Inference Inputs",
VIDEOINFERENCEELEMENTS: "Runware Video Inference Elements",
VIDEOINFERENCEELEMENTSCOMBINE: "Runware Video Inference Elements Combine",
@@ -134,7 +138,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",
@@ -401,10 +405,22 @@ const RUNWARE_NODE_PROPS = {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.REFERENCEVIDEOS_LEGACY]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.REFERENCEVOICES]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.REFERENCEVOICES_LEGACY]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.REFERENCEAUDIOS]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.VIDEOINFERENCEINPUTS]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
@@ -505,6 +521,10 @@ const RUNWARE_NODE_PROPS = {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.VIDEOINPUTSREFERENCES_LEGACY]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.VIDEOINPUTSFRAMEIMAGES]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
+48
View File
@@ -0,0 +1,48 @@
from typing import List
class referenceAudios:
"""Reference Audios node for configuring reference audio inputs"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {},
"optional": {
"Audio1": ("STRING", {
"default": "",
"tooltip": "MediaUUID for the first reference audio from Runware Media Upload node.",
}),
"Audio2": ("STRING", {
"default": "",
"tooltip": "MediaUUID for the second reference audio from Runware Media Upload node.",
}),
"Audio3": ("STRING", {
"default": "",
"tooltip": "MediaUUID for the third reference audio from Runware Media Upload node.",
}),
"Audio4": ("STRING", {
"default": "",
"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,)
+12 -5
View File
@@ -41,14 +41,14 @@ class videoInferenceInputs:
"Background": ("IMAGE", {
"tooltip": "Background image for video generation. Connect a Load Image node to provide the background.",
}),
"References": ("RUNWAREVIDEOINPUTSREFERENCEIMAGES", {
"tooltip": "Connect the Video Inputs References node to provide reference images."
"References Images": ("RUNWAREVIDEOINPUTSREFERENCEIMAGES", {
"tooltip": "Connect the Runware Video Inference Inputs Reference Images node to provide reference images."
}),
"Reference Videos": ("RUNWAREREFERENCEVIDEOS", {
"tooltip": "Connect the Reference Videos node to provide reference video mediaUUIDs."
"tooltip": "Connect the Runware Video Inference Inputs Reference Videos node to provide reference video mediaUUIDs."
}),
"Reference Voices": ("RUNWAREREFERENCEVOICES", {
"tooltip": "Connect the Reference Voices node to provide reference voice URLs or mediaUUIDs."
"tooltip": "Connect the Runware Video Inference Inputs Reference Voices node to provide reference voice URLs or mediaUUIDs."
}),
"draftId": ("STRING", {
"default": "",
@@ -63,6 +63,9 @@ class videoInferenceInputs:
"Elements": ("RUNWAREVIDEOINFERENCEELEMENTS", {
"tooltip": "Connect Runware Video Inference Elements (one element) or Runware Video Inference Elements Combine (several) for inputs.elements (Kling, etc.).",
}),
"Reference Audios": ("RUNWAREINPUTAUDIOS", {
"tooltip": "Connect the Runware Video Inference Inputs Reference Audios node to provide reference audio 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", kwargs.get("References", 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
+2 -2
View File
@@ -5,7 +5,7 @@ from typing import List, Dict, Any
class videoInputsReferences:
"""Video Inputs References node for configuring reference images with types"""
MAX_REFERENCES = 4
MAX_REFERENCES = 10
@classmethod
def INPUT_TYPES(cls):
@@ -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