Merge main into feature-seedream5image/prunaVideo/vectorizeProviderSettingsRecraft

This commit is contained in:
Sirshendu Ganguly
2026-02-25 20:46:22 -05:00
13 changed files with 507 additions and 98 deletions
+5 -1
View File
@@ -34,10 +34,12 @@ from .modules.providerSettings.bytedanceProviderSettings import RunwareBytedance
from .modules.providerSettings.briaProviderSettings import RunwareBriaProviderSettings
from .modules.providerSettings.briaProviderMask import RunwareBriaProviderMask
from .modules.audioInference import RunwareAudioInference
from .modules.audioInferenceSpeech import RunwareAudioInferenceSpeech
from .modules.audioModelSearch import RunwareAudioModelSearch
from .modules.audioSections import RunwareAudioSections
from .modules.audioInferenceInputs import audioInferenceInputs
from .modules.audioSettings import RunwareAudioSettings
from .modules.audioSettingsVoiceModify import RunwareAudioSettingsVoiceModify
from .modules.providerSettings.elevenlabsProviderSettings import RunwareElevenLabsProviderSettings
from .modules.providerSettings.elevenlabsProviderSettingsSections import RunwareElevenLabsProviderSettingsSections
from .modules.acceleratorOptions import acceleratorOptions
@@ -138,10 +140,12 @@ NODE_CLASS_MAPPINGS = {
"Runware Bria Provider Settings": RunwareBriaProviderSettings,
"Runware Bria Provider Mask": RunwareBriaProviderMask,
"Runware Audio Inference": RunwareAudioInference,
"Runware Audio Inference Speech": RunwareAudioInferenceSpeech,
"Runware Audio Model Search": RunwareAudioModelSearch,
"Runware Audio Sections": RunwareAudioSections,
"Runware Audio Inference Inputs": audioInferenceInputs,
"Runware Audio Settings": RunwareAudioSettings,
"Runware Audio Inference Settings": RunwareAudioSettings,
"Runware Audio Inference Settings Voice Modify": RunwareAudioSettingsVoiceModify,
"Runware ElevenLabs Provider Settings": RunwareElevenLabsProviderSettings,
"Runware ElevenLabs Provider Settings Sections": RunwareElevenLabsProviderSettingsSections,
"Runware Accelerator Options": acceleratorOptions,
+5 -1
View File
@@ -1,6 +1,6 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
import { promptEnhanceHandler, syncDimensionsNodeHandler, searchNodeHandler, APIKeyHandler, captionNodeHandler, mediaUUIDHandler, save3DFilepathHandler, videoTranscriptionHandler, videoOutputsHandler, handleCustomErrors, videoInferenceDimensionsHandler, videoModelSearchFilterHandler, audioModelSearchFilterHandler, useParameterToggleHandler, imageInferenceToggleHandler, upscalerToggleHandler, videoUpscalerToggleHandler, audioInferenceToggleHandler, acceleratorOptionsToggleHandler, bytedanceProviderSettingsToggleHandler, xaiProviderSettingsToggleHandler, viduProviderSettingsToggleHandler, sourcefulProviderSettingsToggleHandler, sourcefulProviderSettingsFontsToggleHandler, threeDInferenceToggleHandler, threeDInferenceSettingsToggleHandler, threeDInferenceSettingsLatToggleHandler, ultralyticsProviderSettingsToggleHandler, openaiProviderSettingsToggleHandler, lightricksProviderSettingsToggleHandler, klingProviderSettingsToggleHandler, lumaProviderSettingsToggleHandler, briaProviderSettingsToggleHandler, pixverseProviderSettingsToggleHandler, alibabaProviderSettingsToggleHandler, mireloProviderSettingsToggleHandler, googleProviderSettingsToggleHandler, syncProviderSettingsToggleHandler, syncSegmentToggleHandler, settingsToggleHandler, audioInputToggleHandler, speechInputToggleHandler, briaProviderMaskToggleHandler, wanAnimateAdvancedFeatureSettingsToggleHandler, videoAdvancedFeatureInputsToggleHandler, audioInferenceInputsToggleHandler } from "./utils.js";
import { promptEnhanceHandler, syncDimensionsNodeHandler, searchNodeHandler, APIKeyHandler, captionNodeHandler, mediaUUIDHandler, save3DFilepathHandler, videoTranscriptionHandler, videoOutputsHandler, handleCustomErrors, videoInferenceDimensionsHandler, videoModelSearchFilterHandler, audioModelSearchFilterHandler, useParameterToggleHandler, imageInferenceToggleHandler, upscalerToggleHandler, videoUpscalerToggleHandler, audioInferenceToggleHandler, audioInferenceSpeechToggleHandler, audioSettingsToggleHandler, acceleratorOptionsToggleHandler, bytedanceProviderSettingsToggleHandler, xaiProviderSettingsToggleHandler, viduProviderSettingsToggleHandler, sourcefulProviderSettingsToggleHandler, sourcefulProviderSettingsFontsToggleHandler, threeDInferenceToggleHandler, threeDInferenceSettingsToggleHandler, threeDInferenceSettingsLatToggleHandler, ultralyticsProviderSettingsToggleHandler, openaiProviderSettingsToggleHandler, lightricksProviderSettingsToggleHandler, klingProviderSettingsToggleHandler, lumaProviderSettingsToggleHandler, briaProviderSettingsToggleHandler, pixverseProviderSettingsToggleHandler, alibabaProviderSettingsToggleHandler, mireloProviderSettingsToggleHandler, googleProviderSettingsToggleHandler, syncProviderSettingsToggleHandler, syncSegmentToggleHandler, settingsToggleHandler, audioInputToggleHandler, speechInputToggleHandler, briaProviderMaskToggleHandler, wanAnimateAdvancedFeatureSettingsToggleHandler, videoAdvancedFeatureInputsToggleHandler, audioInferenceInputsToggleHandler } from "./utils.js";
import { RUNWARE_NODE_TYPES, RUNWARE_NODE_PROPS, SEARCH_TERMS } from "./types.js";
const nodeInitList = [];
@@ -78,6 +78,10 @@ app.registerExtension({
videoUpscalerToggleHandler(node);
} else if(nodeClass === RUNWARE_NODE_TYPES.AUDIOINFERENCE) {
audioInferenceToggleHandler(node);
} else if(nodeClass === RUNWARE_NODE_TYPES.AUDIOINFERENCESPEECH) {
audioInferenceSpeechToggleHandler(node);
} else if(nodeClass === RUNWARE_NODE_TYPES.AUDIOSETTINGS) {
audioSettingsToggleHandler(node);
} else if(nodeClass === RUNWARE_NODE_TYPES.ACCELERATOROPTIONS) {
acceleratorOptionsToggleHandler(node);
} else if(nodeClass === RUNWARE_NODE_TYPES.BYTEDANCEPROVIDERSETTINGS) {
+9 -1
View File
@@ -79,10 +79,12 @@ const RUNWARE_NODE_TYPES = {
VIDEOMODELSEARCH: "Runware Video Model Search",
FRAMEIMAGES: "Runware Frame Images",
AUDIOINFERENCE: "Runware Audio Inference",
AUDIOINFERENCESPEECH: "Runware Audio Inference Speech",
AUDIOMODELSEARCH: "Runware Audio Model Search",
AUDIOSECTIONS: "Runware Audio Sections",
AUDIOINFERENCEINPUTS: "Runware Audio Inference Inputs",
AUDIOSETTINGS: "Runware Audio Settings",
AUDIOSETTINGS: "Runware Audio Inference Settings",
AUDIOSETTINGSVOICEMODIFY: "Runware Audio Inference Settings Voice Modify",
PIXVERSEPROVIDERSETTINGS: "Runware Pixverse Provider Settings",
OPENAIPROVIDERSETTINGS: "Runware OpenAI Provider Settings",
BYTEDANCEPROVIDERSETTINGS: "Runware Bytedance Provider Settings",
@@ -270,6 +272,9 @@ const RUNWARE_NODE_PROPS = {
bgColor: DEFAULT_BGCOLOR,
promptEnhancer: true,
},
[RUNWARE_NODE_TYPES.AUDIOINFERENCESPEECH]: {
bgColor: DEFAULT_BGCOLOR,
},
[RUNWARE_NODE_TYPES.AUDIOMODELSEARCH]: {
bgColor: DEFAULT_BGCOLOR,
liveSearch: true,
@@ -444,6 +449,9 @@ const RUNWARE_NODE_PROPS = {
[RUNWARE_NODE_TYPES.AUDIOSETTINGS]: {
bgColor: DEFAULT_BGCOLOR,
},
[RUNWARE_NODE_TYPES.AUDIOSETTINGSVOICEMODIFY]: {
bgColor: DEFAULT_BGCOLOR,
},
[RUNWARE_NODE_TYPES.ACCELERATOROPTIONS]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
+112
View File
@@ -1046,6 +1046,8 @@ function audioInferenceToggleHandler(audioInferenceNode) {
const strengthWidget = audioInferenceNode.widgets.find(w => w.name === "strength");
const useCFGScaleWidget = audioInferenceNode.widgets.find(w => w.name === "useCFGScale");
const CFGScaleWidget = audioInferenceNode.widgets.find(w => w.name === "CFGScale");
const useChannelsWidget = audioInferenceNode.widgets.find(w => w.name === "useChannels");
const channelsWidget = audioInferenceNode.widgets.find(w => w.name === "channels");
// Helper function to toggle widget enabled state (exact same pattern)
function toggleWidgetState(useWidget, paramWidget, paramName) {
@@ -1120,6 +1122,81 @@ function audioInferenceToggleHandler(audioInferenceNode) {
if (useCFGScaleWidget && CFGScaleWidget) {
toggleWidgetState(useCFGScaleWidget, CFGScaleWidget, "CFGScale");
}
if (useChannelsWidget && channelsWidget) {
toggleWidgetState(useChannelsWidget, channelsWidget, "channels");
}
}
function audioSettingsToggleHandler(settingsNode) {
if (!settingsNode?.widgets) return;
const useLyricsWidget = settingsNode.widgets.find(w => w && w.name === "useLyrics");
const lyricsWidget = settingsNode.widgets.find(w => w && w.name === "lyrics");
const useGuidanceTypeWidget = settingsNode.widgets.find(w => w && w.name === "useGuidanceType");
const guidanceTypeWidget = settingsNode.widgets.find(w => w && w.name === "guidanceType");
const useLanguageBoostWidget = settingsNode.widgets.find(w => w && w.name === "useLanguageBoost");
const languageBoostWidget = settingsNode.widgets.find(w => w && w.name === "languageBoost");
const useTurboWidget = settingsNode.widgets.find(w => w && w.name === "useTurbo");
const turboWidget = settingsNode.widgets.find(w => w && w.name === "turbo");
function toggleWidgetState(useWidget, paramWidget, paramName) {
if (!useWidget || !paramWidget) return;
function applyState() {
const enabled = useWidget.value === true;
toggleWidgetEnabled(paramWidget, enabled, settingsNode);
if (paramWidget.options && paramWidget.options.element) {
paramWidget.options.element.disabled = !enabled;
paramWidget.options.element.style.opacity = enabled ? "1" : "0.5";
paramWidget.options.element.style.pointerEvents = enabled ? "auto" : "none";
}
settingsNode.setDirtyCanvas(true);
}
setTimeout(applyState, 100);
appendWidgetCB(useWidget, () => setTimeout(applyState, 50));
}
if (useLyricsWidget && lyricsWidget) toggleWidgetState(useLyricsWidget, lyricsWidget, "lyrics");
if (useGuidanceTypeWidget && guidanceTypeWidget) toggleWidgetState(useGuidanceTypeWidget, guidanceTypeWidget, "guidanceType");
if (useLanguageBoostWidget && languageBoostWidget) toggleWidgetState(useLanguageBoostWidget, languageBoostWidget, "languageBoost");
if (useTurboWidget && turboWidget) toggleWidgetState(useTurboWidget, turboWidget, "turbo");
}
function audioInferenceSpeechToggleHandler(speechNode) {
if (!speechNode?.widgets) return;
const useSpeedWidget = speechNode.widgets.find(w => w && w.name === "useSpeed");
const speedWidget = speechNode.widgets.find(w => w && w.name === "speed");
const useVolumeWidget = speechNode.widgets.find(w => w && w.name === "useVolume");
const volumeWidget = speechNode.widgets.find(w => w && w.name === "volume");
const usePitchWidget = speechNode.widgets.find(w => w && w.name === "usePitch");
const pitchWidget = speechNode.widgets.find(w => w && w.name === "pitch");
const useEmotionWidget = speechNode.widgets.find(w => w && w.name === "useEmotion");
const emotionWidget = speechNode.widgets.find(w => w && w.name === "emotion");
const useToneWidget = speechNode.widgets.find(w => w && w.name === "useTone");
const toneWidget = speechNode.widgets.find(w => w && w.name === "tone");
function toggleWidgetState(useWidget, paramWidget, paramName) {
if (!useWidget || !paramWidget) return;
function applyState() {
const enabled = useWidget.value === true;
toggleWidgetEnabled(paramWidget, enabled, speechNode);
if (paramWidget.options && paramWidget.options.element) {
paramWidget.options.element.disabled = !enabled;
paramWidget.options.element.style.opacity = enabled ? "1" : "0.5";
paramWidget.options.element.style.pointerEvents = enabled ? "auto" : "none";
}
speechNode.setDirtyCanvas(true);
}
setTimeout(applyState, 100);
appendWidgetCB(useWidget, () => setTimeout(applyState, 50));
}
if (useSpeedWidget && speedWidget) toggleWidgetState(useSpeedWidget, speedWidget, "speed");
if (useVolumeWidget && volumeWidget) toggleWidgetState(useVolumeWidget, volumeWidget, "volume");
if (usePitchWidget && pitchWidget) toggleWidgetState(usePitchWidget, pitchWidget, "pitch");
if (useEmotionWidget && emotionWidget) toggleWidgetState(useEmotionWidget, emotionWidget, "emotion");
if (useToneWidget && toneWidget) toggleWidgetState(useToneWidget, toneWidget, "tone");
}
function acceleratorOptionsToggleHandler(acceleratorNode) {
@@ -2620,6 +2697,9 @@ function audioModelSearchFilterHandler(audioModelSearchNode) {
"Ace": [
"runware:ace-step@0 (ACE Step v1 3.5B)",
],
"MiniMax": [
"minimax:speech@2.8 (MiniMax Speech 2.8)",
],
};
function filterModelList() {
@@ -3057,6 +3137,16 @@ function briaProviderSettingsToggleHandler(briaNode) {
const autoTrimWidget = briaNode.widgets.find(w => w.name === "autoTrim");
const usePreserveAudioWidget = briaNode.widgets.find(w => w.name === "usePreserveAudio");
const preserveAudioWidget = briaNode.widgets.find(w => w.name === "preserveAudio");
const useSeasonWidget = briaNode.widgets.find(w => w.name === "useSeason");
const seasonWidget = briaNode.widgets.find(w => w.name === "season");
const useEditWidget = briaNode.widgets.find(w => w.name === "useEdit");
const editWidget = briaNode.widgets.find(w => w.name === "edit");
const useColorWidget = briaNode.widgets.find(w => w.name === "useColor");
const colorWidget = briaNode.widgets.find(w => w.name === "color");
const useLightDirectionWidget = briaNode.widgets.find(w => w.name === "useLightDirection");
const lightDirectionWidget = briaNode.widgets.find(w => w.name === "lightDirection");
const useLightTypeWidget = briaNode.widgets.find(w => w.name === "useLightType");
const lightTypeWidget = briaNode.widgets.find(w => w.name === "lightType");
// Helper function to toggle widget enabled state (exact same pattern)
function toggleWidgetState(useWidget, paramWidget, paramName) {
@@ -3168,6 +3258,26 @@ function briaProviderSettingsToggleHandler(briaNode) {
if (usePreserveAudioWidget && preserveAudioWidget) {
toggleWidgetState(usePreserveAudioWidget, preserveAudioWidget, "preserveAudio");
}
if (useSeasonWidget && seasonWidget) {
toggleWidgetState(useSeasonWidget, seasonWidget, "season");
}
if (useEditWidget && editWidget) {
toggleWidgetState(useEditWidget, editWidget, "edit");
}
if (useColorWidget && colorWidget) {
toggleWidgetState(useColorWidget, colorWidget, "color");
}
if (useLightDirectionWidget && lightDirectionWidget) {
toggleWidgetState(useLightDirectionWidget, lightDirectionWidget, "lightDirection");
}
if (useLightTypeWidget && lightTypeWidget) {
toggleWidgetState(useLightTypeWidget, lightTypeWidget, "lightType");
}
}
function audioInputToggleHandler(audioInputNode) {
@@ -3689,6 +3799,8 @@ export {
upscalerToggleHandler,
videoUpscalerToggleHandler,
audioInferenceToggleHandler,
audioInferenceSpeechToggleHandler,
audioSettingsToggleHandler,
acceleratorOptionsToggleHandler,
bytedanceProviderSettingsToggleHandler,
xaiProviderSettingsToggleHandler,
+51 -18
View File
@@ -51,23 +51,28 @@ class RunwareAudioInference:
"default": False,
"tooltip": "Enable/disable sampleRate parameter in API request"
}),
"sampleRate": ("INT", {
"default": 22050,
"min": 8000,
"max": 48000,
"step": 1,
"tooltip": "Sample rate of the generated audio in Hz (8000-48000)"
"sampleRate": ([8000, 16000, 22050, 24000, 32000, 44100], {
"default": 32000,
"tooltip": "Audio sample rate in Hz. Supported: 8000, 16000, 22050, 24000, 32000, 44100."
}),
"useBitrate": ("BOOLEAN", {
"default": False,
"tooltip": "Enable/disable bitrate parameter in API request"
"tooltip": "Enable/disable bitrate parameter in API request (MP3 only)"
}),
"bitrate": ("INT", {
"default": 32,
"min": 32,
"max": 320,
"step": 32,
"tooltip": "Bitrate of the generated audio in kbps (32-320)"
"bitrate": ([32, 64, 128, 256], {
"default": 128,
"tooltip": "Audio bitrate in kbps. Allowed: 32, 64, 128, 256. Only applies to MP3 format."
}),
"useChannels": ("BOOLEAN", {
"default": False,
"tooltip": "Enable/disable channels parameter in API request"
}),
"channels": ("INT", {
"default": 2,
"min": 1,
"max": 2,
"step": 1,
"tooltip": "Number of audio channels (1=mono, 2=stereo)"
}),
"outputType": (["URL", "dataURI", "base64Data"], {
"default": "URL",
@@ -131,7 +136,13 @@ class RunwareAudioInference:
"tooltip": "Custom inputs for audio generation (e.g., video URL for audio extraction)"
}),
"settings": ("RUNWAREAUDIOSETTINGS", {
"tooltip": "Connect Runware Audio Settings for lyrics, guidanceType, etc."
"tooltip": "Connect Runware Audio Inference Settings for lyrics, guidanceType, etc."
}),
"speech": ("RUNWARESPEECH", {
"tooltip": "Connect Runware Audio Inference Speech for speech synthesis (e.g. Minimax)"
}),
"voiceModify": ("RUNWAREVOICEMODIFY", {
"tooltip": "Connect Runware Audio Inference Settings Voice Modify for pitch, intensity, timbre, sound effects"
}),
"providerSettings": ("RUNWAREPROVIDERSETTINGS", {
"tooltip": "Provider-specific configuration settings"
@@ -253,10 +264,12 @@ class RunwareAudioInference:
"model": kwargs.get("model", ""),
"duration": kwargs.get("duration", 30),
"useDuration": kwargs.get("useDuration", True),
"sampleRate": kwargs.get("sampleRate", 22050),
"sampleRate": int(kwargs.get("sampleRate", 32000)),
"useSampleRate": kwargs.get("useSampleRate", False),
"bitrate": kwargs.get("bitrate", 32),
"bitrate": kwargs.get("bitrate", 128),
"useBitrate": kwargs.get("useBitrate", False),
"channels": kwargs.get("channels", 2),
"useChannels": kwargs.get("useChannels", False),
"outputType": kwargs.get("outputType", "URL"),
"outputFormat": kwargs.get("outputFormat", "MP3"),
"negativePrompt": kwargs.get("negativePrompt", ""),
@@ -271,6 +284,8 @@ class RunwareAudioInference:
"useCFGScale": kwargs.get("useCFGScale", False),
"inputs": kwargs.get("inputs", None),
"settings": kwargs.get("settings", None),
"speech": kwargs.get("speech", None),
"voiceModify": kwargs.get("voiceModify", None),
"providerSettings": kwargs.get("providerSettings", None),
}
@@ -305,9 +320,13 @@ class RunwareAudioInference:
# Build audioSettings conditionally based on use flags
audioSettings = {}
if params["useSampleRate"]:
audioSettings["sampleRate"] = params["sampleRate"]
audioSettings["sampleRate"] = int(params["sampleRate"])
if params["useBitrate"]:
audioSettings["bitrate"] = params["bitrate"]
_br = int(params["bitrate"])
_allowed_bitrates = (32, 64, 128, 256)
audioSettings["bitrate"] = _br if _br in _allowed_bitrates else min(_allowed_bitrates, key=lambda x: abs(x - _br))
if params["useChannels"]:
audioSettings["channels"] = params["channels"]
# Only add audioSettings if at least one setting is enabled
if audioSettings:
@@ -356,6 +375,20 @@ class RunwareAudioInference:
if params["settings"] is not None and isinstance(params["settings"], dict) and len(params["settings"]) > 0:
genConfig[0]["settings"] = params["settings"]
print(f"[DEBUG] Audio settings merged: {rwUtils.sanitize_for_logging(params['settings'])}")
# Handle speech (from Runware Audio Inference Speech node)
if params["speech"] is not None and isinstance(params["speech"], dict) and len(params["speech"]) > 0:
genConfig[0]["speech"] = params["speech"]
print(f"[DEBUG] Speech merged: {rwUtils.sanitize_for_logging(params['speech'])}")
# Handle voiceModify (from Runware Audio Inference Settings Voice Modify node) -> settings.voiceModify
if params["voiceModify"] is not None and isinstance(params["voiceModify"], dict) and len(params["voiceModify"]) > 0:
if "settings" not in genConfig[0]:
genConfig[0]["settings"] = {}
vm = dict(params["voiceModify"])
genConfig[0]["settings"]["voiceModify"] = vm
print(f"[DEBUG] Voice modify merged: {rwUtils.sanitize_for_logging(vm)}")
# Handle inputs - merge custom inputs from Audio Inference Inputs node
if params["inputs"] is not None:
+115
View File
@@ -0,0 +1,115 @@
"""
Runware Audio Inference Speech node: builds the speech payload for Runware Audio Inference.
Connect its output to the "speech" input of Runware Audio Inference for speech synthesis (e.g. Minimax).
"""
from typing import Dict, Any
class RunwareAudioInferenceSpeech:
"""Builds speech payload (text, voice, speed, volume, pitch?, emotion?, tone?) for Runware Audio Inference."""
EMOTIONS = [
"happy", "sad", "angry", "fearful", "disgusted", "surprised",
"calm", "fluent", "whisper",
]
def __init__(self):
pass
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"text": ("STRING", {
"multiline": True,
"default": "Hello, this is a test of the speech synthesis model.",
"tooltip": "Text to synthesize as speech (speech.text)",
}),
"voice": ("STRING", {
"default": "English_Whispering_girl",
"tooltip": "Voice identifier - see System Voice ID List (speech.voice)",
}),
},
"optional": {
"useSpeed": ("BOOLEAN", {"default": True, "tooltip": "Include speed (speech.speed)"}),
"speed": ("FLOAT", {
"default": 1.0,
"min": 0.5,
"max": 2.0,
"step": 0.01,
"tooltip": "Speech rate multiplier (speech.speed)",
}),
"useVolume": ("BOOLEAN", {"default": True, "tooltip": "Include volume (speech.volume)"}),
"volume": ("FLOAT", {
"default": 1.0,
"min": 1.0,
"max": 10.0,
"step": 0.1,
"tooltip": "Volume level 1-10 (speech.volume)",
}),
"usePitch": ("BOOLEAN", {"default": False, "tooltip": "Include pitch (speech.pitch)"}),
"pitch": ("FLOAT", {
"default": 0.0,
"min": -12.0,
"max": 12.0,
"step": 0.1,
"tooltip": "Pitch multiplier -12 to 12 (speech.pitch)",
}),
"useEmotion": ("BOOLEAN", {"default": False, "tooltip": "Include emotion (not available for speech.turbo)"}),
"emotion": (cls.EMOTIONS, {"default": "calm", "tooltip": "Emotion for speech (speech.emotion)"}),
"useTone": ("BOOLEAN", {"default": False, "tooltip": "Include pronunciation dictionary (speech.tone)"}),
"tone": ("STRING", {
"multiline": True,
"default": "",
"placeholder": "omg/oh my god\nother/other expansion",
"tooltip": "Pronunciation dictionary, one mapping per line (e.g. omg/oh my god)",
}),
}
}
RETURN_TYPES = ("RUNWARESPEECH",)
RETURN_NAMES = ("speech",)
FUNCTION = "createSpeech"
CATEGORY = "Runware/Audio"
DESCRIPTION = "Build speech parameters for Runware Audio Inference. Connect output to the 'speech' input of Runware Audio Inference."
def createSpeech(self, **kwargs) -> tuple:
"""Build the speech object for the API (connect to Runware Audio Inference 'speech' input)."""
text = (kwargs.get("text") or "").strip()
voice = (kwargs.get("voice") or "").strip()
use_speed = kwargs.get("useSpeed", True)
speed = float(kwargs.get("speed", 1.0))
use_volume = kwargs.get("useVolume", True)
volume = float(kwargs.get("volume", 1.0))
use_pitch = kwargs.get("usePitch", False)
pitch = float(kwargs.get("pitch", 0.0))
use_emotion = kwargs.get("useEmotion", False)
emotion = kwargs.get("emotion", "calm")
use_tone = kwargs.get("useTone", False)
tone_str = kwargs.get("tone", "") or ""
speech: Dict[str, Any] = {"text": text, "voice": voice}
if use_speed:
speech["speed"] = speed
if use_volume:
speech["volume"] = volume
if use_pitch:
speech["pitch"] = pitch
if use_emotion:
speech["emotion"] = emotion
if use_tone and tone_str.strip():
tone_lines = [s.strip() for s in tone_str.replace(",", "\n").split("\n") if s.strip()]
if tone_lines:
speech["tone"] = tone_lines
return (speech,)
NODE_CLASS_MAPPINGS = {
"RunwareAudioInferenceSpeech": RunwareAudioInferenceSpeech,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"RunwareAudioInferenceSpeech": "Runware Audio Inference Speech",
}
+4
View File
@@ -17,6 +17,9 @@ class RunwareAudioModelSearch:
"Ace": [
"runware:ace-step@0 (ACE Step v1 3.5B)",
],
"MiniMax": [
"minimax:speech@2.8 (MiniMax Speech 2.8)",
],
}
MODEL_PROVIDERS = [
@@ -25,6 +28,7 @@ class RunwareAudioModelSearch:
"KlingAI",
"Mirelo",
"Ace",
"MiniMax",
]
@classmethod
+100 -68
View File
@@ -1,68 +1,100 @@
"""
Runware Audio Settings Node
Provides lyrics and guidanceType settings for Runware Audio Inference
"""
from typing import Dict, Any
class RunwareAudioSettings:
"""Runware Audio Settings Node"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {},
"optional": {
"useLyrics": ("BOOLEAN", {
"tooltip": "Enable to include lyrics in audio generation settings",
"default": False,
}),
"lyrics": ("STRING", {
"multiline": True,
"default": "",
"placeholder": "[verse] ... [chorus] ... (format like genius.com)",
"tooltip": "Lyrics for the audio generation. Format like lyrics from genius.com with [verse], [chorus], [refrain], etc.",
}),
"useGuidanceType": ("BOOLEAN", {
"tooltip": "Enable to include guidanceType (controls how guidance value is used)",
"default": False,
}),
"guidanceType": (["apg", "cfg"], {
"tooltip": "Controls how the guidance value is used. apg = Adversarial Perceptual Guidance, cfg = Classifier-Free Guidance",
"default": "apg",
}),
}
}
RETURN_TYPES = ("RUNWAREAUDIOSETTINGS",)
RETURN_NAMES = ("settings",)
FUNCTION = "createSettings"
CATEGORY = "Runware/Audio"
DESCRIPTION = "Configure audio generation settings (lyrics, guidanceType) for Runware Audio Inference. Connect to Runware Audio Inference node."
def createSettings(self, **kwargs) -> tuple[Dict[str, Any]]:
"""Create audio settings dict for API"""
use_lyrics = kwargs.get("useLyrics", False)
lyrics = kwargs.get("lyrics", "")
use_guidance_type = kwargs.get("useGuidanceType", False)
guidance_type = kwargs.get("guidanceType", "apg")
settings: Dict[str, Any] = {}
if use_lyrics and lyrics and lyrics.strip():
settings["lyrics"] = lyrics.strip()
if use_guidance_type:
settings["guidanceType"] = guidance_type
return (settings,)
NODE_CLASS_MAPPINGS = {
"RunwareAudioSettings": RunwareAudioSettings,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"RunwareAudioSettings": "Runware Audio Settings",
}
"""
Runware Audio Inference Settings Node
Provides lyrics and guidanceType settings for Runware Audio Inference
"""
from typing import Dict, Any
class RunwareAudioSettings:
"""Runware Audio Inference Settings Node"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {},
"optional": {
"useLyrics": ("BOOLEAN", {
"tooltip": "Enable to include lyrics in audio generation settings",
"default": False,
}),
"lyrics": ("STRING", {
"multiline": True,
"default": "",
"placeholder": "[verse] ... [chorus] ... (format like genius.com)",
"tooltip": "Lyrics for the audio generation. Format like lyrics from genius.com with [verse], [chorus], [refrain], etc.",
}),
"useGuidanceType": ("BOOLEAN", {
"tooltip": "Enable to include guidanceType (controls how guidance value is used)",
"default": False,
}),
"guidanceType": (["apg", "cfg"], {
"tooltip": "Controls how the guidance value is used. apg = Adversarial Perceptual Guidance, cfg = Classifier-Free Guidance",
"default": "apg",
}),
"useLanguageBoost": ("BOOLEAN", {
"tooltip": "Enable to include languageBoost (language detection setting) in audio generation settings",
"default": False,
}),
"languageBoost": ([
"auto", "zh", "yue", "en", "ar", "ru", "es", "fr", "pt", "de", "tr", "nl", "uk",
"vi", "id", "ja", "it", "ko", "th", "pl", "ro", "el", "cs", "fi", "hi", "bg", "da",
"he", "ms", "fa", "sk", "sv", "hr", "fil", "hu", "no", "sl", "ca", "nn", "ta", "af",
], {
"tooltip": "Language detection setting. Codes: zh, yue, en, ar, ru, es, fr, pt, de, tr, nl, uk, vi, id, ja, it, ko, th, pl, ro, el, cs, fi, hi, bg, da, he, ms, fa, sk, sv, hr, fil, hu, no, sl, ca, nn, ta, af, auto",
"default": "auto",
}),
"useTurbo": ("BOOLEAN", {
"tooltip": "Enable to include turbo (select turbo model or not) in audio generation settings",
"default": False,
}),
"turbo": ("BOOLEAN", {
"tooltip": "When enabled, use turbo model. Only used when 'Use Turbo' is enabled.",
"default": False,
"label_on": "true",
"label_off": "false",
}),
}
}
RETURN_TYPES = ("RUNWAREAUDIOSETTINGS",)
RETURN_NAMES = ("settings",)
FUNCTION = "createSettings"
CATEGORY = "Runware/Audio"
DESCRIPTION = "Configure audio generation settings (lyrics, guidanceType, languageBoost, turbo) for Runware Audio Inference. Connect to Runware Audio Inference node."
def createSettings(self, **kwargs) -> tuple[Dict[str, Any]]:
"""Create audio settings dict for API"""
use_lyrics = kwargs.get("useLyrics", False)
lyrics = kwargs.get("lyrics", "")
use_guidance_type = kwargs.get("useGuidanceType", False)
guidance_type = kwargs.get("guidanceType", "apg")
use_language_boost = kwargs.get("useLanguageBoost", False)
language_boost = kwargs.get("languageBoost", "auto")
use_turbo = kwargs.get("useTurbo", False)
turbo = kwargs.get("turbo", False)
settings: Dict[str, Any] = {}
if use_lyrics and lyrics and lyrics.strip():
settings["lyrics"] = lyrics.strip()
if use_guidance_type:
settings["guidanceType"] = guidance_type
if use_language_boost:
settings["languageBoost"] = language_boost
if use_turbo:
settings["turbo"] = bool(turbo) # API requires true/false
return (settings,)
NODE_CLASS_MAPPINGS = {
"RunwareAudioSettings": RunwareAudioSettings,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"RunwareAudioSettings": "Runware Audio Inference Settings",
}
+98
View File
@@ -0,0 +1,98 @@
"""
Runware Audio Inference Settings Voice Modify node.
Outputs settings.voiceModify (pitch, intensity, timbre, soundEffects) for Runware Audio Inference.
"""
from typing import Dict, Any
SOUND_EFFECTS = ["", "spacious_echo", "auditorium_echo", "lofi_telephone", "robotic"]
class RunwareAudioSettingsVoiceModify:
"""Runware Audio Inference Settings Voice Modify – pitch, intensity, timbre, sound effects."""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {},
"optional": {
"usePitch": ("BOOLEAN", {
"default": False,
"tooltip": "Include pitch in voice modification",
}),
"pitch": ("INT", {
"default": 0,
"min": -100,
"max": 100,
"step": 1,
"tooltip": "Voice pitch modification (settings.voiceModify.pitch)",
}),
"useIntensity": ("BOOLEAN", {
"default": False,
"tooltip": "Include intensity in voice modification",
}),
"intensity": ("INT", {
"default": 0,
"min": -100,
"max": 100,
"step": 1,
"tooltip": "Voice intensity modification (settings.voiceModify.intensity)",
}),
"useTimbre": ("BOOLEAN", {
"default": False,
"tooltip": "Include timbre in voice modification",
}),
"timbre": ("INT", {
"default": 0,
"min": -100,
"max": 100,
"step": 1,
"tooltip": "Voice timbre modification (settings.voiceModify.timbre)",
}),
"useSoundEffects": ("BOOLEAN", {
"default": False,
"tooltip": "Include sound effect in voice modification",
}),
"soundEffects": (SOUND_EFFECTS, {
"default": "",
"tooltip": "Sound effect: spacious_echo, auditorium_echo, lofi_telephone, robotic",
}),
}
}
RETURN_TYPES = ("RUNWAREVOICEMODIFY",)
RETURN_NAMES = ("voiceModify",)
FUNCTION = "createVoiceModify"
CATEGORY = "Runware/Audio"
DESCRIPTION = "Voice modification settings (pitch, intensity, timbre, sound effects). Connect to Runware Audio Inference voiceModify input."
def createVoiceModify(self, **kwargs) -> tuple:
"""Build voiceModify dict for settings.voiceModify. Only includes keys when the corresponding use toggle is on."""
use_pitch = kwargs.get("usePitch", False)
pitch = kwargs.get("pitch", 0)
use_intensity = kwargs.get("useIntensity", False)
intensity = kwargs.get("intensity", 0)
use_timbre = kwargs.get("useTimbre", False)
timbre = kwargs.get("timbre", 0)
use_sound_effects = kwargs.get("useSoundEffects", False)
sound_effects = (kwargs.get("soundEffects") or "").strip()
voice_modify: Dict[str, Any] = {}
if use_pitch:
voice_modify["pitch"] = pitch
if use_intensity:
voice_modify["intensity"] = intensity
if use_timbre:
voice_modify["timbre"] = timbre
if use_sound_effects and sound_effects:
voice_modify["soundEffects"] = sound_effects
return (voice_modify,)
NODE_CLASS_MAPPINGS = {
"RunwareAudioSettingsVoiceModify": RunwareAudioSettingsVoiceModify,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"RunwareAudioSettingsVoiceModify": "Runware Audio Inference Settings Voice Modify",
}
@@ -1,13 +1,13 @@
"""
Runware Bria Image Provider Settings Node
Provides Bria-specific settings for image generation
Runware Bria Provider Settings Node
Provides Bria-specific settings for image/video generation
"""
import torch
from typing import Optional, Dict, Any
class RunwareBriaProviderSettings:
"""Runware Bria Image Provider Settings Node"""
"""Runware Bria Provider Settings Node"""
@classmethod
def INPUT_TYPES(cls):
@@ -206,7 +206,7 @@ class RunwareBriaProviderSettings:
RETURN_NAMES = ("providerSettings",)
FUNCTION = "create_provider_settings"
CATEGORY = "Runware/Provider Settings"
DESCRIPTION = "Configure Bria-specific provider settings for image generation and background replacement including medium type, prompt enhancement, image enhancement, content moderation options, and background replace mode settings."
DESCRIPTION = "Configure Bria-specific provider settings for image generation, background replacement, and video operations including medium type, prompt enhancement, content moderation, and background replace mode."
def create_provider_settings(self, **kwargs) -> tuple[Dict[str, Any]]:
"""Create Bria provider settings"""
@@ -325,11 +325,9 @@ class RunwareBriaProviderSettings:
if useColor:
settings["color"] = color
# Add lightDirection only if useLightDirection is enabled (maps to /relight
# Add relight params (Bria API expects camelCase)
if useLightDirection:
settings["lightDirection"] = lightDirection
# Add lightType only if useLightType is enabled (maps to /relight)
if useLightType:
settings["lightType"] = lightType
@@ -350,4 +348,3 @@ NODE_CLASS_MAPPINGS = {
NODE_DISPLAY_NAME_MAPPINGS = {
"RunwareBriaProviderSettings": "Runware Bria Provider Settings",
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long