Add scene-chain option nodes
This commit is contained in:
+86
-5
@@ -8792,6 +8792,19 @@ def smoke_node_insta_registration() -> None:
|
||||
|
||||
def smoke_node_scene_chain_registration() -> None:
|
||||
required_nodes = [
|
||||
"SxCPSceneLayerSeedOptions",
|
||||
"SxCPSceneCastOptions",
|
||||
"SxCPSceneCharacterOptions",
|
||||
"SxCPSceneWardrobeOptions",
|
||||
"SxCPSceneLocationLayoutOptions",
|
||||
"SxCPSceneSetDressingOptions",
|
||||
"SxCPSceneBlockingOptions",
|
||||
"SxCPSceneActionOptions",
|
||||
"SxCPScenePerformanceOptions",
|
||||
"SxCPSceneCameraOptions",
|
||||
"SxCPSceneCompositionOptions",
|
||||
"SxCPSceneLightingOptions",
|
||||
"SxCPSceneBranchOptions",
|
||||
"SxCPSceneStart",
|
||||
"SxCPSceneCast",
|
||||
"SxCPSceneCharacter",
|
||||
@@ -8830,6 +8843,7 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
parsed_scene = json.loads(scene)
|
||||
_expect(parsed_scene.get("schema") == "sxcp_scene_v2", "Scene Start did not emit v2 schema")
|
||||
|
||||
cast_options = nodes["SxCPSceneCastOptions"]().build("replace", "mixed_couple", 1, 1, "woman_a", "none")[0]
|
||||
scene, _cast_config, _cast_summary, _cast_metadata = nodes["SxCPSceneCast"]().build(
|
||||
scene,
|
||||
"mixed_couple",
|
||||
@@ -8837,7 +8851,18 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
1,
|
||||
"woman_a",
|
||||
"none",
|
||||
cast_options=cast_options,
|
||||
)
|
||||
character_options = nodes["SxCPSceneCharacterOptions"]().build(
|
||||
"replace",
|
||||
"medium",
|
||||
"visible",
|
||||
"enabled",
|
||||
0.5,
|
||||
-1,
|
||||
-1,
|
||||
"controlled slot performance note",
|
||||
)[0]
|
||||
scene, character_cast, _slot, _summary, _metadata = nodes["SxCPSceneCharacter"]().build(
|
||||
scene,
|
||||
True,
|
||||
@@ -8854,6 +8879,7 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
"visible",
|
||||
-1,
|
||||
-1,
|
||||
character_options=character_options,
|
||||
)
|
||||
scene, character_cast, _slot, _summary, _metadata = nodes["SxCPSceneCharacter"]().build(
|
||||
scene,
|
||||
@@ -8872,6 +8898,19 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
-1,
|
||||
-1,
|
||||
)
|
||||
wardrobe_seed_options = nodes["SxCPSceneLayerSeedOptions"]().build("wardrobe", "fixed", 9981, "content", "same_for_all_rows", "replace_layer")[0]
|
||||
wardrobe_options = nodes["SxCPSceneWardrobeOptions"]().build(
|
||||
"replace",
|
||||
"woman",
|
||||
"A",
|
||||
"full",
|
||||
"explicit_nude",
|
||||
True,
|
||||
"simple black dress",
|
||||
"",
|
||||
"thin necklace",
|
||||
"",
|
||||
)[0]
|
||||
scene, character_cast, _wardrobe_summary, _wardrobe_metadata = nodes["SxCPSceneWardrobe"]().build(
|
||||
scene,
|
||||
True,
|
||||
@@ -8881,12 +8920,24 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
"simple black dress",
|
||||
"fully nude",
|
||||
"",
|
||||
wardrobe_options=wardrobe_options,
|
||||
seed_options=wardrobe_seed_options,
|
||||
)
|
||||
slots = json.loads(character_cast).get("slots") or []
|
||||
woman_slot = next(slot for slot in slots if slot.get("subject_type") == "woman")
|
||||
_expect(woman_slot.get("softcore_outfit") == "simple black dress", "Scene Wardrobe did not update softcore outfit")
|
||||
_expect(woman_slot.get("hardcore_clothing") == "fully nude", "Scene Wardrobe did not update hardcore clothing")
|
||||
_expect(json.loads(scene).get("seed_trace", {}).get("wardrobe", {}).get("seed") == 9981, "Scene Wardrobe seed options did not write seed trace")
|
||||
|
||||
location_options = nodes["SxCPSceneLocationLayoutOptions"]().build(
|
||||
"replace",
|
||||
"mirror edge",
|
||||
"soft curtain layer",
|
||||
"repeating lamp reflections",
|
||||
"private",
|
||||
"private",
|
||||
"warm mirror-room geometry",
|
||||
)[0]
|
||||
scene = nodes["SxCPSceneLocation"]().build(
|
||||
scene,
|
||||
True,
|
||||
@@ -8894,10 +8945,26 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
"custom_only",
|
||||
"quiet studio room with a large mirror",
|
||||
"",
|
||||
location_options=location_options,
|
||||
)[0]
|
||||
scene = nodes["SxCPSceneSetDressing"]().build(scene, True, "mirror edge", "soft curtains", "small lamp", "")[0]
|
||||
scene = nodes["SxCPSceneBlocking"]().build(scene, True, "standing", "woman near mirror", "man behind her", "")[0]
|
||||
scene = nodes["SxCPScenePerformance"]().build(scene, True, "fixed", 0.4, "controlled eye contact")[0]
|
||||
set_options = nodes["SxCPSceneSetDressingOptions"]().build("replace", "mirror edge", "soft curtains", "small lamp", "warm fabric texture", "")[0]
|
||||
scene = nodes["SxCPSceneSetDressing"]().build(scene, True, "mirror edge", "soft curtains", "small lamp", "", set_options=set_options)[0]
|
||||
blocking_options = nodes["SxCPSceneBlockingOptions"]().build(
|
||||
"replace",
|
||||
"standing",
|
||||
"woman near mirror",
|
||||
"man behind her",
|
||||
"three_quarter",
|
||||
"foreground",
|
||||
"standing close",
|
||||
"",
|
||||
)[0]
|
||||
scene = nodes["SxCPSceneBlocking"]().build(scene, True, "standing", "woman near mirror", "man behind her", "", blocking_options=blocking_options)[0]
|
||||
action_options = nodes["SxCPSceneActionOptions"]().build("replace", "softcore", "softcore_tease", "no_change", "quiet pose transition")[0]
|
||||
scene = nodes["SxCPSceneAction"]().build(scene, True, "regular", "no_change", "", action_options=action_options)[0]
|
||||
performance_options = nodes["SxCPScenePerformanceOptions"]().build("replace", "enabled", "fixed", 0.4, "camera", "on_body", "posed", "controlled eye contact")[0]
|
||||
scene = nodes["SxCPScenePerformance"]().build(scene, True, "fixed", 0.4, "controlled eye contact", performance_options=performance_options)[0]
|
||||
camera_options = nodes["SxCPSceneCameraOptions"]().build("replace", "from_camera_config", True, "mirror-aware camera note")[0]
|
||||
scene = nodes["SxCPSceneCamera"]().build(
|
||||
scene,
|
||||
True,
|
||||
@@ -8911,9 +8978,12 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
"strong",
|
||||
"compact",
|
||||
"",
|
||||
camera_options=camera_options,
|
||||
)[0]
|
||||
scene = nodes["SxCPSceneComposition"]().build(scene, True, "replace", "no_outfit_check", "mirror-aware three-quarter frame", "")[0]
|
||||
scene = nodes["SxCPSceneLighting"]().build(scene, True, "practical_lamps", "soft", "medium", "warm", "")[0]
|
||||
composition_options = nodes["SxCPSceneCompositionOptions"]().build("replace", "body", "three_quarter", "clear", "mirror-aware three-quarter frame")[0]
|
||||
scene = nodes["SxCPSceneComposition"]().build(scene, True, "replace", "no_outfit_check", "", "", composition_options=composition_options)[0]
|
||||
lighting_options = nodes["SxCPSceneLightingOptions"]().build("replace", "practical_lamps", "soft", "medium", "warm", "evening", "")[0]
|
||||
scene = nodes["SxCPSceneLighting"]().build(scene, True, "practical_lamps", "soft", "medium", "warm", "", lighting_options=lighting_options)[0]
|
||||
|
||||
output = nodes["SxCPSceneOutput"]().build(scene)
|
||||
_expect_text("node_scene_chain.prompt", output[0], 40)
|
||||
@@ -8921,10 +8991,14 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
row = json.loads(output[3])
|
||||
_expect(row.get("scene_chain", {}).get("schema") == "sxcp_scene_v2", "Scene Output lost scene_chain metadata")
|
||||
|
||||
branch_options = nodes["SxCPSceneBranchOptions"]().build("replace", "both", "same_creator_same_room", "hybrid", "shared branch note")[0]
|
||||
branch_seed_options = nodes["SxCPSceneLayerSeedOptions"]().build("hardcore_branch", "fixed", 7799, "pose", "same_for_all_rows", "replace_layer")[0]
|
||||
soft_scene, hard_scene, _branch_summary, _branch_metadata = nodes["SxCPSceneBranchPair"]().build(
|
||||
scene,
|
||||
"same_creator_same_room",
|
||||
"hybrid",
|
||||
branch_options=branch_options,
|
||||
seed_options=branch_seed_options,
|
||||
)
|
||||
soft_scene = nodes["SxCPSoftcoreBranchOptions"]().build(
|
||||
soft_scene,
|
||||
@@ -8935,6 +9009,7 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
"from_camera_config",
|
||||
"compact",
|
||||
"",
|
||||
branch_options=branch_options,
|
||||
)[0]
|
||||
hard_scene = nodes["SxCPHardcoreBranchOptions"]().build(
|
||||
hard_scene,
|
||||
@@ -8949,6 +9024,8 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
"compact",
|
||||
"balanced",
|
||||
"",
|
||||
branch_options=branch_options,
|
||||
seed_options=branch_seed_options,
|
||||
)[0]
|
||||
pair_output = nodes["SxCPScenePairOutput"]().build(soft_scene, hard_scene)
|
||||
_expect_text("node_scene_chain.softcore_prompt", pair_output[0], 40)
|
||||
@@ -8957,6 +9034,10 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
_expect_pair(pair, "node_scene_chain_pair")
|
||||
_expect(pair.get("options", {}).get("hardcore_cast") == "couple", "Scene Pair Output lost hardcore branch options")
|
||||
_expect("scene_chain" in pair, "Scene Pair Output lost scene_chain metadata")
|
||||
_expect(
|
||||
pair.get("scene_chain", {}).get("hardcore", {}).get("seed_trace", {}).get("hardcore.hardcore_branch", {}).get("seed") == 7799,
|
||||
"Scene branch seed options did not write hardcore branch seed trace",
|
||||
)
|
||||
|
||||
|
||||
def smoke_node_builder_registration() -> None:
|
||||
|
||||
Reference in New Issue
Block a user