Add prompt control and filter options

This commit is contained in:
2026-06-24 14:32:54 +02:00
parent 2b64499687
commit cb35e1881f
5 changed files with 592 additions and 99 deletions
+101 -18
View File
@@ -15,7 +15,9 @@ try:
build_prompt,
build_prompt_from_configs,
build_seed_config_json,
build_seed_lock_config_json,
camera_angle_choices,
camera_detail_choices,
camera_distance_choices,
camera_lens_choices,
camera_mode_choices,
@@ -27,6 +29,7 @@ try:
category_preset_choices,
category_choices,
character_profile_choices,
ethnicity_choices,
generation_profile_choices,
load_character_profile_json,
subcategory_choices,
@@ -46,7 +49,9 @@ except ImportError:
build_prompt,
build_prompt_from_configs,
build_seed_config_json,
build_seed_lock_config_json,
camera_angle_choices,
camera_detail_choices,
camera_distance_choices,
camera_lens_choices,
camera_mode_choices,
@@ -58,6 +63,7 @@ except ImportError:
category_preset_choices,
category_choices,
character_profile_choices,
ethnicity_choices,
generation_profile_choices,
load_character_profile_json,
subcategory_choices,
@@ -77,13 +83,11 @@ class SxCPPromptBuilder:
"start_index": ("INT", {"default": 41, "min": 1, "max": 1000000, "step": 1}),
"seed": ("INT", {"default": 20260614, "min": 0, "max": 0xFFFFFFFF, "step": 1}),
"clothing": (["full", "minimal"], {"default": "full"}),
"ethnicity": (["any", "asian", "white_asian"], {"default": "any"}),
"ethnicity": (ethnicity_choices(), {"default": "any"}),
"poses": (["standard", "evocative"], {"default": "standard"}),
"expression_intensity": ("FLOAT", {"default": 0.5, "min": 0.0, "max": 1.0, "step": 0.01}),
"backside_bias": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.01}),
"figure": (["curvy", "balanced", "bombshell"], {"default": "curvy"}),
"no_plus_women": ("BOOLEAN", {"default": False}),
"no_black": ("BOOLEAN", {"default": False}),
"women_count": ("INT", {"default": 1, "min": 0, "max": 12, "step": 1}),
"men_count": ("INT", {"default": 1, "min": 0, "max": 12, "step": 1}),
"minimal_clothing_ratio": ("FLOAT", {"default": -1.0, "min": -1.0, "max": 1.0, "step": 0.01}),
@@ -118,8 +122,6 @@ class SxCPPromptBuilder:
expression_intensity,
backside_bias,
figure,
no_plus_women,
no_black,
women_count,
men_count,
minimal_clothing_ratio,
@@ -131,6 +133,8 @@ class SxCPPromptBuilder:
character_profile="",
extra_positive="",
extra_negative="",
no_plus_women=False,
no_black=False,
):
row = build_prompt(
category=category,
@@ -218,6 +222,46 @@ class SxCPSeedControl:
)
class SxCPSeedLocker:
@classmethod
def INPUT_TYPES(cls):
seed_spec = {"default": 20260614, "min": 0, "max": 0xFFFFFFFF, "step": 1}
reroll_seed_spec = {"default": -1, "min": -1, "max": 0xFFFFFFFF, "step": 1}
return {
"required": {
"base_seed": ("INT", seed_spec),
"reroll_axis": (
[
"none",
"category",
"subcategory",
"content",
"person",
"scene",
"pose",
"role",
"expression",
"composition",
"content_pose",
"scene_pose",
],
{"default": "none"},
),
"reroll_seed": ("INT", reroll_seed_spec),
}
}
RETURN_TYPES = ("STRING", "STRING")
RETURN_NAMES = ("seed_config", "summary")
FUNCTION = "build"
CATEGORY = "prompt_builder"
def build(self, base_seed, reroll_axis, reroll_seed):
config = build_seed_lock_config_json(base_seed=base_seed, reroll_axis=reroll_axis, reroll_seed=reroll_seed)
summary = f"base {base_seed}; reroll {reroll_axis} with {'main seed' if int(reroll_seed) < 0 else reroll_seed}"
return config, summary
class SxCPCameraControl:
@classmethod
def INPUT_TYPES(cls):
@@ -231,6 +275,7 @@ class SxCPCameraControl:
"orientation": (camera_orientation_choices(), {"default": "vertical_story"}),
"phone_visibility": (camera_phone_choices(), {"default": "phone_visible"}),
"priority": (camera_priority_choices(), {"default": "locked"}),
"camera_detail": (camera_detail_choices(), {"default": "compact"}),
}
}
@@ -249,6 +294,7 @@ class SxCPCameraControl:
orientation,
phone_visibility,
priority,
camera_detail,
):
return (
build_camera_config_json(
@@ -260,6 +306,7 @@ class SxCPCameraControl:
orientation=orientation,
phone_visibility=phone_visibility,
priority=priority,
camera_detail=camera_detail,
),
)
@@ -360,10 +407,17 @@ class SxCPAdvancedFilters:
def INPUT_TYPES(cls):
return {
"required": {
"ethnicity": (["any", "asian", "white_asian"], {"default": "any"}),
"include_european": ("BOOLEAN", {"default": True}),
"include_mediterranean_mena": ("BOOLEAN", {"default": True}),
"include_latina": ("BOOLEAN", {"default": True}),
"include_east_asian": ("BOOLEAN", {"default": True}),
"include_southeast_asian": ("BOOLEAN", {"default": True}),
"include_south_asian": ("BOOLEAN", {"default": True}),
"include_black_african": ("BOOLEAN", {"default": True}),
"include_indigenous": ("BOOLEAN", {"default": True}),
"include_mixed": ("BOOLEAN", {"default": True}),
"include_plus_size": ("BOOLEAN", {"default": True}),
"figure": (["curvy", "balanced", "bombshell"], {"default": "curvy"}),
"no_plus_women": ("BOOLEAN", {"default": False}),
"no_black": ("BOOLEAN", {"default": False}),
}
}
@@ -372,13 +426,33 @@ class SxCPAdvancedFilters:
FUNCTION = "build"
CATEGORY = "prompt_builder"
def build(self, ethnicity, figure, no_plus_women, no_black):
def build(
self,
include_european,
include_mediterranean_mena,
include_latina,
include_east_asian,
include_southeast_asian,
include_south_asian,
include_black_african,
include_indigenous,
include_mixed,
include_plus_size,
figure,
):
return (
build_filter_config_json(
ethnicity=ethnicity,
figure=figure,
no_plus_women=no_plus_women,
no_black=no_black,
include_european=include_european,
include_mediterranean_mena=include_mediterranean_mena,
include_latina=include_latina,
include_east_asian=include_east_asian,
include_southeast_asian=include_southeast_asian,
include_south_asian=include_south_asian,
include_black_african=include_black_african,
include_indigenous=include_indigenous,
include_mixed=include_mixed,
include_plus_size=include_plus_size,
),
)
@@ -673,14 +747,16 @@ class SxCPInstaOFOptions:
"hardcore_cast": (["use_counts", "couple", "threesome", "group"], {"default": "use_counts"}),
"hardcore_women_count": ("INT", {"default": 1, "min": 0, "max": 12, "step": 1}),
"hardcore_men_count": ("INT", {"default": 1, "min": 0, "max": 12, "step": 1}),
"softcore_level": (["social_tease", "lingerie_tease", "implied_nude", "explicit_tease"], {"default": "lingerie_tease"}),
"softcore_level": (["social_tease", "lingerie_tease", "implied_nude", "explicit_tease", "explicit_nude"], {"default": "lingerie_tease"}),
"hardcore_level": (["explicit", "hardcore"], {"default": "hardcore"}),
"softcore_expression_intensity": ("FLOAT", {"default": 0.45, "min": 0.0, "max": 1.0, "step": 0.01}),
"hardcore_expression_intensity": ("FLOAT", {"default": 0.85, "min": 0.0, "max": 1.0, "step": 0.01}),
"platform_style": (["hybrid", "instagram", "onlyfans"], {"default": "hybrid"}),
"continuity": (["same_creator_same_room", "same_creator_new_scene"], {"default": "same_creator_same_room"}),
"hardcore_clothing_continuity": (["none", "same_outfit", "partially_removed", "implied_nude", "explicit_nude"], {"default": "partially_removed"}),
"softcore_camera_mode": (camera_mode_choices(), {"default": "handheld_selfie"}),
"hardcore_camera_mode": (["same_as_softcore"] + camera_mode_choices(), {"default": "same_as_softcore"}),
"camera_detail": (camera_detail_choices(), {"default": "compact"}),
}
}
@@ -701,8 +777,10 @@ class SxCPInstaOFOptions:
hardcore_expression_intensity,
platform_style,
continuity,
hardcore_clothing_continuity,
softcore_camera_mode,
hardcore_camera_mode,
camera_detail,
):
return (
build_insta_of_options_json(
@@ -716,8 +794,10 @@ class SxCPInstaOFOptions:
hardcore_expression_intensity=hardcore_expression_intensity,
platform_style=platform_style,
continuity=continuity,
hardcore_clothing_continuity=hardcore_clothing_continuity,
softcore_camera_mode=softcore_camera_mode,
hardcore_camera_mode=hardcore_camera_mode,
camera_detail=camera_detail,
),
)
@@ -730,16 +810,15 @@ class SxCPInstaOFPromptPair:
"row_number": ("INT", {"default": 1, "min": 1, "max": 1000000, "step": 1}),
"start_index": ("INT", {"default": 41, "min": 1, "max": 1000000, "step": 1}),
"seed": ("INT", {"default": 20260614, "min": 0, "max": 0xFFFFFFFF, "step": 1}),
"ethnicity": (["any", "asian", "white_asian"], {"default": "any"}),
"ethnicity": (ethnicity_choices(), {"default": "any"}),
"figure": (["curvy", "balanced", "bombshell"], {"default": "curvy"}),
"no_plus_women": ("BOOLEAN", {"default": False}),
"no_black": ("BOOLEAN", {"default": False}),
"trigger": ("STRING", {"default": "sxcpinup_coloredpencil"}),
"prepend_trigger_to_prompt": ("BOOLEAN", {"default": True}),
},
"optional": {
"seed_config": ("STRING", {"default": "", "multiline": True}),
"options_json": ("STRING", {"default": "", "multiline": True}),
"filter_config": ("STRING", {"default": "", "multiline": True}),
"camera_config": ("STRING", {"default": "", "multiline": True}),
"character_profile": ("STRING", {"default": "", "multiline": True}),
"extra_positive": ("STRING", {"default": "", "multiline": True}),
@@ -768,16 +847,17 @@ class SxCPInstaOFPromptPair:
seed,
ethnicity,
figure,
no_plus_women,
no_black,
trigger,
prepend_trigger_to_prompt,
seed_config="",
options_json="",
filter_config="",
camera_config="",
character_profile="",
extra_positive="",
extra_negative="",
no_plus_women=False,
no_black=False,
):
row = build_insta_of_pair(
row_number=row_number,
@@ -791,6 +871,7 @@ class SxCPInstaOFPromptPair:
prepend_trigger_to_prompt=prepend_trigger_to_prompt,
seed_config=seed_config or "",
options_json=options_json or "",
filter_config=filter_config or "",
camera_config=camera_config or "",
character_profile=character_profile or "",
extra_positive=extra_positive or "",
@@ -811,6 +892,7 @@ class SxCPInstaOFPromptPair:
NODE_CLASS_MAPPINGS = {
"SxCPPromptBuilder": SxCPPromptBuilder,
"SxCPSeedControl": SxCPSeedControl,
"SxCPSeedLocker": SxCPSeedLocker,
"SxCPCameraControl": SxCPCameraControl,
"SxCPCategoryPreset": SxCPCategoryPreset,
"SxCPCastControl": SxCPCastControl,
@@ -828,6 +910,7 @@ NODE_CLASS_MAPPINGS = {
NODE_DISPLAY_NAME_MAPPINGS = {
"SxCPPromptBuilder": "SxCP Prompt Builder",
"SxCPSeedControl": "SxCP Seed Control",
"SxCPSeedLocker": "SxCP Seed Locker",
"SxCPCameraControl": "SxCP Camera Control",
"SxCPCategoryPreset": "SxCP Category Preset",
"SxCPCastControl": "SxCP Cast Control",