CrossPair: Unlocking Generalist Visual Transformation Learning in Image Editors
Organizations: State Key Lab of CAD&CG, Zhejiang University · Ant Group · School of Software Technology, Zhejiang University
Abstract
Language models switch tasks from demonstrations, but vision still often relies on separate systems for restoration, editing, and stylization. A before--after example offers a shared instruction only if the transferable change can be separated from the scene that demonstrates it. We introduce CrossPair, which adapts a pretrained multimodal image editor to transfer diverse transformations from one exemplar pair. Exemplar-before, exemplar-after, and query images take fixed roles in its native VLM and VAE pathways: the VLM extracts operation semantics, while the VAE retains fine appearance and structure. A training-only, change-aware DINOv3 objective aligns feature-change directions across content-distinct scenes, guiding the output to follow the demonstrated relation without an inference-time encoder. We construct Transform-360K by grouping filtered pairs from conditional representations, restoration, editing, virtual try-on, and stylization under shared transformations. On Relation252K-derived seen and held-out transformations, \method improves target agreement and edit-direction similarity over released systems. Ablations show that the semantic and visual exemplar routes are complementary and that DINO relation alignment further strengthens transfer; Transform-360K training also improves aggregate held-out-operation scores.
Figures & tables
| Manifest segment | Records | Share | Manifest segment | Records | Share |
|---|---|---|---|---|---|
| Low-level vision | 20,049 | 22.03% | Style transfer sources | 15,039 | 16.53% |
| Relation252K | 17,600 | 19.34% | Virtual try-on | 13,527 | 14.86% |
| Conditional representations | 11,645 | 12.80% | Reference and segmentation | 10,443 | 11.47% |
| Spatial transformations | 2,144 | 2.36% | Other paired sources | 563 | 0.62% |
| Total: 91,010 records (100%) | |||||
| Deterministic metrics | GPT-5.5 Rank-1 rate (%) | ||||||
| Method | CLIP-I | CLIP-I | CLIP-Dir | LPIPS | Overall | Trans. | Content |
| (a) In-domain: 219 seen transformation groups | |||||||
| LoRWeB ( Manor et al., 2026 ) | 0.772 | 0.690 | 0.309 | 0.479 | 17.3 | 15.1 | 47.8 |
| RelationAdapter ( Gong et al., 2025 ) | 0.777 | 0.602 | 0.355 | 0.429 | 24.0 | 21.3 | 22.3 |
| Qwen Edit ( Wu et al., 2025 ) | 0.715 | 0.599 | 0.302 | 0.614 | 5.0 | 4.0 | 14.7 |
| CrossPair (R252K) | 0.871 | 0.572 | 0.438 | 0.361 | 53.7 | 59.6 | 15.3 |
| OOD component ablation on Relation252K | ||||
|---|---|---|---|---|
| Configuration | CLIP-I | CLIP-I | CLIP-Dir | LPIPS |
| VAE exemplar | 0.711 | 0.685 | 0.279 | 0.426 |
| VLM exemplar | 0.768 | 0.618 | 0.343 | 0.406 |
| VAE+VLM exemplar | 0.776 | 0.620 | 0.350 | 0.402 |
| + DINO relation | 0.778 | 0.622 | 0.369 | 0.400 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Manifest segment | Records | Share | Styles | Slots | Paths |
|---|---|---|---|---|---|
| Low-level vision | 20,049 | 22.03% | 20,049 | 80,196 | 80,196 |
| Relation252K | 17,600 | 19.34% | 1 (220 task ) | 70,400 | 16,994 |
| Virtual try-on | 13,527 | 14.86% | 3,936 | 54,108 | 51,436 |
| Conditional representations | 11,645 | 12.80% | 196 | 46,580 | 14,402 |
| Segmentation/reference perception | 10,443 | 11.47% | 9,723 | 41,772 | 18,387 |
| MegaStyle | 7,552 | 8.30% | 7,552 | 30,208 | 30,208 |
| Family | Manifest groups before final mixture assembly |
|---|---|
| Denoising | SIDD ( Abdelhamed et al., 2018 ) (80) |
| Deblurring | GoPro ( Nah et al., 2017 ) (63), RealBlur ( Rim et al., 2020 ) (234), DPDD ( Abuolaim & Brown, 2020 ) (250) |
| Resolution / moiré | Flickr2K ( Lim et al., 2017 ) (1,325), UHDM ( Yu et al., 2022 ) (1,260) |
| Weather removal | haze (746), rain (392), snow (750), raindrop (505) ( Li et al., 2019 ; Li et al., 2022 ; Liu et al., 2018 ; Qian et al., 2018 ) |
| Illumination / color | LOLv2 ( Wang et al., 2022 ) (894), six Rendered-WB subsets ( Afifi & Brown, 2020 ) (853 each), UIEB ( Li et al., 2020a ) (346) |
| Reflection / shadow | SIR2 ( Wan et al., 2017 ) (72), SRD ( Qu et al., 2017 ) (1,543) |
| Item | Setting |
|---|---|
| Optimizer | AdamW, weight decay 0.01, , |
| Learning rate / schedule | / ConstantLR |
| LoRA rank / target | 128 / modules listed above |
| Per-device batch / accumulation | 1 record / 1 step |
| Precision / distributed optimizer | bfloat16 / DeepSpeed ZeRO-2, no CPU offload |
| Gradient checkpointing | enabled |
| Method | Visual input interface | Steps | Guidance | Seed / output handling |
|---|---|---|---|---|
| Qwen Edit 2511 | one pair in the VLM route; query source remains in both native routes | 40 | 4.0 | ; native output size |
| LoRWeB | one pair and query assembled as a grid; lower-right output crop | repo. default | 2.5 | 50; crop restored to source size |
| RelationAdapter | two conditioning images plus query-source VAE input | 24 | 3.5 | 1000; native output |
| CrossPair | one pair and query through both VLM and VAE routes | 40 | 4.0 | ; native output size |
Image Editing
Image editing changes selected visual content while preserving the parts of an image that should remain unchanged.
See all 315 papers