---
title: 'MirrorPPR: Exemplar-Based Portrait Retouching'
url: https://www.emergentmind.com/topics/mirrorppr
type: topic
---

# MirrorPPR: Exemplar-Based Portrait Retouching

MirrorPPR is a framework for **exemplar-based portrait photo retouching** in which the model is given an exemplar pair \((X_s, X_t)\), where \(X_s\) is an original portrait and \(X_t\) is its retouched version, together with a new query portrait \(X_q\), and produces \(\hat{Y}_q\) that applies **the same retouching operations** to the query image. It is designed for **structural portrait retouching**, where the edit is a delicate and localized geometric transformation such as shrinking a mouth, narrowing a jaw, enlarging eyes, sliming legs, or adjusting shoulder width, rather than a broad semantic rewrite. The framework combines a **Retouching Operation Extractor**, a **pre-trained Diffusion Transformer (DiT)**, an **advanced data self-augmentation paradigm**, and the **MirrorPPR47M** dataset with **over 47 million retouched pairs** [2606.29308].

## 1. Task definition and problem setting

MirrorPPR formalizes portrait retouching as **operation transfer from an exemplar pair**, not prompt following. The exemplar pair \((X_s, X_t)\) specifies the operation, the query portrait \(X_q\) is the target image to be edited, the model output is \(\hat{Y}_q\), and the corresponding ground truth is \(Y_q\) [2606.29308].

The paper argues that **text-guided editing is fundamentally insufficient** for this setting. Structural portrait retouching requires precise control over **where** to edit, **how much** to edit, and **in which direction** to deform anatomy. Natural language is described as too ambiguous to encode the exact scale, spatial locality, or coupled geometry across facial parts. As a result, text-guided models tend to under-edit, over-edit, or distort identity. By contrast, exemplar-based guidance directly demonstrates the intended transformation through a before/after pair [2606.29308].

A central difficulty is that existing exemplar-based editing methods primarily focus on tasks with pronounced visual transformations, whereas structural portrait retouching involves **extremely delicate and localized modifications**. This makes accurate extraction and transfer of the demonstrated operation substantially harder than in conventional exemplar-based editing. The method is therefore organized around isolating an **edit representation** that captures subtle structural change while preserving identity and unedited regions.

## 2. Core framework and representation of retouching operations

MirrorPPR has two major components: a **Retouching Operation Extractor** that learns a compact representation of the edit demonstrated by \((X_s, X_t)\), and a **pre-trained Diffusion Transformer (DiT)** backbone that receives that operation representation and applies it to \(X_q\) [2606.29308].

The extractor consists of a **frozen MAE** and a trainable Transformer called **R-Former**. The frozen MAE produces patch-level features that preserve local structure well. These features are fed into the R-Former together with a small set of **learnable query tokens**. The output features corresponding only to these query tokens are kept and denoted
\[
\mathbf{H}_{edit}.
\]
In the paper’s language, \(\mathbf{H}_{edit}\) is meant to encode the **“edit direction”** rather than the full image content [2606.29308].

To make \(\mathbf{H}_{edit}\) represent edit intent rather than incidental appearance cues, the extractor is first pre-trained with an **auxiliary reconstruction task**. A temporary MLP projects \(\mathbf{H}_{edit}\) to a compact edit embedding \(\mathbf{e}_{edit}\). For a query image \(X_q\), its patch embeddings are obtained, \(\mathbf{e}_{edit}\) is added to each patch token, and a lightweight ViT decoder reconstructs the retouched target \(\hat{Y}_q\). The pre-training loss is
\[
\mathcal{L}_{pre} = \|\hat{Y}_q - Y_q\|_2^2 + \lambda \mathcal{L}_{lpips}(\hat{Y}_q, Y_q).
\]
After this stage, the temporary MLP and decoder are discarded; the extractor has learned a robust operation representation [2606.29308].

The transfer stage uses a **pre-trained Qwen-Image-Edit-2511 backbone**, described as a dual-stream DiT-based editing model. One stream uses **Qwen2.5-VL** to compute high-level visual conditioning features, while the other performs diffusion denoising. Because the task is exemplar-driven rather than text-driven, the method **removes text instructions entirely**. It keeps the frozen Qwen2.5-VL visual encoder to obtain query-image conditioning features \(\mathbf{c}_{img}\), the frozen VAE encoder \(\mathcal{E}\) to obtain the query latent
\[
\mathbf{z}_{cond} = \mathcal{E}(X_q),
\]
and the pre-trained extractor to produce \(\mathbf{H}_{edit}\) from \((X_s, X_t)\) [2606.29308].

