Preserve hyphenated SDXL tags

This commit is contained in:
2026-06-27 22:14:20 +02:00
parent c74798d80f
commit 15b28b422f
3 changed files with 12 additions and 1 deletions
+7
View File
@@ -582,6 +582,12 @@ def _sdxl_expression_label_issues(name: str, sdxl_prompt: str) -> list[str]:
return []
def _sdxl_hyphen_fragment_issues(name: str, sdxl_prompt: str) -> list[str]:
if re.search(r"\b[a-z]+-,\s*-[a-z]+", sdxl_prompt, flags=re.IGNORECASE):
return [f"{name}.sdxl_prompt: broken_hyphenated_tag"]
return []
def _trace_dict(formatter_name: str, payload: dict[str, Any]) -> tuple[dict[str, Any], str]:
trace_text = str(payload.get("route_trace_json") or "")
if not trace_text:
@@ -720,6 +726,7 @@ def _formatter_issues(
issues.extend(_composition_label_issues(name, prompts))
issues.extend(_sdxl_composition_tag_issues(name, sdxl_prompt))
issues.extend(_sdxl_expression_label_issues(name, sdxl_prompt))
issues.extend(_sdxl_hyphen_fragment_issues(name, sdxl_prompt))
for label, value in (
(f"{name}.krea_negative", krea.get("negative_prompt")),