Style reference chips with thumbnails
tests / test (push) Canceled after 0s
tests / windows-storage (push) Canceled after 0s

This commit is contained in:
2026-10-15 10:27:06 +00:00
parent 4661648cf5
commit d7fad73ec1
4 changed files with 32 additions and 12 deletions
+3 -2
View File
@@ -182,12 +182,13 @@ class DumasH3SequencePromptBuilder:
)
selectors = []
for reference_index in range(1, 10):
tag = f"R{reference_index}"
chunks = []
for chunk_index, clip in enumerate(sequence["clips"], start=1):
text = "\n".join(str(slot.get("text", "")) for slot in clip["slots"])
if kwargs.get(f"reference_image_{reference_index}") is not None and re.search(
rf"@{tag}(?![A-Za-z0-9_])", text, re.IGNORECASE
rf"@(R{reference_index}|image{reference_index})(?![A-Za-z0-9_])",
text,
re.IGNORECASE,
):
chunks.append(chunk_index)
selectors.append(",".join(map(str, chunks)) or "off")