Always prepend the Comfy identity prefix and keep refs on every shot.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-27 07:19:56 -05:00
co-authored by Cursor
parent 4840b2719d
commit d540b8c283
3 changed files with 17 additions and 15 deletions
+2 -2
View File
@@ -13,11 +13,11 @@ export function identityBoilerplate(extraRefs: number | number[] = 0) {
: extras.length === 1
? ` <Picture ${extras[0]}> is a secondary reference angle for profile details.`
: ` ${extras.map(n => `<Picture ${n}>`).join(' and ')} are secondary reference angles for profile features only.`
return `<Picture 1> is the exact facial identity, hairstyle, body proportions and clothing of the main character. Preserve this identity with high fidelity even when the subject temporarily leaves the frame and returns.${secondary}`
return `<Picture 1> is the primary identity anchor defining exact facial geometry, hairstyle, and body proportions.${secondary} Strictly maintain the structural proportions of <Picture 1> with high fidelity when moving.`
}
export function looksLikeIdentityPrompt(text: string) {
return /primary identity anchor|exact facial identity/i.test(String(text || ''))
return /^<Picture 1> is the (primary identity anchor|exact facial identity)/i.test(String(text || '').trim())
}
export function buildIdentityPrompt(actionPrompt: string, extraRefs: number | number[] = 0) {