Add hardcore position control nodes

This commit is contained in:
2026-06-25 01:05:58 +02:00
parent 91d5049774
commit 8ecb1a65c5
2 changed files with 550 additions and 1 deletions
+107
View File
@@ -21,6 +21,7 @@ SXCP_CATEGORY_CONFIG = "SXCP_CATEGORY_CONFIG"
SXCP_CAST_CONFIG = "SXCP_CAST_CONFIG"
SXCP_GENERATION_PROFILE = "SXCP_GENERATION_PROFILE"
SXCP_INSTA_OF_OPTIONS = "SXCP_INSTA_OF_OPTIONS"
SXCP_HARDCORE_POSITION_CONFIG = "SXCP_HARDCORE_POSITION_CONFIG"
SXCP_CHARACTER_CAST = "SXCP_CHARACTER_CAST"
SXCP_CHARACTER_SLOT = "SXCP_CHARACTER_SLOT"
SXCP_CHARACTER_PROFILE = "SXCP_CHARACTER_PROFILE"
@@ -41,6 +42,8 @@ try:
build_filter_config_json,
build_generation_profile_json,
build_hair_config_json,
build_hardcore_action_filter_json,
build_hardcore_position_pool_json,
build_insta_of_options_json,
build_insta_of_pair,
build_prompt,
@@ -81,6 +84,9 @@ try:
character_woman_body_choices,
ethnicity_choices,
generation_profile_choices,
hardcore_position_family_choices,
hardcore_position_focus_choices,
hardcore_position_key_choices,
hardcore_detail_density_choices,
load_character_profile_json,
save_character_profile_payload,
@@ -105,6 +111,8 @@ except ImportError:
build_filter_config_json,
build_generation_profile_json,
build_hair_config_json,
build_hardcore_action_filter_json,
build_hardcore_position_pool_json,
build_insta_of_options_json,
build_insta_of_pair,
build_prompt,
@@ -145,6 +153,9 @@ except ImportError:
character_woman_body_choices,
ethnicity_choices,
generation_profile_choices,
hardcore_position_family_choices,
hardcore_position_focus_choices,
hardcore_position_key_choices,
hardcore_detail_density_choices,
load_character_profile_json,
save_character_profile_payload,
@@ -199,6 +210,7 @@ class SxCPPromptBuilder:
"camera_config": (SXCP_CAMERA_CONFIG,),
"character_profile": (SXCP_CHARACTER_PROFILE,),
"character_cast": (SXCP_CHARACTER_CAST,),
"hardcore_position_config": (SXCP_HARDCORE_POSITION_CONFIG,),
"extra_positive": ("STRING", {"default": "", "multiline": True}),
"extra_negative": ("STRING", {"default": "", "multiline": True}),
},
@@ -233,6 +245,7 @@ class SxCPPromptBuilder:
camera_config="",
character_profile="",
character_cast="",
hardcore_position_config="",
extra_positive="",
extra_negative="",
no_plus_women=False,
@@ -266,6 +279,7 @@ class SxCPPromptBuilder:
camera_config=camera_config or "",
character_profile=character_profile or "",
character_cast=character_cast or "",
hardcore_position_config=hardcore_position_config or "",
)
return (
row["prompt"],
@@ -1077,6 +1091,89 @@ class SxCPCharacterClothing:
return config, json.loads(config).get("summary", "")
class SxCPHardcorePositionPool:
@classmethod
def INPUT_TYPES(cls):
required = {
"combine_mode": (["replace", "add"], {"default": "replace"}),
"family": (hardcore_position_family_choices(), {"default": "any"}),
}
for choice in hardcore_position_key_choices():
required[_choice_input_key("include", choice)] = ("BOOLEAN", {"default": False})
return {
"required": required,
"optional": {
"hardcore_position_config": (SXCP_HARDCORE_POSITION_CONFIG,),
},
}
RETURN_TYPES = (SXCP_HARDCORE_POSITION_CONFIG, "STRING")
RETURN_NAMES = ("hardcore_position_config", "summary")
FUNCTION = "build"
CATEGORY = "prompt_builder"
def build(self, combine_mode="replace", family="any", hardcore_position_config="", **kwargs):
selected = [
choice
for choice in hardcore_position_key_choices()
if bool(kwargs.get(_choice_input_key("include", choice), False))
]
config = build_hardcore_position_pool_json(
hardcore_position_config=hardcore_position_config or "",
combine_mode=combine_mode,
family=family,
selected_positions=selected,
)
return config, json.loads(config).get("summary", "")
class SxCPHardcoreActionFilter:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"focus": (hardcore_position_focus_choices(), {"default": "keep_pool"}),
"allow_toys": ("BOOLEAN", {"default": False}),
"allow_double": ("BOOLEAN", {"default": False}),
"allow_penetration": ("BOOLEAN", {"default": True}),
"allow_oral": ("BOOLEAN", {"default": True}),
"allow_anal": ("BOOLEAN", {"default": True}),
"allow_climax": ("BOOLEAN", {"default": True}),
},
"optional": {
"hardcore_position_config": (SXCP_HARDCORE_POSITION_CONFIG,),
},
}
RETURN_TYPES = (SXCP_HARDCORE_POSITION_CONFIG, "STRING")
RETURN_NAMES = ("hardcore_position_config", "summary")
FUNCTION = "build"
CATEGORY = "prompt_builder"
def build(
self,
focus,
allow_toys,
allow_double,
allow_penetration,
allow_oral,
allow_anal,
allow_climax,
hardcore_position_config="",
):
config = build_hardcore_action_filter_json(
hardcore_position_config=hardcore_position_config or "",
focus=focus,
allow_toys=allow_toys,
allow_double=allow_double,
allow_penetration=allow_penetration,
allow_oral=allow_oral,
allow_anal=allow_anal,
allow_climax=allow_climax,
)
return config, json.loads(config).get("summary", "")
class SxCPCharacterManualDetails:
@classmethod
def INPUT_TYPES(cls):
@@ -1150,6 +1247,7 @@ class SxCPPromptBuilderFromConfigs:
"camera_config": (SXCP_CAMERA_CONFIG,),
"character_profile": (SXCP_CHARACTER_PROFILE,),
"character_cast": (SXCP_CHARACTER_CAST,),
"hardcore_position_config": (SXCP_HARDCORE_POSITION_CONFIG,),
"extra_positive": ("STRING", {"default": "", "multiline": True}),
"extra_negative": ("STRING", {"default": "", "multiline": True}),
},
@@ -1174,6 +1272,7 @@ class SxCPPromptBuilderFromConfigs:
camera_config="",
character_profile="",
character_cast="",
hardcore_position_config="",
extra_positive="",
extra_negative="",
):
@@ -1189,6 +1288,7 @@ class SxCPPromptBuilderFromConfigs:
camera_config=camera_config or "",
character_profile=character_profile or "",
character_cast=character_cast or "",
hardcore_position_config=hardcore_position_config or "",
extra_positive=extra_positive or "",
extra_negative=extra_negative or "",
)
@@ -1818,6 +1918,7 @@ class SxCPInstaOFPromptPair:
"hardcore_camera_config": (SXCP_CAMERA_CONFIG,),
"character_profile": (SXCP_CHARACTER_PROFILE,),
"character_cast": (SXCP_CHARACTER_CAST,),
"hardcore_position_config": (SXCP_HARDCORE_POSITION_CONFIG,),
"extra_positive": ("STRING", {"default": "", "multiline": True}),
"extra_negative": ("STRING", {"default": "", "multiline": True}),
},
@@ -1855,6 +1956,7 @@ class SxCPInstaOFPromptPair:
hardcore_camera_config="",
character_profile="",
character_cast="",
hardcore_position_config="",
extra_positive="",
extra_negative="",
no_plus_women=False,
@@ -1878,6 +1980,7 @@ class SxCPInstaOFPromptPair:
hardcore_camera_config=hardcore_camera_config or "",
character_profile=character_profile or "",
character_cast=character_cast or "",
hardcore_position_config=hardcore_position_config or "",
extra_positive=extra_positive or "",
extra_negative=extra_negative or "",
)
@@ -1914,6 +2017,8 @@ NODE_CLASS_MAPPINGS = {
"SxCPManBodyPool": SxCPManBodyPool,
"SxCPEyeColorPool": SxCPEyeColorPool,
"SxCPCharacterClothing": SxCPCharacterClothing,
"SxCPHardcorePositionPool": SxCPHardcorePositionPool,
"SxCPHardcoreActionFilter": SxCPHardcoreActionFilter,
"SxCPCharacterManualDetails": SxCPCharacterManualDetails,
"SxCPAdvancedFilters": SxCPAdvancedFilters,
"SxCPPromptBuilderFromConfigs": SxCPPromptBuilderFromConfigs,
@@ -1950,6 +2055,8 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"SxCPManBodyPool": "SxCP Man Body Pool",
"SxCPEyeColorPool": "SxCP Eye Color Pool",
"SxCPCharacterClothing": "SxCP Character Clothing",
"SxCPHardcorePositionPool": "SxCP Hardcore Position Pool",
"SxCPHardcoreActionFilter": "SxCP Hardcore Action Filter",
"SxCPCharacterManualDetails": "SxCP Character Manual Details",
"SxCPAdvancedFilters": "SxCP Advanced Filters",
"SxCPPromptBuilderFromConfigs": "SxCP Prompt Builder From Configs",