Make POV prompt restore affect Krea output

This commit is contained in:
2026-06-30 23:25:28 +02:00
parent 85c577024b
commit caeafa0714
7 changed files with 203 additions and 5 deletions
+57
View File
@@ -8442,6 +8442,63 @@ def smoke_pov_oral_position_routes() -> None:
_expect("eye-level shot" not in top_prompt, f"Top-view variant prompt kept contradictory eye-level camera text: {top_prompt}")
_expect("tongue extended toward genitals" not in top_prompt, f"Top-view variant prompt kept contradictory tongue-extension expression: {top_prompt}")
restored_top_config = sxcp_nodes.NODE_CLASS_MAPPINGS["SxCPKrea2POVPromptRestore"]().build(
True,
True,
True,
True,
True,
top_variant_config,
)[0]
restored_top_pair = pb.build_insta_of_pair(
row_number=1,
start_index=1,
seed=3828,
ethnicity="any",
figure="random",
no_plus_women=False,
no_black=False,
trigger=Trigger,
prepend_trigger_to_prompt=True,
options_json=_insta_options(
softcore_camera_mode="from_camera_config",
hardcore_camera_mode="from_camera_config",
camera_detail="compact",
),
character_cast=_character_cast(pov_man=True),
hardcore_position_config=restored_top_config,
location_config=_coworking_location_config(),
hardcore_camera_config=_orbit_camera(
horizontal_angle=45,
vertical_angle=0,
zoom=7.5,
subject_focus="action",
),
)
restored_top_row = restored_top_pair.get("hardcore_row") or {}
restored_top_axis = restored_top_row.get("item_axis_values") or {}
restored_details = restored_top_axis.get("restored_prompt_details") or []
_expect(isinstance(restored_details, list), "Krea2 POV Prompt Restore should keep restored prompt details as a list")
_expect(restored_details, "Krea2 POV Prompt Restore should add sampled restored axis details to row metadata")
restored_top_krea = krea_formatter.format_krea2_prompt("", metadata_json=_json(restored_top_pair), target="hardcore")
restored_top_prompt = _expect_text("pov_oral_top_view_restore.krea_prompt", restored_top_krea.get("krea_prompt"), 60).lower()
_expect(
restored_top_prompt != top_prompt,
"Krea2 POV Prompt Restore should visibly change the final Krea prompt, not only metadata",
)
_expect(
"nadir-angle standing male pov top-view oral position" in restored_top_prompt,
"Krea2 POV Prompt Restore should preserve the exact atlas pose while adding detail",
)
_expect(
"eye-level" not in restored_top_prompt,
f"Krea2 POV Prompt Restore should not reintroduce contradictory eye-level camera wording: {restored_top_prompt}",
)
_expect(
any(str(detail).lower() in restored_top_prompt for detail in restored_details),
f"Krea2 POV Prompt Restore final prompt did not include sampled restored details: {restored_top_prompt}",
)
sitting_variant_config = sxcp_nodes.NODE_CLASS_MAPPINGS["SxCPKrea2POVOralFilter"]().build(
"replace",
"",