Skip to content

Commit 93a86eb

Browse files
committed
Added support for Lora in Video Inference
1 parent 00af555 commit 93a86eb

7 files changed

Lines changed: 56 additions & 1 deletion

File tree

__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from .modules.imageRegionalPromptingAdvancedFeatureRegions import RunwareRegionalPromptingAdvancedFeatureRegions
3434
from .modules.videoInference import txt2vid
3535
from .modules.videoInferenceSpeechInput import RunwareVideoInferenceSpeechInput
36+
from .modules.videoInferenceLora import RunwareVideoInferenceLora
3637
from .modules.videoModelSearch import videoModelSearch
3738
from .modules.videoSettings import RunwareVideoSettings
3839
from .modules.videoInferenceSettingsTts import RunwareVideoInferenceSettingsTts
@@ -225,6 +226,7 @@
225226
"Runware Video Inference Elements": RunwareVideoInferenceElements,
226227
"Runware Video Inference Elements Combine": RunwareVideoInferenceElementsCombine,
227228
"Runware Video Inference Speech Input": RunwareVideoInferenceSpeechInput,
229+
"Runware Video Inference Lora": RunwareVideoInferenceLora,
228230
"Runware Video Inference Settings": RunwareVideoSettings,
229231
"Runware Video Inference Settings TTS": RunwareVideoInferenceSettingsTts,
230232
"Runware Video Inference Settings Active Speaker Detection": RunwareVideoInferenceSettingsActiveSpeakerDetection,

