Sanitize camera-aware composition wording
This commit is contained in:
+1
-1
@@ -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"},
|
{"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": [
|
"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",
|
"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",
|
"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",
|
"foreground desk-edge composition with the subject dominant and coworking lounge depth still readable",
|
||||||
|
|||||||
@@ -645,6 +645,8 @@ PROFILE_TEXT_FIELDS = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
MISMATCHED_COMPOSITION_TERMS = (
|
MISMATCHED_COMPOSITION_TERMS = (
|
||||||
|
"camera-aware",
|
||||||
|
"camera aware",
|
||||||
"outfit-check",
|
"outfit-check",
|
||||||
"outfit check",
|
"outfit check",
|
||||||
"mirror view",
|
"mirror view",
|
||||||
|
|||||||
@@ -881,6 +881,26 @@ def smoke_row_camera_policy() -> None:
|
|||||||
"coworking lounge frame with the couple near a desk edge" in updated.get("composition", ""),
|
"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",
|
"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 = {
|
library_row = {
|
||||||
"prompt": "A generated adult prompt. Composition: vertical polished mirror view with bag and shoes visible. Avoid: low quality.",
|
"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",
|
"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",
|
"Workspace theme lost coworking lounge location slug",
|
||||||
)
|
)
|
||||||
_expect(workspace_composition_payload.get("composition_entries"), "Workspace theme did not output compositions")
|
_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(
|
replaced_after_theme = json.loads(
|
||||||
location_config.build_location_pool_json(
|
location_config.build_location_pool_json(
|
||||||
enabled=True,
|
enabled=True,
|
||||||
|
|||||||
Reference in New Issue
Block a user