The extracted operation features pass through a trainable **connector**, which maps them into the instruction-conditioning space expected by the DiT and produces
\[
\mathbf{c}_{edit}.
\]
The DiT therefore receives two conditions: \(\mathbf{c}_{img}\), which describes what the query portrait looks like, and \(\mathbf{c}_{edit}\), which specifies what retouching operation should be applied.

## 3. Diffusion transfer, flow matching, and parameter-efficient adaptation

MirrorPPR trains the editing model with a **flow-matching loss**. Let
\[
\mathbf{z}_0 = \mathcal{E}(Y_q), \qquad \mathbf{z}_1 \sim \mathcal{N}(0, I),
\]
and for timestep \(t \in [0,1]\),
\[
\mathbf{z}_t = t\mathbf{z}_0 + (1-t)\mathbf{z}_1,\qquad \mathbf{v}_t = \mathbf{z}_0 - \mathbf{z}_1.
\]
The DiT predicts a velocity \(\mathbf{v}_\theta\), trained with
\[
\mathcal{L}_{flow} = \mathbb{E}_{\mathbf{z}_1,\mathbf{z}_0,t} \left[ \left\| \mathbf{v}_\theta([\mathbf{z}_t,\mathbf{z}_{cond}], t, \mathbf{c}_{img}, \mathbf{c}_{edit}) - \mathbf{v}_t \right\|_2^2 \right].
\]
This objective couples the latent target \(Y_q\), the query latent \(X_q\), the visual condition, and the extracted edit condition in a single transfer mechanism [2606.29308].

To adapt the frozen DiT efficiently, MirrorPPR adds **LoRA modules** to its attention blocks and jointly fine-tunes the **pre-trained R-Former**, the **connector**, and the **LoRA parameters**. The DiT’s original weights remain frozen, which preserves the backbone’s generative prior while letting it specialize to portrait retouching [2606.29308].

The reported ablations further specify the adapter design. Increasing query tokens beyond **8** yields only marginal gains, a **4-layer R-Former** is described as the best tradeoff, and **LoRA rank 32** is reported as the sweet spot. In the same ablation, **rank 8 underfits**, while **rank 64** gives slight gains in some metrics but hurts identity preservation and increases cost [2606.29308]. This suggests that the task benefits from a compact but precise operation representation rather than a large, highly expressive adapter.

## 4. Data construction, self-augmentation, and MirrorPPR47M

A major obstacle in exemplar-based retouching is constructing valid training quadruplets
\[
(X_s, X_t, X_q, Y_q).
\]
A naive **cross-identity** strategy often fails because the operation may not be geometrically meaningful across identities or compositions. A second naive strategy sets \(X_q = X_s\) and \(Y_q = X_t\), which avoids cross-identity mismatch but creates a shortcut in which the model can memorize pixel-to-pixel differences at the same spatial coordinates rather than learn the actual retouching semantics [2606.29308].

MirrorPPR addresses this with an **advanced data self-augmentation paradigm**. The same random spatial augmentation \(A\) is applied to both source and target exemplar images:
\[
X_q = A(X_s), \qquad Y_q = A(X_t).
\]
Typical augmentations include **scaling**, **cropping**, **rotation**, and **horizontal flipping**. This preserves the edit semantics exactly, while breaking absolute coordinate alignment and preventing shortcut learning [2606.29308].

To support the task, the authors construct **MirrorPPR47M**, a dataset with **over 47 million retouched pairs**, organized into a **simulated** subset and a **professional** subset [2606.29308].

| Subset | Source and composition | Role |
|---|---|---|
| Simulated Retouching Subset | **FFHQ**; **30,171 images**; **8 base operation types**, each with **2 directions**; **808,439 retouched pairs** | Clean, controlled geometry changes for early-stage learning |
| Professional Retouching Subset | **PPR10K**; **3,789** high-resolution **4K–8K** portraits; **27** fine-grained professional operations; **46,642,845** retouched pairs | Real-world editing behavior with subtler operations |

The simulated subset uses a custom **Landmark-Guided Local Warping (LLW)** method. LLW uses facial landmarks and similarity-based moving least squares deformation to synthesize pronounced structural edits. The professional subset is generated using a **commercial retouching API** and includes operations covering facial features, face shapes, and body proportions [2606.29308].

The dataset construction uses strict filtering. For the simulated subset, only images with small head pose variation and good visual quality are kept. For the professional subset, images with multiple people or too-small portrait regions are removed to ensure single-subject retouching. Each original pair is expanded into about **13.3–13.4 spatially decoupled variations** through synchronized augmentation of both source and target images [2606.29308].

