Merge pull request #34 from Runware/fix-LTX/Veo
Add Lightricks LTX Fast model and fix generateAudio provider settings
This commit is contained in:
@@ -47,6 +47,7 @@ from .modules.lightricksProviderSettings import RunwareLightricksProviderSetting
|
||||
from .modules.vectorize import vectorize
|
||||
from .modules.videoBgRemoval import videoBgRemoval
|
||||
from .modules.videoUpscaler import videoUpscaler
|
||||
from .modules.videoInputsReferences import videoInputsReferences
|
||||
|
||||
RUNWARE_COMFYUI_VERSION = "1.4.0 Beta"
|
||||
|
||||
@@ -108,6 +109,7 @@ NODE_CLASS_MAPPINGS = {
|
||||
"Runware Vectorize": vectorize,
|
||||
"Runware Video Background Removal": videoBgRemoval,
|
||||
"Runware Video Upscaler": videoUpscaler,
|
||||
"Runware Video Inputs References": videoInputsReferences,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
|
||||
@@ -96,6 +96,7 @@ const RUNWARE_NODE_TYPES = {
|
||||
VECTORIZE: "Runware Vectorize",
|
||||
VIDEOBGREMOVAL: "Runware Video Background Removal",
|
||||
VIDEOUPSCALER: "Runware Video Upscaler",
|
||||
VIDEOINPUTSREFERENCES: "Runware Video Inputs References",
|
||||
};
|
||||
|
||||
const RUNWARE_NODE_PROPS = {
|
||||
@@ -291,6 +292,10 @@ const RUNWARE_NODE_PROPS = {
|
||||
[RUNWARE_NODE_TYPES.VIDEOUPSCALER]: {
|
||||
bgColor: DEFAULT_BGCOLOR,
|
||||
},
|
||||
[RUNWARE_NODE_TYPES.VIDEOINPUTSREFERENCES]: {
|
||||
bgColor: DEFAULT_BGCOLOR,
|
||||
colorModeOnly: true,
|
||||
},
|
||||
};
|
||||
|
||||
export {
|
||||
|
||||
@@ -14,7 +14,7 @@ class RunwareLightricksProviderSettings:
|
||||
"required": {},
|
||||
"optional": {
|
||||
"generateAudio": ("BOOLEAN", {
|
||||
"tooltip": "Enable to generate audio for the video. Default: false.",
|
||||
"tooltip": "Enable to generate audio for the video. Disable to generate video without audio. Default: false.",
|
||||
"default": False,
|
||||
}),
|
||||
}
|
||||
@@ -32,11 +32,10 @@ class RunwareLightricksProviderSettings:
|
||||
generateAudio = kwargs.get("generateAudio", False)
|
||||
|
||||
# Build settings dictionary
|
||||
settings = {}
|
||||
|
||||
# Add generateAudio if it's True
|
||||
if generateAudio:
|
||||
settings["generateAudio"] = generateAudio
|
||||
# Always include generateAudio to ensure it's explicitly set
|
||||
settings = {
|
||||
"generateAudio": generateAudio
|
||||
}
|
||||
|
||||
return (settings,)
|
||||
|
||||
|
||||
@@ -327,6 +327,7 @@ class txt2vid:
|
||||
genConfig[0]["inputs"][key] = value
|
||||
|
||||
print(f"[Debugging] Video inference inputs merged: {inputs}")
|
||||
print(f"[Debugging] Final genConfig inputs: {genConfig[0].get('inputs', {})}")
|
||||
|
||||
# Handle providerSettings - extract provider name from model and merge with custom settings
|
||||
if providerSettings is not None:
|
||||
|
||||
@@ -15,6 +15,9 @@ class videoInferenceInputs:
|
||||
"Mask": ("IMAGE", {
|
||||
"tooltip": "Mask image to specify a specific subject in the image to speak. Use white/black mask format."
|
||||
}),
|
||||
"References": ("RUNWAREVIDEOINPUTSREFERENCES", {
|
||||
"tooltip": "Connect the Video Inputs References node to provide reference images."
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +31,7 @@ class videoInferenceInputs:
|
||||
image = kwargs.get("Image", None)
|
||||
audio = kwargs.get("Audio", None)
|
||||
mask = kwargs.get("Mask", None)
|
||||
references = kwargs.get("References", None)
|
||||
|
||||
inputs = {}
|
||||
|
||||
@@ -42,5 +46,8 @@ class videoInferenceInputs:
|
||||
mask_uuid = rwUtils.convertTensor2IMG(mask)
|
||||
inputs["mask"] = mask_uuid
|
||||
|
||||
if references is not None and len(references) > 0:
|
||||
inputs["references"] = references
|
||||
|
||||
return (inputs,)
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
from .utils import runwareUtils as rwUtils
|
||||
from typing import List, Dict, Any
|
||||
|
||||
class videoInputsReferences:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {},
|
||||
"optional": {
|
||||
"Image1": ("IMAGE", {
|
||||
"tooltip": "First reference image.",
|
||||
}),
|
||||
"Type1": ("STRING", {
|
||||
"tooltip": "Type for the first reference (e.g., 'asset'). Leave empty to omit.",
|
||||
"default": "",
|
||||
}),
|
||||
"Image2": ("IMAGE", {
|
||||
"tooltip": "Second reference image.",
|
||||
}),
|
||||
"Type2": ("STRING", {
|
||||
"tooltip": "Type for the second reference (e.g., 'asset'). Leave empty to omit.",
|
||||
"default": "",
|
||||
}),
|
||||
"Image3": ("IMAGE", {
|
||||
"tooltip": "Third reference image.",
|
||||
}),
|
||||
"Type3": ("STRING", {
|
||||
"tooltip": "Type for the third reference (e.g., 'asset'). Leave empty to omit.",
|
||||
"default": "",
|
||||
}),
|
||||
"Image4": ("IMAGE", {
|
||||
"tooltip": "Fourth reference image.",
|
||||
}),
|
||||
"Type4": ("STRING", {
|
||||
"tooltip": "Type for the fourth reference (e.g., 'asset'). Leave empty to omit.",
|
||||
"default": "",
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
DESCRIPTION = "Configure multiple reference images with optional types for video inference inputs."
|
||||
FUNCTION = "createReferences"
|
||||
RETURN_TYPES = ("RUNWAREVIDEOINPUTSREFERENCES",)
|
||||
RETURN_NAMES = ("Video Inputs References",)
|
||||
CATEGORY = "Runware"
|
||||
|
||||
def createReferences(self, **kwargs) -> tuple[List[Dict[str, Any]]]:
|
||||
references = []
|
||||
|
||||
for i in range(1, 5):
|
||||
image_key = f"Image{i}"
|
||||
type_key = f"Type{i}"
|
||||
|
||||
image = kwargs.get(image_key)
|
||||
ref_type = kwargs.get(type_key, "")
|
||||
|
||||
if image is not None:
|
||||
# Convert image tensor to URL
|
||||
image_url = rwUtils.convertTensor2IMG(image)
|
||||
|
||||
reference = {"image": image_url}
|
||||
|
||||
# Only add type if it's not empty
|
||||
if ref_type and ref_type.strip() != "":
|
||||
reference["type"] = ref_type.strip()
|
||||
|
||||
references.append(reference)
|
||||
|
||||
return (references,)
|
||||
|
||||
# Node class mappings
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"RunwareVideoInputsReferences": videoInputsReferences,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"RunwareVideoInputsReferences": "Runware Video Inputs References",
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ class videoModelSearch:
|
||||
"google:2@0 (Veo 2.0)",
|
||||
"google:3@0 (Veo 3.0)",
|
||||
"google:3@1 (Veo 3.0 Fast)",
|
||||
"google:3@2 (Veo 3.1)",
|
||||
"google:3@3 (Veo 3.1 Pro)",
|
||||
],
|
||||
"Seedance": [
|
||||
"bytedance:2@1 (Seedance 1.0 Pro)",
|
||||
@@ -51,7 +53,8 @@ class videoModelSearch:
|
||||
"openai:3@0 (OpenAI Sora 3.0)",
|
||||
],
|
||||
"Lightricks": [
|
||||
"lightricks:2@1 (LTX)",
|
||||
"lightricks:2@0 (LTX Fast)",
|
||||
"lightricks:2@1 (LTX Pro)",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -73,6 +76,8 @@ class videoModelSearch:
|
||||
"google:2@0": {"width": 1280, "height": 720}, # Veo 2.0
|
||||
"google:3@0": {"width": 1280, "height": 720}, # Veo 3.0
|
||||
"google:3@1": {"width": 1280, "height": 720}, # Veo 3.0 Fast
|
||||
"google:3@2": {"width": 1280, "height": 720}, # Veo 3.1
|
||||
"google:3@3": {"width": 1280, "height": 720}, # Veo 3.1 Pro
|
||||
|
||||
# Seedance Models
|
||||
"bytedance:2@1": {"width": 864, "height": 480}, # Seedance 1.0 Pro
|
||||
@@ -107,7 +112,8 @@ class videoModelSearch:
|
||||
"openai:3@0": {"width": 1280, "height": 720}, # OpenAI Sora 3.0
|
||||
|
||||
# Lightricks Models
|
||||
"lightricks:2@1": {"width": 1920, "height": 1080}, # Lightricks v2.1
|
||||
"lightricks:2@0": {"width": 1920, "height": 1080}, # Lightricks v2.0 Fast
|
||||
"lightricks:2@1": {"width": 1920, "height": 1080}, # Lightricks v2.1 Pro
|
||||
}
|
||||
|
||||
|
||||
|
||||
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
Reference in New Issue
Block a user