One of the hardest problems in AI image generation is keeping a character looking like themselves across multiple outputs. StyleFusion’s identity lock system uses face geometry extraction to maintain consistency. This reference covers what gets measured, how confidence works, and how drift prevention operates.
What Gets Measured
When a source image contains a face, the geometry analyzer extracts a set of proportional measurements. These aren’t pixel coordinates; they’re ratios that stay consistent regardless of image resolution or head angle.
Structural ratios:
- Eye spacing relative to face width
- Nose bridge length relative to face height
- Jaw width relative to cheekbone width
- Forehead height ratio
- Chin shape classification (pointed, rounded, square, heart)
Feature characteristics:
- Eye shape classification and symmetry
- Brow arch profile
- Lip proportion (upper to lower ratio)
- Nose bridge width and tip shape
- Ear position relative to eye line
Expression baseline:
- Neutral expression anchor points
- Mouth rest position
- Eye openness default
- Brow tension baseline
The system extracts roughly 40 measurements total. These form the identity signature.
Confidence Scoring
Not all measurements are equally reliable. A straight-on portrait yields high-confidence measurements across the board. A three-quarter view gives good eye and nose data but weaker jaw measurements. A profile view gives strong nose and chin data but poor eye spacing.
Each measurement gets a confidence score from 0 to 1:
- 0.8 to 1.0: high confidence, used as a primary identity anchor
- 0.5 to 0.8: moderate confidence, used as a secondary constraint
- Below 0.5: low confidence, logged but not used for identity lock
The overall identity signature confidence is the weighted average of all measurements. StyleFusion reports this as a single percentage.
Practical thresholds:
- Above 85%: strong identity lock, consistent results expected
- 70 to 85%: good lock, minor variations possible in edge features
- Below 70%: weak lock, consider providing a better reference image
How Identity Lock Works in Prompts
During prompt compilation, the identity signature translates into two types of prompt content:
Positive anchors describe what the face should look like. These are compiled from high-confidence measurements: “defined jawline, almond-shaped eyes, high cheekbones, narrow nose bridge.” The compiler weights these tokens heavily.
Identity negatives describe what the face should not drift toward. These are generated by looking at the identity signature and identifying the most common drift directions for that face type. If the source has a narrow jaw, an identity negative might be “wide jaw, round face” to prevent the model from defaulting to more generic facial proportions.
Drift Prevention
AI models have tendencies. They gravitate toward certain “average” face structures because those appear most frequently in training data. Without intervention, a distinctive face gets smoothed toward something more generic over successive generations.
StyleFusion fights drift at three levels:
Prompt-level: identity negatives actively steer the model away from generic outputs. This is the first line of defense.
Batch comparison: when generating multiple variations, StyleFusion compares each output’s estimated geometry against the source signature. Outputs that drift beyond a configurable threshold get flagged or automatically rejected.
Cross-generation tracking: over a session of multiple generations, the system monitors for cumulative drift. Even if each individual output is within tolerance, a gradual shift in one direction gets caught and corrected by strengthening the relevant identity anchors.
Limitations
Face geometry works best with:
- Clear, well-lit reference images
- Frontal or slight three-quarter angles
- Minimal occlusion (no hands covering face, no heavy shadow)
- Sufficient resolution (at least 512px on the face)
The system doesn’t capture:
- Skin texture detail (handled by texture atoms separately)
- Hair style (too variable, handled as a separate style atom)
- Accessories (glasses, piercings, etc.)
- Age-specific features (wrinkles, skin elasticity)
These are intentional scope limits. Hair, accessories, and age are things you typically want to vary across stylistic outputs, not lock down.
Further Reading
- Understanding Visual Atoms for how face geometry fits into the broader atom system
- StyleFusion Prompt Compilation for how identity anchors get compiled into prompts