Added support for P-try-on and Kling 3

This commit is contained in:
Sirshendu Ganguly
2026-06-18 20:33:06 +05:30
parent 1c9aa7ae55
commit 89f3ea3827
5 changed files with 33 additions and 2 deletions
+8
View File
@@ -2871,6 +2871,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) {
"klingai:kling-video@2.6-pro (Kling VIDEO 2.6 Pro)",
"klingai:kling-video@3-pro (Kling VIDEO 3.0 Pro)",
"klingai:kling-video@3-standard (Kling VIDEO 3.0 Standard)",
"klingai:kling-video@3.0-turbo (Kling VIDEO 3.0 Turbo)",
"klingai:kling-video@3-4k (Kling VIDEO 3.0 4K)",
"klingai:kling-video@o3-pro (Kling VIDEO O3 Pro)",
"klingai:kling-video@o3-standard (Kling VIDEO O3 Standard)",
@@ -2996,6 +2997,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) {
"klingai:kling-video@2.6-pro": {"width": 1920, "height": 1080},
"klingai:kling-video@3-pro": {"width": 1920, "height": 1080},
"klingai:kling-video@3-standard": {"width": 1920, "height": 1080},
"klingai:kling-video@3.0-turbo": {"width": 1920, "height": 1080},
"klingai:kling-video@3-4k": {"width": 3840, "height": 2160},
"klingai:kling-video@o3-pro": {"width": 1920, "height": 1080},
"klingai:kling-video@o3-standard": {"width": 1920, "height": 1080},
@@ -3100,6 +3102,7 @@ function videoModelSearchFilterHandler(videoModelSearchNode) {
"klingai:kling-video@2.6-pro": "1080p",
"klingai:kling-video@3-pro": "1080p",
"klingai:kling-video@3-standard": "1080p",
"klingai:kling-video@3.0-turbo": "1080p",
"klingai:kling-video@3-4k": null, // No 4K option in current resolution dropdown
"klingai:kling-video@o3-pro": "1080p",
"klingai:kling-video@o3-standard": "1080p",
@@ -5472,6 +5475,8 @@ function settingsToggleHandler(settingsNode) {
const scoringPromptWidget = settingsNode.widgets.find(w => w.name === "scoringPrompt");
const useCopyrightDetectionWidget = settingsNode.widgets.find(w => w.name === "useCopyrightDetection");
const copyrightDetectionWidget = settingsNode.widgets.find(w => w.name === "copyrightDetection");
const usePreserveInputSizeWidget = settingsNode.widgets.find(w => w.name === "usePreserveInputSize");
const preserveInputSizeWidget = settingsNode.widgets.find(w => w.name === "preserveInputSize");
// Helper function to toggle widget enabled state
function toggleWidgetState(useWidget, paramWidget, paramName) {
@@ -5588,6 +5593,9 @@ function settingsToggleHandler(settingsNode) {
if (useCopyrightDetectionWidget && copyrightDetectionWidget) {
toggleWidgetState(useCopyrightDetectionWidget, copyrightDetectionWidget, "copyrightDetection");
}
if (usePreserveInputSizeWidget && preserveInputSizeWidget) {
toggleWidgetState(usePreserveInputSizeWidget, preserveInputSizeWidget, "preserveInputSize");
}
}
function outpaintSettingsToggleHandler(settingsNode) {
+20 -2
View File
@@ -7,7 +7,8 @@ enhancePrompt, scoringPrompt, sequential, renderingSpeed (TURBO/DEFAULT/QUALITY)
magicPrompt (AUTO/ON/OFF), autoCrop, dilatePixels, creativity (raw/low/medium/high), colorPalette,
moodboards (from Runware Image Inference Settings Moodboards),
structuredPrompt (from Runware Image Inference Settings Structured Prompt; Ideogram 4.0),
and promptEnhance (from Runware Image Inference Settings Prompt Enhance).
and promptEnhance (from Runware Image Inference Settings Prompt Enhance),
preserveInputSize (return output at original input resolution).
"""
import json
@@ -283,6 +284,19 @@ class RunwareSettings:
"Only used when 'Use Copyright Detection' is enabled."
),
}),
"usePreserveInputSize": ("BOOLEAN", {
"tooltip": "Enable to include preserveInputSize in settings.",
"default": False,
}),
"preserveInputSize": ("BOOLEAN", {
"default": False,
"label_on": "true",
"label_off": "false",
"tooltip": (
"Return the output at the original input resolution. "
"Only used when 'Use Preserve Input Size' is enabled."
),
}),
}
}
@@ -295,7 +309,7 @@ class RunwareSettings:
"backgroundMode (original/transparent/solid), backgroundColor, enhancePrompt, scoringPrompt, background, style, search, "
"promptExtend, editRegions (JSON), thinking (boolean), thinkingLevel (low/medium/high/xhigh), sequential, "
"renderingSpeed (TURBO/DEFAULT/QUALITY), magicPrompt (AUTO/ON/OFF), autoCrop, dilatePixels, "
"creativity (raw/low/medium/high), and optional colorPalette, moodboards, structuredPrompt, promptEnhance, "
"creativity (raw/low/medium/high), preserveInputSize, and optional colorPalette, moodboards, structuredPrompt, promptEnhance, "
"and scoringRubric from dedicated settings nodes."
)
@@ -322,6 +336,7 @@ class RunwareSettings:
useEnhancePrompt = kwargs.get("useEnhancePrompt", False)
useScoringPrompt = kwargs.get("useScoringPrompt", False)
useCopyrightDetection = kwargs.get("useCopyrightDetection", False)
usePreserveInputSize = kwargs.get("usePreserveInputSize", False)
useSequential = kwargs.get("useSequential", False)
useRenderingSpeed = kwargs.get("useRenderingSpeed", False)
useMagicPrompt = kwargs.get("useMagicPrompt", False)
@@ -403,6 +418,9 @@ class RunwareSettings:
if useCopyrightDetection:
settings["copyrightDetection"] = bool(kwargs.get("copyrightDetection", False))
if usePreserveInputSize:
settings["preserveInputSize"] = bool(kwargs.get("preserveInputSize", False))
if useSequential:
settings["sequential"] = bool(kwargs.get("sequential", False))
+3
View File
@@ -20,6 +20,7 @@ class videoModelSearch:
"klingai:kling-video@2.6-pro (Kling VIDEO 2.6 Pro)",
"klingai:kling-video@3-pro (Kling VIDEO 3.0 Pro)",
"klingai:kling-video@3-standard (Kling VIDEO 3.0 Standard)",
"klingai:kling-video@3.0-turbo (Kling VIDEO 3.0 Turbo)",
"klingai:kling-video@3-4k (Kling VIDEO 3.0 4K)",
"klingai:kling-video@o3-pro (Kling VIDEO O3 Pro)",
"klingai:kling-video@o3-standard (Kling VIDEO O3 Standard)",
@@ -169,6 +170,7 @@ class videoModelSearch:
"klingai:kling-video@2.6-pro": {"width": 1920, "height": 1080},
"klingai:kling-video@3-pro": {"width": 1920, "height": 1080},
"klingai:kling-video@3-standard": {"width": 1920, "height": 1080},
"klingai:kling-video@3.0-turbo": {"width": 1920, "height": 1080},
"klingai:kling-video@3-4k": {"width": 3840, "height": 2160},
"klingai:kling-video@o3-pro": {"width": 1920, "height": 1080},
"klingai:kling-video@o3-standard": {"width": 1920, "height": 1080},
@@ -317,6 +319,7 @@ class videoModelSearch:
"klingai:kling-video@2.6-pro": "1080p",
"klingai:kling-video@3-pro": "1080p",
"klingai:kling-video@3-standard": "1080p",
"klingai:kling-video@3.0-turbo": "1080p",
"klingai:kling-video@3-4k": None, # No 4K option in current resolution dropdown
"klingai:kling-video@o3-pro": "1080p",
"klingai:kling-video@o3-standard": "1080p",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long