Extract row text field resolution
This commit is contained in:
+13
-16
@@ -812,6 +812,14 @@ def _format(template: str, context: dict[str, Any]) -> str:
|
||||
return row_rendering_policy.format_template(template, context)
|
||||
|
||||
|
||||
def _row_text_fields(
|
||||
category: dict[str, Any],
|
||||
subcategory: dict[str, Any],
|
||||
item: Any,
|
||||
) -> row_rendering_policy.RowTextFields:
|
||||
return row_rendering_policy.resolve_row_text_fields(category, subcategory, item)
|
||||
|
||||
|
||||
def _clean_prompt_punctuation(text: str) -> str:
|
||||
return row_expression_policy.clean_prompt_punctuation(text)
|
||||
|
||||
@@ -2269,18 +2277,7 @@ def _build_custom_row(
|
||||
position_key = str(action_route.get("position_key") or "")
|
||||
action_family = str(action_route.get("action_family") or "")
|
||||
|
||||
negative_prompt = str(_merged_field(category, subcategory, item, "negative_prompt", g.NEGATIVE_PROMPT))
|
||||
positive_suffix = str(_merged_field(category, subcategory, item, "positive_suffix", GENERIC_POSITIVE_SUFFIX))
|
||||
style = str(
|
||||
_merged_field(
|
||||
category,
|
||||
subcategory,
|
||||
item,
|
||||
"style",
|
||||
"sexy but tasteful adult pin-up coloured-pencil comic illustration",
|
||||
)
|
||||
)
|
||||
item_label = str(_merged_field(category, subcategory, item, "item_label", category["name"]))
|
||||
text_fields = _row_text_fields(category, subcategory, item)
|
||||
|
||||
assembly_request = row_assembly_policy.CustomRowAssemblyRequest(
|
||||
row_number=row_number,
|
||||
@@ -2295,10 +2292,10 @@ def _build_custom_row(
|
||||
item_axis_values=item_axis_values,
|
||||
item_template_metadata=item_template_metadata,
|
||||
formatter_hints=item_formatter_hints,
|
||||
item_label=item_label,
|
||||
style=style,
|
||||
positive_suffix=positive_suffix,
|
||||
negative_prompt=negative_prompt,
|
||||
item_label=text_fields.item_label,
|
||||
style=text_fields.style,
|
||||
positive_suffix=text_fields.positive_suffix,
|
||||
negative_prompt=text_fields.negative_prompt,
|
||||
scene_slug=scene_slug,
|
||||
scene=scene,
|
||||
pose=pose,
|
||||
|
||||
Reference in New Issue
Block a user