Added support for Lora in Video Inference

This commit is contained in:
Sirshendu Ganguly
2026-06-12 18:47:26 +05:30
parent 00af55528d
commit 93a86eb4b9
7 changed files with 56 additions and 1 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ def getCustomEndpoint():
custom_endpoint = os.getenv("RUNWARE_CUSTOM_ENDPOINT")
if custom_endpoint and isinstance(custom_endpoint, str):
return custom_endpoint
return "https://api.runware.ai/v1"
return "https://api.runware.dev/v1"
SESSION_TIMEOUT = getTimeout()
RUNWARE_API_KEY = getAPIKey()
+7
View File
@@ -226,6 +226,9 @@ class txt2vid:
"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 @@ class txt2vid:
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 @@ class txt2vid:
# 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":
+35
View File
@@ -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),
},)
+3
View File
@@ -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