Preserve connected pair camera detail
This commit is contained in:
+15
-5
@@ -4365,7 +4365,7 @@ def build_insta_of_options_json(
|
||||
hardcore_clothing_continuity: str = "partially_removed",
|
||||
softcore_camera_mode: str = "handheld_selfie",
|
||||
hardcore_camera_mode: str = "from_camera_config",
|
||||
camera_detail: str = "compact",
|
||||
camera_detail: str = "from_camera_config",
|
||||
softcore_expression_intensity: float = 0.45,
|
||||
hardcore_expression_intensity: float = 0.85,
|
||||
softcore_expression_enabled: bool = True,
|
||||
@@ -4413,7 +4413,7 @@ def _parse_insta_of_options(options_json: str | dict[str, Any] | None) -> dict[s
|
||||
"hardcore_clothing_continuity": "partially_removed",
|
||||
"softcore_camera_mode": "handheld_selfie",
|
||||
"hardcore_camera_mode": "from_camera_config",
|
||||
"camera_detail": "compact",
|
||||
"camera_detail": "from_camera_config",
|
||||
"softcore_expression_enabled": True,
|
||||
"hardcore_expression_enabled": True,
|
||||
"softcore_expression_intensity": 0.45,
|
||||
@@ -4453,7 +4453,11 @@ def _parse_insta_of_options(options_json: str | dict[str, Any] | None) -> dict[s
|
||||
and parsed["hardcore_camera_mode"] not in ("from_camera_config", "same_as_softcore")
|
||||
):
|
||||
parsed["hardcore_camera_mode"] = defaults["hardcore_camera_mode"]
|
||||
parsed["camera_detail"] = parsed["camera_detail"] if parsed["camera_detail"] in CAMERA_DETAIL_CHOICES else defaults["camera_detail"]
|
||||
parsed["camera_detail"] = (
|
||||
parsed["camera_detail"]
|
||||
if parsed["camera_detail"] in CAMERA_DETAIL_CHOICES or parsed["camera_detail"] == "from_camera_config"
|
||||
else defaults["camera_detail"]
|
||||
)
|
||||
parsed["softcore_expression_enabled"] = not _is_false(parsed.get("softcore_expression_enabled", True))
|
||||
parsed["hardcore_expression_enabled"] = not _is_false(parsed.get("hardcore_expression_enabled", True))
|
||||
parsed["softcore_expression_intensity"] = _clamped_float(
|
||||
@@ -4477,6 +4481,12 @@ def _parse_insta_of_options(options_json: str | dict[str, Any] | None) -> dict[s
|
||||
return parsed
|
||||
|
||||
|
||||
def _insta_camera_config_with_detail(camera_config: dict[str, Any], camera_detail: str) -> dict[str, Any]:
|
||||
if camera_detail in CAMERA_DETAIL_CHOICES:
|
||||
camera_config["camera_detail"] = camera_detail
|
||||
return camera_config
|
||||
|
||||
|
||||
def _insta_of_hardcore_counts(options: dict[str, Any]) -> tuple[int, int]:
|
||||
policy = str(options.get("hardcore_cast", "use_counts"))
|
||||
if policy == "couple":
|
||||
@@ -4838,8 +4848,8 @@ def build_insta_of_pair(
|
||||
hard_camera_mode = options["softcore_camera_mode"]
|
||||
soft_camera_config = _camera_config_with_mode(camera_config, options["softcore_camera_mode"])
|
||||
hard_camera_config = _camera_config_with_mode(camera_config, hard_camera_mode)
|
||||
soft_camera_config["camera_detail"] = options["camera_detail"]
|
||||
hard_camera_config["camera_detail"] = options["camera_detail"]
|
||||
soft_camera_config = _insta_camera_config_with_detail(soft_camera_config, options["camera_detail"])
|
||||
hard_camera_config = _insta_camera_config_with_detail(hard_camera_config, options["camera_detail"])
|
||||
soft_camera_directive, soft_camera_config = _camera_directive(soft_camera_config)
|
||||
hard_camera_directive, hard_camera_config = _camera_directive(hard_camera_config)
|
||||
soft_camera_sentence = f"Camera control: {soft_camera_directive} " if soft_camera_directive else ""
|
||||
|
||||
Reference in New Issue
Block a user