Share:

Photo Quality Strategy Report

Iconic by AI — Test Batch System & Path to 85%+ | 5 March 2026

1. What We're Doing

We have 7 demo accounts — real people with real selfies and trained LoRA models. Every time we change the photo generation code (prompts, settings, scoring, post-processing), we regenerate ALL demo batches and compare before/after scores. This gives us a controlled, repeatable way to measure whether changes actually improve quality.

The Testing Loop
Make Code Change
Run: node run_test_batches.js
All 7 Batches Regenerate
Face Scoring (ArcFace)
Before/After Comparison

Old photos are backed up — nothing gets deleted. Every run is saved to test_results/ with full score history.

2. Current Scores — Where We Stand

Batches
7
demo accounts
Total Photos
103
across all batches
Overall Avg
72%
face similarity
Above 85%
4
out of 103
Above 70%
68
66% of photos
Below 50%
3
worst offenders
Target
85%+
ALL photos
NameGenderAgeHeightPhotosAvgBestWorst≥85%≥70%<50%Gap to 85%
ScottMale355'7"8 81%87%79% 18/80-4%
SarahFemale455'3"8 78%94%52% 36/80-7%
EmilyFemale185'8"21 73%80%62% 018/210-12%
Neil 1Male496'1"17 73%83%50% 014/170-12%
Neil 2Male496'1"11 71%77%64% 07/110-14%
MikeMale526'0"21 69%77%58% 014/210-16%
ChloeFemale165'6"17 61%73%44% 01/173-24%
OVERALL103 72%94%44% 468/1033-13%

3. The Problem

The LoRA generates photos where the face sometimes drifts — different angle, slightly different features, wrong expression. The clothing and background are fine, but the face doesn't match the selfies closely enough. Some photos nail it (94%!), others miss badly (44%).

Key Observation

Sarah's best photo scores 94% — proof the LoRA CAN produce a near-perfect face. Her worst is 52%. If we could put that 94% face on every photo, we'd be done. The face is right. The outfit changes shouldn't affect the face score.

The gap between best and worst per person tells the story:

PersonBestWorstGapMeaning
Sarah94%52%42ptsLoRA CAN do it — just inconsistent
Chloe73%44%29ptsTeen face is hard — needs retrain at 1500 steps
Neil 183%50%33ptsSome styles break the face more than others
Mike77%58%19ptsModerate drift — fixable
Emily80%62%18ptsYoung face, moderate drift
Neil 277%64%13ptsMost consistent — smallest gap
Scott87%79%8ptsAlmost there — best performer

4. The Strategy — Face Swap Post-Processing

Instead of trying to get the LoRA to generate a perfect face every time (unreliable), we fix the face after generation. This is how professional AI photo studios work:

1
Generate Photo with LoRA (current system)
Generate the full photo as we do now — clothes, background, pose, lighting. The face might be 60-80%. That's fine.
2
Take the Best Face
From the batch, find the highest-scoring photo. That face is the one we want on ALL photos. Or even better — use the original selfie as the face source.
3
Face Swap onto Every Photo
Use a face swap model to replace the generated face with the best face / selfie face. The body, clothes, background, pose all stay. Only the face changes. Result: every photo should score 85%+.
4
Light Cleanup (Optional)
Remove blemishes, smooth skin, fix lighting on the swapped face so it blends naturally. Face restoration models (CodeFormer, GFPGAN) handle this automatically.

The Pipeline Would Be:

LoRA generates photo
Face swap (selfie → generated)
Face restore / cleanup
ArcFace score check
85%+ guaranteed

5. Available Tools (Replicate Models)

ModelWhat It DoesBest ForSpeedCost
Face Fusion
lucataco/facefusion
Takes a source face and swaps it onto a target photo. Preserves pose, lighting, expression of target. Exactly what we need — swap selfie face onto generated photo ~10s ~$0.01
InsightFace Swap
yan-ops/face_swap
InsightFace-based face swap. High quality face replacement. Same approach — proven InsightFace tech ~8s ~$0.01
Flux Inpainting
black-forest-labs/flux-fill-pro
Masks part of image, regenerates masked area with prompt. Could mask clothes/bg and keep face. Could change clothes on best photo — but might shift face ~15s ~$0.03
CodeFormer
lucataco/codeformer
Face restoration — removes blemishes, smooths skin, fixes artifacts after swap. Post-swap cleanup — makes face look natural ~5s ~$0.005
IP-Adapter Face
Various
Uses a face image as a "style reference" during generation. Guides the model to produce similar face. Could help during generation — but less reliable than post-swap ~20s ~$0.03

6. Approach Comparison

Current: LoRA Only (avg 72%)

Generate photo with LoRA. Face quality depends on luck.

  • Face match varies 44%–94%
  • Some styles break the face more
  • 2-candidate system helps but not enough
  • Can't guarantee 85%+ on all
  • Re-rolling is expensive and unreliable

Proposed: LoRA + Face Swap (target 85%+)

Generate photo, then swap in the real face. Guaranteed consistency.

  • Face comes from selfie — always accurate
  • Clothes, bg, pose from LoRA generation
  • ~$0.01 extra per photo for swap
  • ~$0.005 extra for face cleanup
  • Consistent 85%+ across all styles

7. Cost Impact

StepCurrent CostNew CostChange
LoRA Training~$2.50~$2.50Same
Photo Generation (21 photos x 2 candidates)~$1.26~$1.26Same
Face Swap (21 photos)-~$0.21New
Face Restore (21 photos)-~$0.11New
Face Scoring~$0 (local)~$0 (local)Same
TOTAL per client~$3.76~$4.08+$0.32 (+8%)

