Add Krea2 pose variant catalog loader
This commit is contained in:
@@ -61,6 +61,7 @@ import krea_format_route # noqa: E402
|
||||
import krea_formatter # noqa: E402
|
||||
import krea_normal_formatter # noqa: E402
|
||||
import krea_pair_formatter # noqa: E402
|
||||
import krea2_pose_variant_catalog # noqa: E402
|
||||
import krea_row_fields # noqa: E402
|
||||
import location_config # noqa: E402
|
||||
import loop_nodes # noqa: E402
|
||||
@@ -6766,6 +6767,42 @@ def smoke_krea2_pov_pose_variant_catalog() -> None:
|
||||
_expect(required_keys.issubset(seen_keys), "Krea2 POV pose-variant catalog lost a proven starter variant")
|
||||
|
||||
|
||||
def smoke_krea2_pose_variant_catalog_policy() -> None:
|
||||
catalog = krea2_pose_variant_catalog.load_catalog()
|
||||
_expect(catalog.get("version") == 1, "Krea2 pose-variant loader returned wrong catalog")
|
||||
proven = krea2_pose_variant_catalog.variant_keys(status="proven")
|
||||
_expect(
|
||||
proven == [
|
||||
"pov_doggy_top_down_rear_entry",
|
||||
"pov_boobjob_upright_cleavage",
|
||||
"pov_handjob_upright_centered",
|
||||
],
|
||||
f"Krea2 pose-variant proven keys changed unexpectedly: {proven}",
|
||||
)
|
||||
outercourse = krea2_pose_variant_catalog.variant_keys(action_family="outercourse")
|
||||
_expect(
|
||||
outercourse == [
|
||||
"pov_boobjob_upright_cleavage",
|
||||
"pov_handjob_upright_centered",
|
||||
"pov_ballsucking_low_head",
|
||||
],
|
||||
f"Krea2 pose-variant outercourse filtering changed unexpectedly: {outercourse}",
|
||||
)
|
||||
handjob = krea2_pose_variant_catalog.get_variant("pov_handjob_upright_centered")
|
||||
_expect(
|
||||
any("woman's right hand wraps" in str(cue) for cue in handjob.get("prompt_cues", [])),
|
||||
"Handjob variant lost hand ownership cue",
|
||||
)
|
||||
handjob["prompt_cues"].append("mutation should not leak")
|
||||
clean_handjob = krea2_pose_variant_catalog.get_variant("pov_handjob_upright_centered")
|
||||
_expect("mutation should not leak" not in clean_handjob.get("prompt_cues", []), "Catalog loader leaked caller mutation")
|
||||
refs = krea2_pose_variant_catalog.reference_paths("pov_boobjob_upright_cleavage")
|
||||
_expect(refs and all(path.name.endswith(".png") for path in refs), "Boobjob reference paths are not image paths")
|
||||
_expect(all("bg" not in str(path).lower() for path in refs), "Reference paths should not include background-only atlas images")
|
||||
missing = krea2_pose_variant_catalog.get_variant("missing_pose_variant")
|
||||
_expect(missing == {}, "Missing pose variant should return an empty mapping")
|
||||
|
||||
|
||||
def smoke_krea_pov_penetration_route() -> None:
|
||||
pair = pb.build_insta_of_pair(
|
||||
row_number=1,
|
||||
@@ -9726,6 +9763,7 @@ SMOKE_CASES: list[tuple[str, Callable[[], None]]] = [
|
||||
("insta_pair_camera_split", smoke_insta_pair_camera_split),
|
||||
("pov_camera_scene", smoke_pov_camera_scene),
|
||||
("krea2_pov_pose_variant_catalog", smoke_krea2_pov_pose_variant_catalog),
|
||||
("krea2_pose_variant_catalog_policy", smoke_krea2_pose_variant_catalog_policy),
|
||||
("krea_pov_penetration_route", smoke_krea_pov_penetration_route),
|
||||
("pov_outercourse_position_routes", smoke_pov_outercourse_position_routes),
|
||||
("pov_oral_position_routes", smoke_pov_oral_position_routes),
|
||||
|
||||
Reference in New Issue
Block a user