Clean SDXL imperative hand tags
This commit is contained in:
@@ -600,6 +600,12 @@ def _sdxl_sentence_boundary_tag_issues(name: str, sdxl_prompt: str) -> list[str]
|
||||
return []
|
||||
|
||||
|
||||
def _sdxl_imperative_tag_issues(name: str, sdxl_prompt: str) -> list[str]:
|
||||
if re.search(r"\bkeep\s+hands\b", sdxl_prompt, flags=re.IGNORECASE):
|
||||
return [f"{name}.sdxl_prompt: imperative_keep_hands_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:
|
||||
@@ -741,6 +747,7 @@ def _formatter_issues(
|
||||
issues.extend(_sdxl_hyphen_fragment_issues(name, sdxl_prompt))
|
||||
issues.extend(_sdxl_character_pair_fragment_issues(name, sdxl_prompt))
|
||||
issues.extend(_sdxl_sentence_boundary_tag_issues(name, sdxl_prompt))
|
||||
issues.extend(_sdxl_imperative_tag_issues(name, sdxl_prompt))
|
||||
|
||||
for label, value in (
|
||||
(f"{name}.krea_negative", krea.get("negative_prompt")),
|
||||
|
||||
Reference in New Issue
Block a user