diff --git a/__init__.py b/__init__.py index 0a38756..f68fb7e 100644 --- a/__init__.py +++ b/__init__.py @@ -33,6 +33,7 @@ from .modules.imageRegionalPromptingAdvancedFeatureRegions import RunwareRegionalPromptingAdvancedFeatureRegions from .modules.videoInference import txt2vid from .modules.videoInferenceSpeechInput import RunwareVideoInferenceSpeechInput +from .modules.videoInferenceLora import RunwareVideoInferenceLora from .modules.videoModelSearch import videoModelSearch from .modules.videoSettings import RunwareVideoSettings from .modules.videoInferenceSettingsTts import RunwareVideoInferenceSettingsTts @@ -225,6 +226,7 @@ "Runware Video Inference Elements": RunwareVideoInferenceElements, "Runware Video Inference Elements Combine": RunwareVideoInferenceElementsCombine, "Runware Video Inference Speech Input": RunwareVideoInferenceSpeechInput, + "Runware Video Inference Lora": RunwareVideoInferenceLora, "Runware Video Inference Settings": RunwareVideoSettings, "Runware Video Inference Settings TTS": RunwareVideoInferenceSettingsTts, "Runware Video Inference Settings Active Speaker Detection": RunwareVideoInferenceSettingsActiveSpeakerDetection, diff --git a/clientlibs/types.js b/clientlibs/types.js index 7cbe2ba..b31d5fa 100644 --- a/clientlibs/types.js +++ b/clientlibs/types.js @@ -124,6 +124,7 @@ const RUNWARE_NODE_TYPES = { VIDEOINFERENCEELEMENTS: "Runware Video Inference Elements", VIDEOINFERENCEELEMENTSCOMBINE: "Runware Video Inference Elements Combine", VIDEOINFERENCESPEECHINPUT: "Runware Video Inference Speech Input", + VIDEOINFERENCELORA: "Runware Video Inference Lora", VIDEOSETTINGS: "Runware Video Inference Settings", VIDEOINFERENCESETTINGSTTS: "Runware Video Inference Settings TTS", VIDEOINFERENCESETTINGSACTIVESPEAKERDETECTION: "Runware Video Inference Settings Active Speaker Detection", @@ -390,6 +391,10 @@ const RUNWARE_NODE_PROPS = { [RUNWARE_NODE_TYPES.VIDEOINFERENCESPEECHINPUT]: { bgColor: DEFAULT_BGCOLOR, }, + [RUNWARE_NODE_TYPES.VIDEOINFERENCELORA]: { + bgColor: DEFAULT_BGCOLOR, + colorModeOnly: true, + }, [RUNWARE_NODE_TYPES.REGIONALPROMPTINGADVFEATURE]: { bgColor: DEFAULT_BGCOLOR, colorModeOnly: true, diff --git a/clientlibs/utils.js b/clientlibs/utils.js index 06de733..e6bf739 100644 --- a/clientlibs/utils.js +++ b/clientlibs/utils.js @@ -2921,6 +2921,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) { "lightricks:2@0 (LTX Fast)", "lightricks:2@1 (LTX Pro)", "lightricks:3@1 (LTX-2 Retake)", "lightricks:ltx@2 (LTX-2)", "lightricks:ltx@2.3 (LTX 2.3)", "lightricks:ltx@2.3-fast (LTX 2.3 Fast)", + "lightricks:ltx@2.3-open (LTX-2.3 Open)", ], "Ovi": [ "runware:190@1 (Ovi)", @@ -3051,6 +3052,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) { "lightricks:ltx@2": {"width": 1024, "height": 1024}, "lightricks:ltx@2.3": {"width": 1920, "height": 1080}, "lightricks:ltx@2.3-fast": {"width": 1920, "height": 1080}, + "lightricks:ltx@2.3-open": {"width": 1024, "height": 1024}, "runware:190@1": {"width": 0, "height": 0}, "runway:aleph@2.0": {"width": 0, "height": 0}, "runway:2@1": {"width": 1280, "height": 720}, @@ -3154,6 +3156,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) { "lightricks:ltx@2": null, // No resolution support (fixed 1024x1024) "lightricks:ltx@2.3": "1080p", "lightricks:ltx@2.3-fast": "1080p", + "lightricks:ltx@2.3-open": null, // No resolution support (fixed 1024x1024) "runware:190@1": null, // No resolution support "runway:aleph@2.0": null, // Output ratio matches input video "runway:2@1": "720p", diff --git a/modules/videoInference.py b/modules/videoInference.py index 206a760..8151f9b 100644 --- a/modules/videoInference.py +++ b/modules/videoInference.py @@ -226,6 +226,9 @@ def INPUT_TYPES(cls): "settings": ("RUNWAREVIDEOSETTINGS", { "tooltip": "Connect a Runware Video Inference Settings node to configure draft, audio, voicePrompt, safetyFilter, promptUpsampling, voiceDescription, style, thinking, multiClip, shotType, promptExtend, syncMode, mode, emotion, temperature, occlusionDetection, tts, activeSpeakerDetection, segments, etc.", }), + "lora": ("RUNWAREVIDEOINFERENCELORA", { + "tooltip": "Connect a Runware Video Inference Lora node to apply LoRA models (e.g. for LTX video models).", + }), } } @@ -263,6 +266,7 @@ def generateVideo(self, **kwargs): videoAdvancedFeatureInputs = kwargs.get("videoAdvancedFeatureInputs", None) runwareAccelerator = kwargs.get("Accelerator", None) settings = kwargs.get("settings", None) + lora = kwargs.get("lora", None) useDuration = kwargs.get("useDuration", False) duration = kwargs.get("duration", 5) fps = kwargs.get("fps", 24) @@ -436,6 +440,9 @@ def generateVideo(self, **kwargs): # Add settings if provided (draft, audio, promptUpsampling, voiceDescription, ...) if settings is not None and isinstance(settings, dict) and len(settings) > 0: genConfig[0]["settings"] = settings + + if lora and lora.get("model"): + genConfig[0]["lora"] = [lora] # Add acceleration if not "none" if acceleration and acceleration != "none": diff --git a/modules/videoInferenceLora.py b/modules/videoInferenceLora.py new file mode 100644 index 0000000..dfad75b --- /dev/null +++ b/modules/videoInferenceLora.py @@ -0,0 +1,35 @@ +class RunwareVideoInferenceLora: + """LoRA config for Runware Video Inference.""" + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "model": ("STRING", { + "default": "", + "tooltip": "LoRA model AIR code (e.g. lvs:mayflower@lora-test).", + }), + "weight": ("FLOAT", { + "tooltip": "LoRA strength for video generation.", + "default": 0.7, + "min": -4.0, + "max": 4.0, + "step": 0.1, + }), + }, + } + + DESCRIPTION = ( + "Configure a LoRA for Runware Video Inference. Connect the output to " + "Runware Video Inference → lora." + ) + FUNCTION = "createLora" + RETURN_TYPES = ("RUNWAREVIDEOINFERENCELORA",) + RETURN_NAMES = ("lora",) + CATEGORY = "Runware" + + def createLora(self, model, weight): + return ({ + "model": model.strip(), + "weight": round(weight, 2), + },) diff --git a/modules/videoModelSearch.py b/modules/videoModelSearch.py index 00ac923..6bbd02d 100644 --- a/modules/videoModelSearch.py +++ b/modules/videoModelSearch.py @@ -92,6 +92,7 @@ class videoModelSearch: "lightricks:ltx@2 (LTX-2)", "lightricks:ltx@2.3 (LTX 2.3)", "lightricks:ltx@2.3-fast (LTX 2.3 Fast)", + "lightricks:ltx@2.3-open (LTX-2.3 Open)", ], "Ovi": [ "runware:190@1 (Ovi)", @@ -240,6 +241,7 @@ class videoModelSearch: "lightricks:ltx@2": {"width": 1024, "height": 1024}, "lightricks:ltx@2.3": {"width": 1920, "height": 1080}, "lightricks:ltx@2.3-fast": {"width": 1920, "height": 1080}, + "lightricks:ltx@2.3-open": {"width": 1024, "height": 1024}, # Ovi Models "runware:190@1": {"width": 0, "height": 0}, @@ -387,6 +389,7 @@ class videoModelSearch: "lightricks:ltx@2": None, # No resolution support (fixed 1024x1024) "lightricks:ltx@2.3": "1080p", "lightricks:ltx@2.3-fast": "1080p", + "lightricks:ltx@2.3-open": None, # No resolution support (fixed 1024x1024) # Ovi Models "runware:190@1": None, # No resolution support