## 5. Curriculum learning, benchmarks, and empirical performance

MirrorPPR47M is organized to support **curriculum learning**. The training schedule is: pre-train the extractor on the **simulated subset** to learn basic structural changes, continue pre-training on the **professional subset** to adapt to subtle realistic edits, and finally fine-tune the full model on professional data [2606.29308]. The paper presents this as an easy-to-hard schedule that helps the model first learn clear geometric operations and then handle difficult real-world retouching.

Evaluation is conducted on two cross-identity benchmarks: **SimFace-100**, defined as **100 combinations from 12 face images, using the 8 simulated operation types**, and **ProPortrait-500**, defined as **500 combinations from 40 high-quality portraits, using the 27 professional operations**. The principal metrics are **PSNR**, **SSIM**, **LPIPS**, and **Face Similarity**, where Face Similarity is measured using **ArcFace cosine similarity** between output and ground truth [2606.29308].

MirrorPPR is compared against multi-reference editors, exemplar-based editors, and text-guided variants of strong generators. The paper lists **Qwen-Image-Edit-2511**, **FLUX.2-dev**, **Nano Banana 2**, **Seedream 4.5**, **Qwen-Image-Edit-2511-ICEdit-LoRA**, **RelationAdapter**, and **EditTransfer** among the baselines [2606.29308].

| Benchmark | Variant | PSNR | SSIM | LPIPS | Face Similarity |
|---|---:|---:|---:|---:|---:|
| SimFace-100 | MirrorPPR-Face | **32.25** | **0.909** | **0.186** | **0.937** |
| ProPortrait-500 | MirrorPPR-Pro | **32.65** | **0.927** | **0.200** | **0.960** |

On **SimFace-100**, the paper states that MirrorPPR-Face achieves **PSNR 32.25**, **SSIM 0.909**, **LPIPS 0.186**, and **Face Similarity 0.937**. On **ProPortrait-500**, MirrorPPR-Pro achieves **PSNR 32.65**, **SSIM 0.927**, **LPIPS 0.200**, and **Face Similarity 0.960** [2606.29308]. The qualitative analysis reports that multi-reference and exemplar-based baselines often confuse operation transfer with **blending or face swapping**, while text-guided models often fail because the prompt is too ambiguous and they may over-edit facial structure. MirrorPPR is described as the only method that consistently transfers the demonstrated retouching while keeping untouched regions and identity stable.

The paper also reports a user study on **ProPortrait-500** with **79%** preference for MirrorPPR-Pro [2606.29308]. A plausible implication is that the gains are not limited to reference-based metrics but are also visually salient under human evaluation.

## 6. Ablations, scope, and relation to other “mirror” research

The ablation study is organized around **Self-Augmentation vs. shortcut learning** and network design. **Self w/o Aug** performs worst, confirming that using the exact exemplar pair as query causes the model to memorize absolute pixel positions. **Self-Augmentation** matches or exceeds Cross-Identity training on simulated data, and on the professional benchmark it clearly beats Cross-Identity, showing that it is especially valuable when cross-identity operation alignment is unreliable [2606.29308].

These findings clarify the main conceptual contribution of MirrorPPR. The framework does not treat portrait retouching as image-to-image stylization, nor as language-conditioned deformation, but as the extraction and transfer of a demonstrated **retouching operation**. The paper’s stated bottom line is that MirrorPPR reframes portrait retouching as **operation transfer from an exemplar pair**, not text following [2606.29308].

The name can be misleading outside its immediate domain. MirrorPPR is distinct from several unrelated mirror-focused research directions. **Reflect3r** uses a mirror reflection as a physically valid virtual view for **single-view 3D stereo reconstruction** rather than portrait retouching [2509.20607]. **Mirror3D** addresses **3D mirror plane** prediction and **depth refinement for mirror surfaces** in RGB-D perception [2106.06629]. **MirrorVerse** targets **photorealistic mirror-reflection generation** with diffusion models [2504.15397]. MirrorPPR belongs instead to exemplar-based image editing and structural portrait manipulation.

A common misconception is to treat MirrorPPR as a text-guided retouching system with an extra reference image, or as a generic exemplar editor. The paper explicitly positions it otherwise: the task is defined by **extremely delicate and localized modifications**, the core representation is extracted from a **before/after exemplar pair**, and the main technical innovations are the **Retouching Operation Extractor**, the **connector + LoRA-enhanced DiT**, the **advanced data self-augmentation paradigm**, and the **MirrorPPR47M** dataset with curriculum learning [2606.29308].

Source: https://www.emergentmind.com/topics/mirrorppr