Merge main into feature-seedream5image/prunaVideo/vectorizeProviderSettingsRecraft
This commit is contained in:
+51
-18
@@ -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:
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
@@ -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
@@ -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",
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user