Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions clientlibs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -5588,6 +5593,9 @@ function settingsToggleHandler(settingsNode) {
if (useCopyrightDetectionWidget && copyrightDetectionWidget) {
toggleWidgetState(useCopyrightDetectionWidget, copyrightDetectionWidget, "copyrightDetection");
}
if (usePreserveInputSizeWidget && preserveInputSizeWidget) {
toggleWidgetState(usePreserveInputSizeWidget, preserveInputSizeWidget, "preserveInputSize");
}
}

function outpaintSettingsToggleHandler(settingsNode) {
Expand Down
22 changes: 20 additions & 2 deletions modules/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
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
Expand Down Expand Up @@ -283,6 +284,19 @@ def INPUT_TYPES(cls):
"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."
),
}),
}
}

Expand All @@ -295,7 +309,7 @@ def INPUT_TYPES(cls):
"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."
)

Expand All @@ -322,6 +336,7 @@ def createSettings(self, **kwargs) -> tuple[Dict[str, Any]]:
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)
Expand Down Expand Up @@ -403,6 +418,9 @@ def createSettings(self, **kwargs) -> tuple[Dict[str, Any]]:
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))

Expand Down
3 changes: 3 additions & 0 deletions modules/videoModelSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions workflows/Runware_Image_Inference_Pruna_Try_On.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions workflows/Runware_Video_Inference_Kling_3_Turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"f2a29525-d19b-4e83-817c-ec49ebb4b30f","revision":0,"last_node_id":3,"last_link_id":2,"nodes":[{"id":3,"type":"SaveVideo","pos":[456.00404914193695,140.2935163852804],"size":[270,249.875],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"video","name":"video","type":"VIDEO","link":1},{"localized_name":"filename_prefix","name":"filename_prefix","type":"STRING","widget":{"name":"filename_prefix"},"link":null},{"localized_name":"format","name":"format","type":"COMBO","widget":{"name":"format"},"link":null},{"localized_name":"codec","name":"codec","type":"COMBO","widget":{"name":"codec"},"link":null}],"outputs":[],"properties":{"cnr_id":"comfy-core","ver":"0.22.0"},"widgets_values":["video/ComfyUI","auto","auto"]},{"id":1,"type":"Runware Video Inference","pos":[-74.45022793290552,77.28715525726491],"size":[400,838],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"Model","name":"Model","type":"RUNWAREVIDEOMODEL","link":2},{"localized_name":"frameImages","name":"frameImages","shape":7,"type":"RUNWAREFRAMEIMAGES","link":null},{"localized_name":"referenceImages","name":"referenceImages","shape":7,"type":"RUNWAREREFERENCEIMAGES","link":null},{"localized_name":"providerSettings","name":"providerSettings","shape":7,"type":"RUNWAREPROVIDERSETTINGS","link":null},{"localized_name":"inputAudios","name":"inputAudios","shape":7,"type":"RUNWAREINPUTAUDIOS","link":null},{"localized_name":"referenceVideos","name":"referenceVideos","shape":7,"type":"RUNWAREREFERENCEVIDEOS","link":null},{"localized_name":"speech","name":"speech","shape":7,"type":"RUNWAREVIDEOINFERENCESPEECHINPUT","link":null},{"localized_name":"inputs","name":"inputs","shape":7,"type":"RUNWAREVIDEOINFERENCEINPUTS","link":null},{"localized_name":"safetyInputs","name":"safetyInputs","shape":7,"type":"RUNWARESAFETYINPUTS","link":null},{"localized_name":"videoAdvancedFeatureInputs","name":"videoAdvancedFeatureInputs","shape":7,"type":"RUNWAREVIDEOADVANCEDFEATUREINPUTS","link":null},{"localized_name":"Accelerator","name":"Accelerator","shape":7,"type":"RUNWAREACCELERATOR","link":null},{"localized_name":"settings","name":"settings","shape":7,"type":"RUNWAREVIDEOSETTINGS","link":null},{"localized_name":"lora","name":"lora","shape":7,"type":"RUNWAREVIDEOINFERENCELORA","link":null},{"localized_name":"Multi Inference Mode","name":"Multi Inference Mode","type":"BOOLEAN","widget":{"name":"Multi Inference Mode"},"link":null},{"localized_name":"Prompt Weighting","name":"Prompt Weighting","type":"COMBO","widget":{"name":"Prompt Weighting"},"link":null},{"localized_name":"useDuration","name":"useDuration","type":"BOOLEAN","widget":{"name":"useDuration"},"link":null},{"localized_name":"duration","name":"duration","type":"INT","widget":{"name":"duration"},"link":null},{"localized_name":"useFps","name":"useFps","type":"BOOLEAN","widget":{"name":"useFps"},"link":null},{"localized_name":"fps","name":"fps","type":"INT","widget":{"name":"fps"},"link":null},{"localized_name":"outputFormat","name":"outputFormat","type":"COMBO","widget":{"name":"outputFormat"},"link":null},{"localized_name":"useSeed","name":"useSeed","type":"BOOLEAN","widget":{"name":"useSeed"},"link":null},{"localized_name":"seed","name":"seed","type":"INT","widget":{"name":"seed"},"link":null},{"localized_name":"useSteps","name":"useSteps","type":"BOOLEAN","widget":{"name":"useSteps"},"link":null},{"localized_name":"steps","name":"steps","type":"INT","widget":{"name":"steps"},"link":null},{"localized_name":"useBatchSize","name":"useBatchSize","type":"BOOLEAN","widget":{"name":"useBatchSize"},"link":null},{"localized_name":"batchSize","name":"batchSize","type":"INT","widget":{"name":"batchSize"},"link":null},{"localized_name":"useSchedulers","name":"useSchedulers","type":"BOOLEAN","widget":{"name":"useSchedulers"},"link":null},{"localized_name":"scheduler","name":"scheduler","type":"COMBO","widget":{"name":"scheduler"},"link":null},{"localized_name":"useCFGScale","name":"useCFGScale","type":"BOOLEAN","widget":{"name":"useCFGScale"},"link":null},{"localized_name":"cfgScale","name":"cfgScale","type":"FLOAT","widget":{"name":"cfgScale"},"link":null},{"localized_name":"acceleration","name":"acceleration","type":"COMBO","widget":{"name":"acceleration"},"link":null},{"localized_name":"positivePrompt","name":"positivePrompt","shape":7,"type":"STRING","widget":{"name":"positivePrompt"},"link":null},{"localized_name":"negativePrompt","name":"negativePrompt","shape":7,"type":"STRING","widget":{"name":"negativePrompt"},"link":null}],"outputs":[{"localized_name":"VIDEO","name":"VIDEO","type":"VIDEO","links":[1]},{"localized_name":"RW-Task","name":"RW-Task","type":"RUNWARETASK","links":null},{"localized_name":"OUTPUT","name":"OUTPUT","type":"RUNWARETASK","links":null}],"properties":{"cnr_id":"ComfyUI-Runware","ver":"1c9aa7ae55812257c561eaffcefff36a7bda3b45","Node name for S&R":"Runware Video Inference"},"widgets_values":[false,"Disabled",true,3,false,24,"mp4",false,243648776,"randomize",false,20,false,1,false,"euler",false,5,"none"," majestic eagle soaring through mountain clouds",""],"bgcolor":"#5345bf"},{"id":2,"type":"Runware Video Model Search","pos":[-519.6777293104071,156.62077185051174],"size":[294.16015625,250],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"Model Search","name":"Model Search","type":"STRING","widget":{"name":"Model Search"},"link":null},{"localized_name":"Model Architecture","name":"Model Architecture","type":"COMBO","widget":{"name":"Model Architecture"},"link":null},{"localized_name":"VideoList","name":"VideoList","type":"COMBO","widget":{"name":"VideoList"},"link":null},{"localized_name":"Use Search Value","name":"Use Search Value","type":"BOOLEAN","widget":{"name":"Use Search Value"},"link":null},{"localized_name":"useCustomDimensions","name":"useCustomDimensions","type":"COMBO","widget":{"name":"useCustomDimensions"},"link":null},{"localized_name":"Width","name":"Width","type":"INT","widget":{"name":"Width"},"link":null},{"localized_name":"Height","name":"Height","type":"INT","widget":{"name":"Height"},"link":null},{"localized_name":"useResolution","name":"useResolution","type":"BOOLEAN","widget":{"name":"useResolution"},"link":null},{"localized_name":"resolution","name":"resolution","type":"COMBO","widget":{"name":"resolution"},"link":null}],"outputs":[{"localized_name":"Runware Video Model","name":"Runware Video Model","type":"RUNWAREVIDEOMODEL","links":[2]}],"properties":{"cnr_id":"ComfyUI-Runware","ver":"1c9aa7ae55812257c561eaffcefff36a7bda3b45","Node name for S&R":"Runware Video Model Search"},"widgets_values":["","KlingAI","klingai:kling-video@3.0-turbo (Kling VIDEO 3.0 Turbo)",false,"Model Default",1920,1080,false,"720p"],"bgcolor":"#5345bf"}],"links":[[1,1,0,3,0,"VIDEO"],[2,2,0,1,0,"RUNWAREVIDEOMODEL"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.505529313703492,"offset":[1329.7472652309389,258.6011548450222]}},"version":0.4}