Merge pull request #165 from Runware/feature-ideogram-quifix
Added support for settings.copyrightDetection
This commit is contained in:
@@ -5388,6 +5388,8 @@ function settingsToggleHandler(settingsNode) {
|
||||
const enhancePromptWidget = settingsNode.widgets.find(w => w.name === "enhancePrompt");
|
||||
const useScoringPromptWidget = settingsNode.widgets.find(w => w.name === "useScoringPrompt");
|
||||
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");
|
||||
|
||||
// Helper function to toggle widget enabled state
|
||||
function toggleWidgetState(useWidget, paramWidget, paramName) {
|
||||
@@ -5501,6 +5503,9 @@ function settingsToggleHandler(settingsNode) {
|
||||
if (useScoringPromptWidget && scoringPromptWidget) {
|
||||
toggleWidgetState(useScoringPromptWidget, scoringPromptWidget, "scoringPrompt");
|
||||
}
|
||||
if (useCopyrightDetectionWidget && copyrightDetectionWidget) {
|
||||
toggleWidgetState(useCopyrightDetectionWidget, copyrightDetectionWidget, "copyrightDetection");
|
||||
}
|
||||
}
|
||||
|
||||
function outpaintSettingsToggleHandler(settingsNode) {
|
||||
|
||||
@@ -270,6 +270,19 @@ class RunwareSettings:
|
||||
"for settings.scoringRubric (up to 4 dimensions via Combine)."
|
||||
),
|
||||
}),
|
||||
"useCopyrightDetection": ("BOOLEAN", {
|
||||
"tooltip": "Enable to include copyrightDetection in settings.",
|
||||
"default": False,
|
||||
}),
|
||||
"copyrightDetection": ("BOOLEAN", {
|
||||
"default": False,
|
||||
"label_on": "true",
|
||||
"label_off": "false",
|
||||
"tooltip": (
|
||||
"Opt into post-generation copyright detection (Hive likeness + logo checks). "
|
||||
"Only used when 'Use Copyright Detection' is enabled."
|
||||
),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,6 +321,7 @@ class RunwareSettings:
|
||||
useBackgroundColor = kwargs.get("useBackgroundColor", False)
|
||||
useEnhancePrompt = kwargs.get("useEnhancePrompt", False)
|
||||
useScoringPrompt = kwargs.get("useScoringPrompt", False)
|
||||
useCopyrightDetection = kwargs.get("useCopyrightDetection", False)
|
||||
useSequential = kwargs.get("useSequential", False)
|
||||
useRenderingSpeed = kwargs.get("useRenderingSpeed", False)
|
||||
useMagicPrompt = kwargs.get("useMagicPrompt", False)
|
||||
@@ -386,6 +400,9 @@ class RunwareSettings:
|
||||
if scoring_prompt:
|
||||
settings["scoringPrompt"] = scoring_prompt
|
||||
|
||||
if useCopyrightDetection:
|
||||
settings["copyrightDetection"] = bool(kwargs.get("copyrightDetection", False))
|
||||
|
||||
if useSequential:
|
||||
settings["sequential"] = bool(kwargs.get("sequential", False))
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user