Sanitize camera-aware composition wording

This commit is contained in:
2026-06-28 00:58:22 +02:00
parent b8d8066fdb
commit 8d58bfdf6a
3 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ THEMATIC_LOCATION_PRESETS = {
{"slug": "coworking_lounge_window", "prompt": "coworking lounge with tall windows, warm desks, laptop tables, glass partition seams, repeated desk rows, plants, and soft shared-office depth"},
],
"compositions": [
"camera-aware coworking lounge frame with the subjects near a desk edge and tall-window depth behind them",
"coworking lounge frame with the subjects near a desk edge and tall-window depth behind them",
"mid-distance workspace lounge composition with laptop tables and glass partition seams readable around the bodies",
"diagonal desk-row frame using repeated work tables, plants, and tall windows for room continuity",
"foreground desk-edge composition with the subject dominant and coworking lounge depth still readable",
+2
View File
@@ -645,6 +645,8 @@ PROFILE_TEXT_FIELDS = (
)
MISMATCHED_COMPOSITION_TERMS = (
"camera-aware",
"camera aware",
"outfit-check",
"outfit check",
"mirror view",
+22
View File
@@ -881,6 +881,26 @@ def smoke_row_camera_policy() -> None:
"coworking lounge frame with the couple near a desk edge" in updated.get("composition", ""),
"row camera policy did not adapt coworking composition for couple rows",
)
stale_internal_row = dict(row)
stale_internal_row["pov_character_labels"] = []
stale_internal_row["composition"] = "camera-aware coworking lounge frame with subjects near a desk edge"
stale_internal_row["prompt"] = (
"A generated adult prompt. Framed as camera-aware coworking lounge frame with subjects near a desk edge. "
"Avoid: low quality."
)
updated_stale_internal = row_camera.apply_camera_config(
stale_internal_row,
_orbit_camera(horizontal_angle=45, vertical_angle=0, zoom=5.5),
compact_labels=pb.CAMERA_COMPACT_LABELS,
)
_expect(
"camera-aware" not in str(updated_stale_internal.get("composition", "")).lower(),
"row camera policy leaked internal camera-aware composition wording",
)
_expect(
"camera-aware" not in str(updated_stale_internal.get("prompt", "")).lower(),
"row camera policy left internal camera-aware wording in prompt",
)
library_row = {
"prompt": "A generated adult prompt. Composition: vertical polished mirror view with bag and shoes visible. Avoid: low quality.",
"caption": "sxcppnl7, generated adult prompt, polished mirror view with bag and shoes visible, illustration",
@@ -1848,6 +1868,8 @@ def smoke_location_config_policy() -> None:
"Workspace theme lost coworking lounge location slug",
)
_expect(workspace_composition_payload.get("composition_entries"), "Workspace theme did not output compositions")
workspace_compositions_text = " ".join(str(entry) for entry in workspace_composition_payload.get("composition_entries") or [])
_expect("camera-aware" not in workspace_compositions_text.lower(), "Workspace theme leaked internal camera-aware wording")
replaced_after_theme = json.loads(
location_config.build_location_pool_json(
enabled=True,