8% cost increase for a potential jump from 72% to 85%+ average. That's the trade.

8. Implementation Plan

1
Phase 1 — Test Face Swap on Current Photos (No Deletion)
Take existing generated photos. Run face swap using the best selfie as the source face. Save the swapped versions ALONGSIDE the originals (e.g., 01_Classic_Studio_swapped.png). Score both. Compare side-by-side. We don't delete anything — we just see if swapping improves scores.

No risk ~30 min to build ~$0.15 per batch to test
2
Phase 2 — Add Face Restore / Cleanup
After swapping, run CodeFormer to clean up the face — fix any artifacts from the swap, remove blemishes, smooth skin. This makes the swap look seamless.

Low risk ~15 min to add
3
Phase 3 — Integrate into Pipeline
If Phase 1-2 prove out, add face swap + restore as automatic post-processing steps in generate_photos.js. Every generated photo gets the swap applied. Score after swap. Auto-regen only if still under 85% after swap.

Medium effort ~1 hour
4
Phase 4 — Inpainting for Variety
For the absolute best photo (e.g., Sarah's 94%), use Flux inpainting to mask JUST the clothes and regenerate with different outfit prompts. Same face, same pose, different outfit. This gives maximum variety with guaranteed face quality.

Experimental ~2 hours

9. Per-Batch Score Breakdown

Scott Male, 35, 5'7", Black
81% avg
Classic Studio 87% Outdoor Natural 83% Tailored Blazer 83% Smart Casual 80% Casual Denim 80% Content Creator 80% Studio Dramatic 79% Leather Jacket 79%

Closest to target. Face swap could push all 8 photos above 85%.

Sarah Female, 45, 5'3", White, Dark Brown Hair
78% avg
Studio Dramatic 94% Brunch Aesthetic 90% Classic Studio 87% Golden Hour 79% Active Outdoors 79% Street Style 73% Editorial Minimal 68% Yoga Studio 52%

Best single photo (94%). 3 already above 85%. Yoga Studio needs swap badly.

Emily Female, 18, 5'8", White, Light Brown Hair
73% avg
VIP Nightlife 80% Penthouse 80% Magazine Cover 78% Urban Night 77% Studio Dramatic 75% Business Headshot 75% Coffee Shop 75% Outdoor Athletic 75% Gym Action 75% Studio Warm 74% Smart Casual 74% Casual Denim 74% Tailored Blazer 72% Leather Jacket 72% Outdoor Natural 72% Fitness Cover 72% Luxury Car 70% Red Carpet 70% Classic Studio 69% Content Creator 65% Fitness Athletic 62%

Consistent 70s. No single photo above 85%. Face swap should lift the entire batch.

Neil 1 Male, 49, 6'1", White, Dark Brown Hair
73% avg
Urban Night 83% Leather Jacket 78% Outdoor Natural 78% Gym Action 78% Coffee Shop 77% Tailored Blazer 77% Smart Casual 77% Business Headshot 77% Casual Denim 77% Studio Dramatic 76% Content Creator 74% Classic Studio 73% Outdoor Athletic 72% Fitness Athletic 70% Streetwear 65% Urban Rooftop 61% Editorial White 50%
Neil 2 Male, 49, 6'1", White, Dark Brown Hair
71% avg
Outdoor Natural 77% Tailored Blazer 76% Smart Casual 74% Casual Denim 74% Studio Dramatic 72% Business Headshot 72% Casual Denim 71% Classic Studio 68% Content Creator 68% Studio Dramatic 65% Urban Night 64%
Mike Male, 52, 6'0", White, Grey Hair
69% avg
Studio Warm 77% Classic Studio 74% Outdoor Athletic 73% Fitness Athletic 73% Fitness Cover 73% Tailored Blazer 72% Outdoor Natural 72% Magazine Cover 71% Studio Dramatic 70% Smart Casual 70% Business Headshot 70% Casual Street 70% Gym Action 70% Penthouse 70% Leather Jacket 67% Casual Denim 67% Coffee Shop 67% VIP Nightlife 67% Red Carpet 67% Urban Rooftop 61% Luxury Car 58%
Chloe Female, 16, 5'6", White, Blonde, Blue Eyes
61% avg
Casual Street 73% Casual Denim 69% Fitness Indoor 69% Magazine Cover 68% Business Chic 67% Luxury Car 67% Brand Portrait 65% Bohemian Chic 65% Outdoor Natural 65% VIP Nightlife 61% Classic Studio 59% Red Carpet 58% Studio Dramatic 56% Studio Warm 53% Modern Elegant 48% Beach Sunset 47% Penthouse 44%

Worst performer. Teen face + 1000-step LoRA. Needs retrain at 1500 steps AND face swap.

10. Recommended Next Step

Phase 1 — Test Face Swap Now

Pick one batch (Scott — already at 81%). Run face swap on all 8 photos using his best selfie as the source. Save swapped versions alongside originals. Score both. If face swap lifts all photos to 85%+, we roll it out to all 7 batches.

Estimated time: 30 minutes to build, 2 minutes to run on Scott's 8 photos.

Estimated cost: ~$0.08 (8 photos x $0.01 swap).

If it works on Scott, we immediately test on Chloe (hardest case at 61%). If it works on both, we integrate it into the pipeline.