Use couple wording for same-cast softcore camera prompts
This commit is contained in:
@@ -1054,13 +1054,32 @@ def profile_composition_text(profile: dict[str, Any], subject_kind: str) -> str:
|
||||
if subject_kind == "man" and composition.get("man"):
|
||||
return str(composition["man"])
|
||||
text = str(composition.get("default") or f"{profile['place']} frame with the subjects clearly placed in the room")
|
||||
if subject_kind == "couple":
|
||||
text = text.replace("the subjects", "the couple")
|
||||
text = composition_subject_text(text, subject_kind)
|
||||
if "composition" not in text.lower():
|
||||
text = f"{text} composition"
|
||||
return text
|
||||
|
||||
|
||||
def composition_subject_text(text: str, subject_kind: str) -> str:
|
||||
replacements: dict[str, str] = {}
|
||||
if subject_kind == "woman":
|
||||
replacements = {"The subjects": "The woman", "the subjects": "the woman"}
|
||||
elif subject_kind == "man":
|
||||
replacements = {"The subjects": "The man", "the subjects": "the man"}
|
||||
elif subject_kind == "couple":
|
||||
replacements = {
|
||||
"The subjects": "The couple",
|
||||
"the subjects": "the couple",
|
||||
"The woman": "The couple",
|
||||
"the woman": "the couple",
|
||||
"The man": "The couple",
|
||||
"the man": "the couple",
|
||||
}
|
||||
for old, new in replacements.items():
|
||||
text = text.replace(old, new)
|
||||
return text
|
||||
|
||||
|
||||
def contextual_composition_prompt(
|
||||
scene_text: Any,
|
||||
composition: Any,
|
||||
@@ -1073,6 +1092,7 @@ def contextual_composition_prompt(
|
||||
text = str(composition or "").strip()
|
||||
if not text:
|
||||
return text
|
||||
text = composition_subject_text(text, subject_kind)
|
||||
profile = scene_camera_profile(scene_text, scene_entry=scene_entry, theme=theme, profile_key=profile_key)
|
||||
if not profile:
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user