Add coworking camera-aware scene prompts
This commit is contained in:
@@ -2140,6 +2140,10 @@ def _camera_phrase(row: dict[str, Any]) -> str:
|
||||
return ""
|
||||
|
||||
|
||||
def _camera_scene_phrase(row: dict[str, Any]) -> str:
|
||||
return _clean(row.get("camera_scene_directive"))
|
||||
|
||||
|
||||
def _camera_phrase_from_config(config: Any) -> str:
|
||||
if not isinstance(config, dict):
|
||||
return ""
|
||||
@@ -2219,6 +2223,7 @@ def _normal_row_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
flags=re.IGNORECASE,
|
||||
)
|
||||
camera = _camera_phrase(row)
|
||||
camera_scene = _camera_scene_phrase(row)
|
||||
style = _style_phrase(row, style_mode)
|
||||
|
||||
if subject_type == "configured_cast" or _clean(row.get("cast_summary")):
|
||||
@@ -2264,6 +2269,7 @@ def _normal_row_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
f"A consensual explicit adult scene with {subject}" if not action else "",
|
||||
f"The cast includes {cast}" if cast and not cast_prose and not (women_count == 1 and men_count == 1) else "",
|
||||
f"The setting is {scene}" if scene else "",
|
||||
camera_scene,
|
||||
_expression_phrase(expression),
|
||||
_composition_phrase(output_composition, action, "The image is framed as", detail_density),
|
||||
camera,
|
||||
@@ -2281,6 +2287,7 @@ def _normal_row_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
f"{pose}" if pose else "",
|
||||
f"with {expression}" if expression else "",
|
||||
f"in {scene}" if scene else "",
|
||||
camera_scene,
|
||||
f"framed as {composition}" if composition else "",
|
||||
camera,
|
||||
style if detail_level != "concise" else "",
|
||||
@@ -2300,6 +2307,7 @@ def _normal_row_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
_couple_clothing_phrase(item) if item else "",
|
||||
f"The pose is {pose}" if pose else "",
|
||||
f"The setting is {scene}" if scene else "",
|
||||
camera_scene,
|
||||
f"Facial expressions are {expression}" if expression else "",
|
||||
f"The image is framed as {composition}" if composition else "",
|
||||
camera,
|
||||
@@ -2312,6 +2320,7 @@ def _normal_row_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
f"{subject}",
|
||||
f"featuring {item}" if item else "",
|
||||
f"in {scene}" if scene else "",
|
||||
camera_scene,
|
||||
f"with {expression}" if expression else "",
|
||||
f"framed as {composition}" if composition else "",
|
||||
camera,
|
||||
@@ -2332,6 +2341,8 @@ def _insta_pair_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
hard = row.get("hardcore_row") if isinstance(row.get("hardcore_row"), dict) else {}
|
||||
soft_camera = _pair_camera_phrase(row.get("softcore_camera_directive"), row.get("softcore_camera_config"), soft)
|
||||
hard_camera = _pair_camera_phrase(row.get("hardcore_camera_directive"), row.get("hardcore_camera_config"), hard)
|
||||
soft_camera_scene = _camera_scene_phrase(soft) or _clean(row.get("softcore_camera_scene_directive"))
|
||||
hard_camera_scene = _camera_scene_phrase(hard) or _clean(row.get("hardcore_camera_scene_directive"))
|
||||
soft_style = _style_phrase(soft, style_mode)
|
||||
hard_style = _style_phrase(hard, style_mode)
|
||||
options = row.get("options") if isinstance(row.get("options"), dict) else {}
|
||||
@@ -2452,6 +2463,7 @@ def _insta_pair_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
f"{soft.get('pose')}" if soft.get("pose") else "",
|
||||
_expression_phrase(soft_expression),
|
||||
f"in {soft.get('scene_text')}" if soft.get("scene_text") else "",
|
||||
soft_camera_scene,
|
||||
f"framed as {soft_output_composition}" if soft_output_composition else "",
|
||||
soft_camera,
|
||||
soft_style if detail_level != "concise" else "",
|
||||
@@ -2465,6 +2477,7 @@ def _insta_pair_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
),
|
||||
hard_cast_prose,
|
||||
f"set in {hard_scene}" if hard_scene else "",
|
||||
hard_camera_scene,
|
||||
_expression_phrase(hard_expression),
|
||||
_composition_phrase(hard_output_composition, hard_action, detail_density=hard_detail_density),
|
||||
hard_camera,
|
||||
|
||||
Reference in New Issue
Block a user