Merge pull request #123 from Runware/feature-ImagineArt2-support

Added thinkingLevel
This commit is contained in:
Sirshendu Ganguly
2026-04-10 14:09:53 +05:30
committed by GitHub
4 changed files with 28 additions and 11 deletions
+5
View File
@@ -4726,6 +4726,8 @@ function settingsToggleHandler(settingsNode) {
const editRegionsWidget = settingsNode.widgets.find(w => w.name === "editRegions");
const useThinkingWidget = settingsNode.widgets.find(w => w.name === "useThinking");
const thinkingWidget = settingsNode.widgets.find(w => w.name === "thinking");
const useThinkingLevelWidget = settingsNode.widgets.find(w => w.name === "useThinkingLevel");
const thinkingLevelWidget = settingsNode.widgets.find(w => w.name === "thinkingLevel");
const useSequentialWidget = settingsNode.widgets.find(w => w.name === "useSequential");
const sequentialWidget = settingsNode.widgets.find(w => w.name === "sequential");
@@ -4799,6 +4801,9 @@ function settingsToggleHandler(settingsNode) {
if (useThinkingWidget && thinkingWidget) {
toggleWidgetState(useThinkingWidget, thinkingWidget, "thinking");
}
if (useThinkingLevelWidget && thinkingLevelWidget) {
toggleWidgetState(useThinkingLevelWidget, thinkingLevelWidget, "thinkingLevel");
}
if (useSequentialWidget && sequentialWidget) {
toggleWidgetState(useSequentialWidget, sequentialWidget, "sequential");
}
+1 -1
View File
@@ -196,7 +196,7 @@ class txt2img:
"tooltip": "Connect Runware Safety Inputs node to configure safety and content moderation settings.",
}),
"settings": ("RUNWARESETTINGS", {
"tooltip": "Connect Runware Image Inference Settings for temperature, systemPrompt, topP, layers, quality, promptExtend, editRegions (JSON), thinking, sequential, colorPalette (via Color Palette node), etc.",
"tooltip": "Connect Runware Image Inference Settings for temperature, systemPrompt, topP, layers, quality, promptExtend, editRegions (JSON), thinking, thinkingLevel (high/medium/low), sequential, colorPalette (via Color Palette node), etc.",
}),
"ultralytics": ("RUNWAREULTRALYTICSINPUTS", {
"tooltip": "Connect Runware Image Inference Ultralytics node to configure Ultralytics parameters (maskBlur, maskPadding, confidence, prompts, steps, CFGScale, strength).",
+21 -10
View File
@@ -1,7 +1,7 @@
"""
Runware Image Inference Settings (registered as Runware Settings for workflow compatibility).
Provides settings for image generation including temperature, systemPrompt, topP,
editRegions, thinking, sequential, and colorPalette (from Runware Image Inference Settings Color Palette).
editRegions, thinking (boolean), thinkingLevel (high/medium/low), sequential, and colorPalette (from Runware Image Inference Settings Color Palette).
"""
import json
@@ -96,13 +96,14 @@ class RunwareSettings:
"default": "",
}),
"useThinking": ("BOOLEAN", {
"tooltip": "Enable to include thinking (string) in settings.",
"tooltip": "Enable to include thinking (boolean) in settings.",
"default": False,
}),
"thinking": ("STRING", {
"multiline": True,
"tooltip": "Thinking / reasoning string passed in settings. Only used when 'Use Thinking' is enabled.",
"default": "",
"thinking": ("BOOLEAN", {
"tooltip": "Thinking / reasoning flag passed in settings. Only used when 'Use Thinking' is enabled.",
"default": False,
"label_on": "true",
"label_off": "false",
}),
"useSequential": ("BOOLEAN", {
"tooltip": "Enable to include sequential (boolean) in settings.",
@@ -117,6 +118,14 @@ class RunwareSettings:
"colorPalette": ("RUNWAREIMAGEINFERENCECOLORPALETTE", {
"tooltip": "Connect Runware Image Inference Color Palette. When the palette node outputs at least one swatch, it is merged into settings.colorPalette.",
}),
"useThinkingLevel": ("BOOLEAN", {
"tooltip": "Enable to include thinkingLevel (string) in settings.",
"default": False,
}),
"thinkingLevel": (["high", "medium", "low"], {
"default": "high",
"tooltip": "Reasoning level for visual understanding. Only used when 'Use Thinking Level' is enabled.",
}),
}
}
@@ -126,7 +135,7 @@ class RunwareSettings:
CATEGORY = "Runware"
DESCRIPTION = (
"Configure general settings for image generation: temperature, system prompt, top-p, layers, quality, "
"promptExtend, editRegions (JSON), thinking, sequential, and optional colorPalette from the Color Palette node."
"promptExtend, editRegions (JSON), thinking (boolean), thinkingLevel (high/medium/low), sequential, and optional colorPalette from the Color Palette node."
)
def createSettings(self, **kwargs) -> tuple[Dict[str, Any]]:
@@ -143,6 +152,7 @@ class RunwareSettings:
promptExtend = kwargs.get("promptExtend", False)
useEditRegions = kwargs.get("useEditRegions", False)
useThinking = kwargs.get("useThinking", False)
useThinkingLevel = kwargs.get("useThinkingLevel", False)
useSequential = kwargs.get("useSequential", False)
# Get value parameters
@@ -184,9 +194,10 @@ class RunwareSettings:
settings["editRegions"] = parsed
if useThinking:
th = (kwargs.get("thinking") or "").strip()
if th:
settings["thinking"] = th
settings["thinking"] = bool(kwargs.get("thinking", False))
if useThinkingLevel:
settings["thinkingLevel"] = str(kwargs.get("thinkingLevel", "high"))
if useSequential:
settings["sequential"] = bool(kwargs.get("sequential", False))
File diff suppressed because one or more lines are too long