Add Krea2 POV prompt restore node
This commit is contained in:
@@ -11195,6 +11195,7 @@ def smoke_node_hardcore_position_registration() -> None:
|
||||
"SxCPKrea2POVToyFilter",
|
||||
"SxCPKrea2POVClimaxFilter",
|
||||
"SxCPKrea2POVInteractionFilter",
|
||||
"SxCPKrea2POVPromptRestore",
|
||||
"SxCPKrea2VariantEvidence",
|
||||
]
|
||||
for node_name in required_nodes:
|
||||
@@ -11350,6 +11351,80 @@ def smoke_node_hardcore_position_registration() -> None:
|
||||
_expect("doggy" in mixed_positions and "penis_licking" in mixed_positions, "Chained POV filters returned wrong positions summary")
|
||||
_expect("family=any" in mixed_summary, "Chained POV filters summary should show mixed family")
|
||||
|
||||
restore_node = sxcp_nodes.NODE_CLASS_MAPPINGS["SxCPKrea2POVPromptRestore"]
|
||||
restore_inputs = restore_node.INPUT_TYPES().get("required") or {}
|
||||
for key in (
|
||||
"restore_clothing_detail",
|
||||
"restore_face_expression_detail",
|
||||
"restore_body_touch_detail",
|
||||
"restore_camera_presentation_detail",
|
||||
"relax_non_pose_axis_conflicts",
|
||||
):
|
||||
_expect(key in restore_inputs, f"Krea2 POV Prompt Restore lost input {key}")
|
||||
restored_config, restored_summary = restore_node().build(
|
||||
doggy_config,
|
||||
True,
|
||||
True,
|
||||
False,
|
||||
False,
|
||||
True,
|
||||
)
|
||||
parsed_restored_config = json.loads(restored_config)
|
||||
_expect(
|
||||
parsed_restored_config.get("krea2_variant_keys") == ["pov_doggy_top_down_rear_entry"],
|
||||
"Krea2 POV Prompt Restore should preserve selected atlas variant metadata",
|
||||
)
|
||||
_expect(parsed_restored_config.get("positions") == ["doggy"], "Krea2 POV Prompt Restore should preserve selected pose lock")
|
||||
_expect(parsed_restored_config.get("family") == "penetrative", "Krea2 POV Prompt Restore should preserve atlas family lock")
|
||||
_expect(
|
||||
parsed_restored_config.get("restore_prompt_axes") == [
|
||||
"clothing_detail",
|
||||
"face_detail",
|
||||
"expression_detail",
|
||||
"mouth_detail",
|
||||
"reaction_detail",
|
||||
],
|
||||
"Krea2 POV Prompt Restore should record requested prompt axes",
|
||||
)
|
||||
_expect(
|
||||
parsed_restored_config.get("relax_non_pose_axis_conflicts") is True,
|
||||
"Krea2 POV Prompt Restore should enable non-pose conflict relaxation",
|
||||
)
|
||||
_expect("restore_axes=clothing_detail,face_detail" in restored_summary, "Krea2 POV Prompt Restore summary lost restored axes")
|
||||
parsed_restored = hardcore_position_config.parse_hardcore_position_config(parsed_restored_config)
|
||||
conflicting_clothing = {"text": "shirt pulled open while standing", "position_keys": ["standing"]}
|
||||
neutral_clothing = {"text": "shirt pulled open at the hips"}
|
||||
restored_clothing = hardcore_position_config.filter_hardcore_axis(
|
||||
"clothing_detail",
|
||||
[conflicting_clothing, neutral_clothing],
|
||||
parsed_restored,
|
||||
)
|
||||
_expect(
|
||||
restored_clothing == [conflicting_clothing, neutral_clothing],
|
||||
"Krea2 POV Prompt Restore should allow restored clothing detail through non-pose conflict pruning",
|
||||
)
|
||||
unrestored_hand = hardcore_position_config.filter_hardcore_axis(
|
||||
"hand_detail",
|
||||
[conflicting_clothing, neutral_clothing],
|
||||
parsed_restored,
|
||||
)
|
||||
_expect(
|
||||
unrestored_hand == [neutral_clothing],
|
||||
"Krea2 POV Prompt Restore should not relax unrequested non-pose axes",
|
||||
)
|
||||
restored_position = hardcore_position_config.filter_hardcore_axis(
|
||||
"position",
|
||||
[
|
||||
{"text": "standing sex position", "position_keys": ["standing"]},
|
||||
{"text": "doggy style position", "position_keys": ["doggy"]},
|
||||
],
|
||||
parsed_restored,
|
||||
)
|
||||
_expect(
|
||||
restored_position == [{"text": "doggy style position", "position_keys": ["doggy"]}],
|
||||
"Krea2 POV Prompt Restore should keep position axes locked to the atlas pose",
|
||||
)
|
||||
|
||||
evidence_node = sxcp_nodes.NODE_CLASS_MAPPINGS["SxCPKrea2VariantEvidence"]
|
||||
evidence_inputs = evidence_node.INPUT_TYPES().get("required") or {}
|
||||
_expect("variant_key" in evidence_inputs, "Krea2 Variant Evidence lost variant selector")
|
||||
|
||||
Reference in New Issue
Block a user