Expose built-in category presets

This commit is contained in:
2026-06-27 16:51:31 +02:00
parent 87f3645115
commit 3cb44af410
2 changed files with 14 additions and 0 deletions
+4
View File
@@ -9,6 +9,10 @@ RANDOM_SUBCATEGORY = "random"
CATEGORY_PRESETS = {
"auto_weighted": ("auto_weighted", RANDOM_SUBCATEGORY),
"auto_full": ("auto_full", RANDOM_SUBCATEGORY),
"woman": ("woman", RANDOM_SUBCATEGORY),
"man": ("man", RANDOM_SUBCATEGORY),
"couple": ("couple", RANDOM_SUBCATEGORY),
"group_or_layout": ("group_or_layout", RANDOM_SUBCATEGORY),
"women_casual": ("Casual clothes", RANDOM_SUBCATEGORY),
"men_casual": ("Men casual clothes", RANDOM_SUBCATEGORY),
"couple_casual": ("Couple casual clothes", RANDOM_SUBCATEGORY),
+10
View File
@@ -980,6 +980,8 @@ def smoke_config_route_location_theme() -> None:
_expect("parking" in parking_composition.lower() or "garage" in parking_composition.lower() or "pillar" in parking_composition.lower(), "parking theme did not drive composition")
_expect(parking_row.get("location_theme") == "parking_garage", "parking location theme did not survive")
_expect(parking_row.get("scene_theme") == "parking_garage", "parking scene theme did not survive")
_expect(parking_row.get("main_category") == "woman", "parking built-in woman preset fell back to another category")
_expect(parking_row.get("primary_subject") == "woman", "parking built-in woman preset did not generate a woman")
_expect(parking_row.get("scene_camera_profile_key") == "parking_garage", "parking theme did not expose camera profile key")
_expect(parking_profile.get("family") == "semi_public", "parking camera profile family should be semi_public")
_expect("Parking garage camera layout" in parking_directive, "parking theme did not drive camera-scene adapter")
@@ -1019,6 +1021,8 @@ def smoke_config_route_location_theme() -> None:
)
_expect(creator_row.get("location_theme") == "creator_bedroom", "creator location theme did not survive")
_expect(creator_row.get("scene_theme") == "creator_bedroom", "creator scene theme did not survive")
_expect(creator_row.get("main_category") == "woman", "creator built-in woman preset fell back to another category")
_expect(creator_row.get("primary_subject") == "woman", "creator built-in woman preset did not generate a woman")
_expect(creator_row.get("scene_camera_profile_key") == "creator_bedroom", "creator theme did not expose camera profile key")
_expect(creator_profile.get("family") == "private_creator", "creator camera profile family should be private_creator")
_expect("Creator room camera layout" in creator_directive, "creator theme did not drive camera-scene adapter")
@@ -2313,6 +2317,8 @@ def smoke_category_extensions_policy() -> None:
def smoke_category_cast_config_policy() -> None:
_expect(pb.CATEGORY_PRESETS is category_cast_config.CATEGORY_PRESETS, "Prompt builder category presets are not delegated")
_expect(pb.CAST_PRESETS is category_cast_config.CAST_PRESETS, "Prompt builder cast presets are not delegated")
_expect("woman" in category_cast_config.category_preset_choices(), "Category preset choices lost built-in woman")
_expect("man" in category_cast_config.category_preset_choices(), "Category preset choices lost built-in man")
_expect("hardcore_pose" in category_cast_config.category_preset_choices(), "Category preset choices lost hardcore_pose")
_expect("custom_counts" in category_cast_config.cast_preset_choices(), "Cast preset choices lost custom_counts")
_expect(
@@ -2379,6 +2385,10 @@ def smoke_category_cast_config_policy() -> None:
_expect(category_config.get("category") == "Hardcore sexual poses", "Category config lost hardcore category mapping")
_expect(category_config.get("subcategory") == "Foreplay and teasing", "Category config lost explicit subcategory")
_expect(pb._parse_category_config(category_config) == ("Hardcore sexual poses", "Foreplay and teasing"), "Category parser wrapper drifted")
builtin_woman_config = json.loads(pb.build_category_config_json("woman", "random"))
_expect(builtin_woman_config.get("preset") == "woman", "Built-in woman category preset fell back")
_expect(builtin_woman_config.get("category") == "woman", "Built-in woman category config lost direct category")
_expect(pb._parse_category_config(builtin_woman_config) == ("woman", "random"), "Built-in woman category parser drifted")
fallback_config = json.loads(category_cast_config.build_category_config_json("unknown", "random"))
_expect(fallback_config.get("preset") == "auto_weighted", "Unknown category preset did not fall back")