feat: Add Vidu Provider Settings node with template support

- Create new 'Runware Vidu Provider Settings' node
- Support Vidu-specific parameters: bgm, style, movementAmplitude
- Add template configuration with name, area, and beast parameters
- Integrate with video inference workflows via RUNWAREPROVIDERSETTINGS
- Add to node mappings and frontend configuration
- Provide comprehensive Vidu video generation control
This commit is contained in:
Sirshendu Ganguly
2025-10-01 13:35:03 -04:00
parent e589062ea4
commit c08eae0026
4 changed files with 90 additions and 0 deletions
+2
View File
@@ -36,6 +36,7 @@ from .modules.audioSections import RunwareAudioSections
from .modules.elevenlabsProviderSettings import RunwareElevenLabsProviderSettings
from .modules.elevenlabsProviderSettingsSections import RunwareElevenLabsProviderSettingsSections
from .modules.acceleratorOptions import acceleratorOptions
from .modules.viduProviderSettings import RunwareViduProviderSettings
RUNWARE_COMFYUI_VERSION = "1.4.0 Beta"
@@ -86,6 +87,7 @@ NODE_CLASS_MAPPINGS = {
"Runware ElevenLabs Provider Settings": RunwareElevenLabsProviderSettings,
"Runware ElevenLabs Provider Settings Sections": RunwareElevenLabsProviderSettingsSections,
"Runware Accelerator Options": acceleratorOptions,
"Runware Vidu Provider Settings": RunwareViduProviderSettings,
}
NODE_DISPLAY_NAME_MAPPINGS = {
+5
View File
@@ -86,6 +86,7 @@ const RUNWARE_NODE_TYPES = {
BYTEDANCEPROVIDERSETTINGS: "Runware Bytedance Provider Settings",
ELEVENLABSPROVIDERSETTINGS: "Runware ElevenLabs Provider Settings",
ELEVENLABSPROVIDERSETTINGSSECTIONS: "Runware ElevenLabs Provider Settings Sections",
VIDUPROVIDERSETTINGS: "Runware Vidu Provider Settings",
};
const RUNWARE_NODE_PROPS = {
@@ -248,6 +249,10 @@ const RUNWARE_NODE_PROPS = {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
[RUNWARE_NODE_TYPES.VIDUPROVIDERSETTINGS]: {
bgColor: DEFAULT_BGCOLOR,
colorModeOnly: true,
},
};
export {
+82
View File
@@ -0,0 +1,82 @@
from .utils import runwareUtils as rwUtils
class RunwareViduProviderSettings:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {},
"optional": {
# BGM parameter
"bgm": ("BOOLEAN", {
"tooltip": "Enable background music for video generation",
"default": False,
}),
# Style parameter
"style": ("STRING", {
"tooltip": "Video style configuration for Vidu models",
"default": "",
}),
# Movement amplitude parameter
"movementAmplitude": ("STRING", {
"tooltip": "Controls the amplitude/intensity of movement in the generated video",
"default": "",
}),
# Template parameters
"templateName": ("STRING", {
"tooltip": "Template name for video generation",
"default": "",
}),
"templateArea": ("STRING", {
"tooltip": "Template area configuration",
"default": "",
}),
"templateBeast": ("STRING", {
"tooltip": "Template beast configuration",
"default": "",
}),
},
}
DESCRIPTION = "Configure Vidu-specific provider settings for video generation. Includes background music, style, movement amplitude, and template configurations."
FUNCTION = "viduProviderSettings"
RETURN_TYPES = ("RUNWAREPROVIDERSETTINGS",)
RETURN_NAMES = ("Vidu Provider Settings",)
CATEGORY = "Runware"
def viduProviderSettings(self, **kwargs):
# Get all optional parameters
bgm = kwargs.get("bgm")
style = kwargs.get("style", "")
movementAmplitude = kwargs.get("movementAmplitude", "")
templateName = kwargs.get("templateName", "")
templateArea = kwargs.get("templateArea", "")
templateBeast = kwargs.get("templateBeast", "")
# Build provider settings dictionary
providerSettings = {}
# Add basic parameters if specified
if bgm is not None:
providerSettings["bgm"] = bgm
if style:
providerSettings["style"] = style
if movementAmplitude:
providerSettings["movementAmplitude"] = movementAmplitude
# Build template object if any template parameters are provided
template = {}
if templateName:
template["name"] = templateName
if templateArea:
template["area"] = templateArea
if templateBeast:
template["beast"] = templateBeast
# Add template to provider settings if any template parameters were specified
if template:
providerSettings["template"] = template
return (providerSettings,)
File diff suppressed because one or more lines are too long