Add Krea2 POV pose variant catalog
This commit is contained in:
@@ -6719,6 +6719,53 @@ def smoke_pov_camera_scene() -> None:
|
||||
_expect("Camera:" not in prompt, "Krea POV prompt should not emit normal third-person camera directive")
|
||||
|
||||
|
||||
def smoke_krea2_pov_pose_variant_catalog() -> None:
|
||||
catalog_path = ROOT / "categories" / "krea2_pov_pose_variants.json"
|
||||
_expect(catalog_path.is_file(), "Krea2 POV pose-variant catalog is missing")
|
||||
catalog = json.loads(catalog_path.read_text(encoding="utf-8"))
|
||||
_expect(catalog.get("version") == 1, "Krea2 POV pose-variant catalog version changed unexpectedly")
|
||||
atlas_root = Path(_expect_text("krea2_pov_pose_variant_catalog.atlas_root", catalog.get("atlas_root"), 20))
|
||||
variants = catalog.get("variants")
|
||||
_expect(isinstance(variants, list) and variants, "Krea2 POV pose-variant catalog has no variants")
|
||||
statuses = set((catalog.get("status_values") or {}).keys())
|
||||
_expect({"proven", "candidate", "unstable"}.issubset(statuses), "Krea2 POV pose-variant statuses are incomplete")
|
||||
seen_keys: set[str] = set()
|
||||
required_keys = {
|
||||
"pov_doggy_top_down_rear_entry",
|
||||
"pov_boobjob_upright_cleavage",
|
||||
"pov_handjob_upright_centered",
|
||||
}
|
||||
for variant in variants:
|
||||
key = _expect_text("krea2_pov_pose_variant_catalog.key", variant.get("key"), 8)
|
||||
_expect(key not in seen_keys, f"Krea2 POV pose-variant catalog has duplicate key {key!r}")
|
||||
seen_keys.add(key)
|
||||
_expect(variant.get("status") in statuses, f"{key} has unknown status {variant.get('status')!r}")
|
||||
_expect_text(f"{key}.family", variant.get("family"), 3)
|
||||
_expect_text(f"{key}.canonical_geometry", variant.get("canonical_geometry"), 80)
|
||||
prompt_cues = variant.get("prompt_cues")
|
||||
avoid_cues = variant.get("avoid_cues")
|
||||
refs = variant.get("reference_images")
|
||||
_expect(isinstance(prompt_cues, list) and prompt_cues, f"{key} has no prompt cues")
|
||||
_expect(isinstance(avoid_cues, list) and avoid_cues, f"{key} has no avoid cues")
|
||||
_expect(isinstance(refs, list) and refs, f"{key} has no reference images")
|
||||
hook = variant.get("generator_hook") or {}
|
||||
_expect_text(f"{key}.generator_hook.module", hook.get("module"), 6)
|
||||
_expect(isinstance(hook.get("route_terms"), list) and hook["route_terms"], f"{key} has no route terms")
|
||||
for folder in variant.get("atlas_folders") or []:
|
||||
_expect("bg" not in str(folder).lower(), f"{key} should not use background-only folder {folder!r}")
|
||||
for ref in refs:
|
||||
ref_text = _expect_text(f"{key}.reference_image", ref, 8)
|
||||
_expect(".." not in Path(ref_text).parts, f"{key} reference escapes atlas root: {ref_text!r}")
|
||||
_expect("bg" not in ref_text.lower(), f"{key} should not use background-only reference {ref_text!r}")
|
||||
if atlas_root.exists():
|
||||
_expect((atlas_root / ref_text).is_file(), f"{key} reference image is missing: {atlas_root / ref_text}")
|
||||
if variant.get("status") == "proven":
|
||||
evidence = variant.get("evidence") or {}
|
||||
_expect(evidence.get("fixed_seed_tests"), f"{key} is proven but has no fixed-seed evidence")
|
||||
_expect_text(f"{key}.guide_section", evidence.get("guide_section"), 10)
|
||||
_expect(required_keys.issubset(seen_keys), "Krea2 POV pose-variant catalog lost a proven starter variant")
|
||||
|
||||
|
||||
def smoke_krea_pov_penetration_route() -> None:
|
||||
pair = pb.build_insta_of_pair(
|
||||
row_number=1,
|
||||
@@ -9678,6 +9725,7 @@ SMOKE_CASES: list[tuple[str, Callable[[], None]]] = [
|
||||
("insta_pair_pov_man", smoke_insta_pair_pov),
|
||||
("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),
|
||||
("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