clientlibs/types.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const RUNWARE_NODE_TYPES = {
124124
VIDEOINFERENCEELEMENTS: "Runware Video Inference Elements",
125125
VIDEOINFERENCEELEMENTSCOMBINE: "Runware Video Inference Elements Combine",
126126
VIDEOINFERENCESPEECHINPUT: "Runware Video Inference Speech Input",
127+
VIDEOINFERENCELORA: "Runware Video Inference Lora",
127128
VIDEOSETTINGS: "Runware Video Inference Settings",
128129
VIDEOINFERENCESETTINGSTTS: "Runware Video Inference Settings TTS",
129130
VIDEOINFERENCESETTINGSACTIVESPEAKERDETECTION: "Runware Video Inference Settings Active Speaker Detection",
@@ -390,6 +391,10 @@ const RUNWARE_NODE_PROPS = {
390391
[RUNWARE_NODE_TYPES.VIDEOINFERENCESPEECHINPUT]: {
391392
bgColor: DEFAULT_BGCOLOR,
392393
},
394+
[RUNWARE_NODE_TYPES.VIDEOINFERENCELORA]: {
395+
bgColor: DEFAULT_BGCOLOR,
396+
colorModeOnly: true,
397+
},
393398
[RUNWARE_NODE_TYPES.REGIONALPROMPTINGADVFEATURE]: {
394399
bgColor: DEFAULT_BGCOLOR,
395400
colorModeOnly: true,

clientlibs/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,6 +2921,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) {
29212921
"lightricks:2@0 (LTX Fast)", "lightricks:2@1 (LTX Pro)",
29222922
"lightricks:3@1 (LTX-2 Retake)", "lightricks:ltx@2 (LTX-2)",
29232923
"lightricks:ltx@2.3 (LTX 2.3)", "lightricks:ltx@2.3-fast (LTX 2.3 Fast)",
2924+
"lightricks:ltx@2.3-open (LTX-2.3 Open)",
29242925
],
29252926
"Ovi": [
29262927
"runware:190@1 (Ovi)",
@@ -3051,6 +3052,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) {
30513052
"lightricks:ltx@2": {"width": 1024, "height": 1024},
30523053
"lightricks:ltx@2.3": {"width": 1920, "height": 1080},
30533054
"lightricks:ltx@2.3-fast": {"width": 1920, "height": 1080},
3055+
"lightricks:ltx@2.3-open": {"width": 1024, "height": 1024},
30543056
"runware:190@1": {"width": 0, "height": 0},
30553057
"runway:aleph@2.0": {"width": 0, "height": 0},
30563058
"runway:2@1": {"width": 1280, "height": 720},
@@ -3154,6 +3156,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) {
31543156
"lightricks:ltx@2": null, // No resolution support (fixed 1024x1024)
31553157
"lightricks:ltx@2.3": "1080p",
31563158
"lightricks:ltx@2.3-fast": "1080p",
3159+
"lightricks:ltx@2.3-open": null, // No resolution support (fixed 1024x1024)
31573160
"runware:190@1": null, // No resolution support
31583161
"runway:aleph@2.0": null, // Output ratio matches input video
31593162
"runway:2@1": "720p",

modules/utils/runwareUtils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def getCustomEndpoint():
158158
custom_endpoint = os.getenv("RUNWARE_CUSTOM_ENDPOINT")
159159
if custom_endpoint and isinstance(custom_endpoint, str):
160160
return custom_endpoint
161-
return "https://api.runware.ai/v1"
161+
return "https://api.runware.dev/v1"
162162

163163
SESSION_TIMEOUT = getTimeout()
164164
RUNWARE_API_KEY = getAPIKey()

modules/videoInference.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ def INPUT_TYPES(cls):
226226
"settings": ("RUNWAREVIDEOSETTINGS", {
227227
"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.",
228228
}),
229+
"lora": ("RUNWAREVIDEOINFERENCELORA", {
230+
"tooltip": "Connect a Runware Video Inference Lora node to apply LoRA models (e.g. for LTX video models).",
231+
}),
229232
}
230233
}
231234

@@ -263,6 +266,7 @@ def generateVideo(self, **kwargs):
263266
videoAdvancedFeatureInputs = kwargs.get("videoAdvancedFeatureInputs", None)
264267
runwareAccelerator = kwargs.get("Accelerator", None)
265268
settings = kwargs.get("settings", None)
269+
lora = kwargs.get("lora", None)
266270
useDuration = kwargs.get("useDuration", False)
267271
duration = kwargs.get("duration", 5)
268272
fps = kwargs.get("fps", 24)
@@ -436,6 +440,9 @@ def generateVideo(self, **kwargs):
436440
# Add settings if provided (draft, audio, promptUpsampling, voiceDescription, ...)
437441
if settings is not None and isinstance(settings, dict) and len(settings) > 0:
438442
genConfig[0]["settings"] = settings
443+
444+
if lora and lora.get("model"):
445+
genConfig[0]["lora"] = [lora]
439446

440447
# Add acceleration if not "none"
441448
if acceleration and acceleration != "none":

modules/videoInferenceLora.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
class RunwareVideoInferenceLora:
2+
"""LoRA config for Runware Video Inference."""
3+
4+
@classmethod
5+
def INPUT_TYPES(cls):
6+
return {
7+
"required": {
8+
"model": ("STRING", {
9+
"default": "",
10+
"tooltip": "LoRA model AIR code (e.g. lvs:mayflower@lora-test).",
11+
}),
12+
"weight": ("FLOAT", {
13+
"tooltip": "LoRA strength for video generation.",
14+
"default": 0.7,
15+
"min": -4.0,
16+
"max": 4.0,
17+
"step": 0.1,
18+
}),
19+
},
20+
}
21+
22+
DESCRIPTION = (
23+
"Configure a LoRA for Runware Video Inference. Connect the output to "
24+
"Runware Video Inference → lora."
25+
)
26+
FUNCTION = "createLora"
27+
RETURN_TYPES = ("RUNWAREVIDEOINFERENCELORA",)
28+
RETURN_NAMES = ("lora",)
29+
CATEGORY = "Runware"
30+
31+
def createLora(self, model, weight):
32+
return ({
33+
"model": model.strip(),
34+
"weight": round(weight, 2),
35+
},)

modules/videoModelSearch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class videoModelSearch:
9292
"lightricks:ltx@2 (LTX-2)",
9393
"lightricks:ltx@2.3 (LTX 2.3)",
9494
"lightricks:ltx@2.3-fast (LTX 2.3 Fast)",
95+
"lightricks:ltx@2.3-open (LTX-2.3 Open)",
9596
],
9697
"Ovi": [
9798
"runware:190@1 (Ovi)",
@@ -240,6 +241,7 @@ class videoModelSearch:
240241
"lightricks:ltx@2": {"width": 1024, "height": 1024},
241242
"lightricks:ltx@2.3": {"width": 1920, "height": 1080},
242243
"lightricks:ltx@2.3-fast": {"width": 1920, "height": 1080},
244+
"lightricks:ltx@2.3-open": {"width": 1024, "height": 1024},
243245

244246
# Ovi Models
245247
"runware:190@1": {"width": 0, "height": 0},
@@ -387,6 +389,7 @@ class videoModelSearch:
387389
"lightricks:ltx@2": None, # No resolution support (fixed 1024x1024)
388390
"lightricks:ltx@2.3": "1080p",
389391
"lightricks:ltx@2.3-fast": "1080p",
392+
"lightricks:ltx@2.3-open": None, # No resolution support (fixed 1024x1024)
390393

391394
# Ovi Models
392395
"runware:190@1": None, # No resolution support

0 commit comments

Comments
 (0)