Independent research into identity-consistent generative AI pipelines. Every quality threshold is statistically calibrated against measured data — not hand-tuned — and a guard-railed MCP layer lets an autonomous agent operate the pipeline within evidence-gated limits.
A staged scoring engine sequencing four independent signal types — identity, anatomy, duplication, composition — so only one model is resident in memory at a time.
┌─────────────────────────────────────────┐
│ STAGE 1 — IDENTITY │
│ InsightFace · multi-reference weighted │
│ prototype · top-k cosine aggregation │
└──────────────────┬────────────────────────┘
▼
┌─────────────────────────────────────────┐
│ STAGE 2 — ANATOMY │
│ MediaPipe hand-landmark geometry · │
│ finger-ratio & joint-bend checks │
└──────────────────┬────────────────────────┘
▼
┌─────────────────────────────────────────┐
│ STAGE 3 — DUPLICATES │
│ pHash + ArcFace + DINOv2 embedding │
│ cosine similarity │
└──────────────────┬────────────────────────┘
▼
┌─────────────────────────────────────────┐
│ STAGE 4 — COMPOSITION │
│ SigLIP · advisory only after measuring │
│ weak separation power │
└─────────────────────────────────────────┘
one model resident in memory at a time —
RAM-bounded on constrained hardwareEach stage is staged deliberately, not just logically separated: only one scoring model is ever resident in memory, bounding peak RAM on constrained hardware. Composition scoring (SigLIP) was demoted from hard-reject to advisory after measuring that its separation power was too weak to gate on alone — evidence changed the architecture, not just a threshold.
Every gate threshold is derived from measured data — leave-one-out cross-validation and balanced-accuracy sweeps — not hand-guessed constants.
≈15× FASTER — BATCHED SIGLIP FORWARD PASSES, NO REDUNDANT MODEL RELOADS
A production run once rejected 93 of 100 images. The cause traced to three independently miscalibrated face-detection gates — an uncalibrated confidence floor, raw face-count rejection instead of same-identity-aware competing-face detection, and an area-ratio gate fighting the pipeline’s own diversity targets. A separate class-imbalance trap was caught before shipping: a naive accuracy-maximizing sweep would have selected a threshold rejecting 97% of the pipeline’s own good output.
RunPod-serverless and local ComfyUI generation behind one interface. The orchestrator enforces strict generate/score alternation — scoring is fully stopped before generation starts and vice versa — with OOM-aware retry and cross-process locking for safe resumability.
A from-scratch Docker image pinning a specific ComfyUI core version and several custom node packages, deployed on a scale-to-zero serverless endpoint (L40S / RTX 6000 Ada 48GB class). FP8 vs. BF16 quality-parity and VRAM-headroom trade-offs evaluated before committing to an instance size.
A curated, write-restricted tool surface (10 tools — status, analysis, batch generation, calibration, drift analysis) lets an autonomous agent operate the pipeline. Config writes require justification strings, automatic backups, an audit log, and evidence-gated thresholds (n ≥ 8, lift ≥ 1.8) before any change is allowed.
Character LoRA trained via Ostris ai-toolkit. Production checkpoint chosen by controlled multi-checkpoint comparison after discovering the automated identity-similarity metric declined monotonically with training steps — it would have selected a checkpoint with visible defects invisible to the metric alone.