Fix softcore branch pose seeding

This commit is contained in:
2026-06-28 09:19:39 +02:00
parent faacfc8853
commit 3130942caf
4 changed files with 69 additions and 6 deletions
+63 -1
View File
@@ -8277,7 +8277,7 @@ def smoke_prompt_route_simulation_policy() -> None:
)
_expect(
pair_seed_checks["pair_seed.pose_reroll"].get("changed") is True,
"Pair pose reroll should prove hard action can reroll while soft/cast/scene axes stay locked",
"Pair pose reroll should prove soft pose or hard action can reroll while cast/scene axes stay locked",
)
sweep = prompt_route_simulation.run_simulation_sweep(seed=3901, count=3, seed_step=101, include_prompts=False)
sweep_summary = sweep.get("summary") or {}
@@ -9263,6 +9263,68 @@ def smoke_node_scene_chain_registration() -> None:
content_hard_seed_config.get("pose_seed") == 8899 and content_hard_seed_config.get("role_seed") == 8899,
"Hardcore branch content_pose reroll did not reach hardcore pose and role seeds",
)
def _soft_pose_pair(soft_pose_seed: int) -> dict[str, Any]:
soft_pose_seed_options = nodes["SxCPSceneLayerSeedOptions"]().build(
"softcore_branch",
"fixed",
soft_pose_seed,
"pose",
"same_for_all_rows",
"replace_layer",
)[0]
soft_scene_pose, hard_scene_pose, _summary, _metadata = nodes["SxCPSceneBranchPair"]().build(
scene,
"same_creator_same_room",
"hybrid",
branch_options=branch_options,
seed_options=soft_pose_seed_options,
)
soft_scene_pose = nodes["SxCPSoftcoreBranchOptions"]().build(
soft_scene_pose,
"same_as_hardcore",
"lingerie_tease",
True,
0.45,
"from_camera_config",
"compact",
"",
branch_options=branch_options,
seed_options=soft_pose_seed_options,
)[0]
hard_scene_pose = nodes["SxCPHardcoreBranchOptions"]().build(
hard_scene_pose,
"couple",
1,
1,
"hardcore",
True,
0.85,
"explicit_nude",
"from_camera_config",
"compact",
"balanced",
"",
branch_options=branch_options,
)[0]
return json.loads(nodes["SxCPScenePairOutput"]().build(soft_scene_pose, hard_scene_pose)[7])
soft_pose_pairs = [_soft_pose_pair(seed) for seed in (6677, 6678, 6679, 6680)]
soft_pose_items = {pair.get("softcore_row", {}).get("item") for pair in soft_pose_pairs}
soft_pose_values = {pair.get("softcore_row", {}).get("pose") for pair in soft_pose_pairs}
_expect(len(soft_pose_items) == 1, "Softcore branch pose reroll should not change softcore outfit/content")
_expect(len(soft_pose_values) > 1, "Softcore branch pose reroll did not change softcore pose")
for expected_seed, pose_pair in zip((6677, 6678, 6679, 6680), soft_pose_pairs):
soft_seed_config = pose_pair.get("softcore_row", {}).get("seed_config") if isinstance(pose_pair.get("softcore_row"), dict) else {}
hard_seed_config = pose_pair.get("hardcore_row", {}).get("seed_config") if isinstance(pose_pair.get("hardcore_row"), dict) else {}
_expect(
soft_seed_config.get("pose_seed") == expected_seed,
"Softcore branch pose seed did not reach softcore generator seed config",
)
_expect(
hard_seed_config.get("pose_seed") != expected_seed,
"Softcore branch pose seed leaked into hardcore generator seed config",
)
choice_board_node = nodes["SxCPChoiceBoard"]()
choice_board_output = choice_board_node.build(
json.dumps(content_pair),