A photo of us, anywhere. — Synthesizing authentic, high-fidelity dual portraits from two separate individual photos with zero identity leakage and warm cinematic film tone.
⚡ Launch DuoPortrait Studio (duoportrait.com)
Welcome to the official developer documentation, prompt engineering recipes, and pipeline architecture guides for DuoPortrait.
DuoPortrait solves a fundamental challenge in generative vision: taking two independent portrait photographs taken under completely different lighting conditions, angles, and camera profiles, and seamlessly compositing them into a single, cohesive, four-variation Polaroid photograph as if both subjects were physically present together in the same space.
+-------------------------------------------------------------------------------+
| DuoPortrait Architecture |
+-----------------------+-------------------------------+-----------------------+
| 1. Identity Control | 2. Lighting Harmony | 3. Film Synthesis |
| | | |
| * InsightFace align | * Dual shadow harmonization | * Wong Kar-wai tone |
| * InstantID guidance | * Ambient light bounce match | * Analog grain model |
| * PuLID cross-attn | * Mutual occlusion depth | * Polaroid 4-roll |
+-----------------------+-------------------------------+-----------------------+
Standard image-to-image or single-subject LoRA adapters fail when applied to two simultaneous subjects; identity cross-talk frequently blurs facial distinctiveness or swaps attributes. DuoPortrait utilizes a partitioned cross-attention matrix combining InstantID facial landmark projectors and PuLID contrastive embedding adapters, routing identity tokens to dedicated subject bounding boxes with strict separation.
Rather than relying on flat collage cutouts, our pipeline employs FLUX Kontext adapters to recalculate light interaction between subjects:
- Mutual shadowing: When subject A stands beside subject B, correct ray-cast shadowing falls realistically across shoulder and cheek contours.
- Ambient color bleed: Saturated elements (e.g. a red silk kimono or burgundy velvet jacket) cast appropriate diffuse bounces onto neighboring skin tones.
Each generation yields a collectible four-variation Polaroid sheet rendered in a warm, textured color palette inspired by vintage cinema (Wong Kar-wai, Kodachrome 64, and Fujifilm Pro 400H).
| Mode | Target User Intent | Visual & Emotional Direction |
|---|---|---|
| Long-Distance Couples | Partners living in different cities or countries who lack recent photos together. | Sweet, cinematic, warm morning sunlight, candid intimacy. |
| Remembrance & Healing | Bringing a departed parent, grandparent, or child into a modern family portrait. | Dignified, quiet, restrained, respectful lighting, timeless framing. |
| Fan & Memorial Reunion | Tasteful, consent-gated portraits celebrating historical or artistic inspirations. | Dreamy, artistic, editorial, vintage salon aesthetic. |
Explore the complete technical guides and prompt engineering specifications:
- Workflows & Architecture
- InstantID Facial Conditioning: Landmark extraction, multi-subject mask routing, and pose conditioning.
- PuLID & FLUX Kontext: High-fidelity ID injection without contrast degradation or plastic skinning.
- Polaroid & Color Science: Film grain synthesis, LUT matrices, and Polaroid sheet layout specs.
- Production Prompt Recipes
- Long-Distance Couple Recipes: Kyoto Hanami, Paris Bistro, Big Sur Highway, Peach Dawn Rooftop, and Vinyl Record Store.
- Remembrance & Family Recipes: Paper-shadow sunroom, autumn porch, Kodachrome living room, and silver-gelatin studio.
- Classical & Tactile Editorial: Tang dynasty silk Hanfu, graphite line wash, terracotta ceramics, and botanical glasshouse.
- Bridal & Evening Gala: Minimalist Korean bridal, red-carpet spotlight gala, cathedral velvet, and Tuscan vineyard.
- System Specifications
- Technical Specs & Format Standards: Resolution requirements, input aspect ratios, inference latency, and R2 CDN integration.
- Privacy, Consent & Safety Guardrails: Consent enforcement, deepfake prevention, biometric privacy, and data purge lifecycles.
- API & Integration Specs: REST endpoints, webhook payloads, and self-hosted mock pipeline configuration.
- Main SaaS Studio: https://duoportrait.com
- Source Code & Issue Tracker: https://github.com/miatanaka/duoportrait
- Documentation Host: https://miatanaka.github.io/duoportrait/
The documentation, prompt recipes, and workflow architectures are open-sourced under the MIT License. Commercial access to the high-throughput GPU synthesis pipeline is provided via duoportrait.com.