In-Context Brush: Zero-shot Customized Subject Insertion with Context-Aware Latent Space Manipulation
On the map: Diffusion models → 3D, point cloud and scene generation
Abstract (arXiv)
Recent advances in diffusion models have enhanced multimodal-guided visual generation, enabling customized subject insertion that seamlessly "brushes" user-specified objects into a given image guided by textual prompts. However, existing methods often struggle to insert customized subjects with high fidelity and align results with the user's intent through textual prompts. In this work, we propose "In-Context Brush", a zero-shot framework for customized subject insertion by reformulating the task within the paradigm of in-context learning. Without loss of generality, we formulate the object image and the textual prompts as cross-modal demonstrations, and the target image with the masked region as the query. The goal is to inpaint the target image with the subject aligning textual prompts without model tuning. Building upon a pretrained MMDiT-based inpainting network, we perform test-time enhancement via dual-level latent space manipulation: intra-head "latent feature shifting" within each attention head that dynamically shifts attention outputs to reflect the desired subject semantics and inter-head "attention reweighting" across different heads that amplifies prompt controllability through differential attention prioritization. Extensive experiments and applications demonstrate that our approach achieves superior identity preservation, text alignment, and image quality compared to existing state-of-the-art methods, without requiring dedicated training or additional data collection.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in 3D, point cloud and scene generation, one of 14 directions in Diffusion models. Builds on 47 of its 62 references that are in the map. First posted on arXiv 26 May 2025.
Builds on
47 of 62 references.
Closest ancestors · 2
Same direction, newest first
- 2025OmniPaint: Mastering Object-Oriented Editing via Disentangled Insertion-Removal Inpainting11 Mar
- 2024ObjectDrop: Bootstrapping Counterfactuals for Photorealistic Object Removal and Insertion27 Mar
Other references · 45
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
- 2023GPT-4 Technical Reportcited by 18,396
- 2014Microsoft COCO: Common Objects in Contextcited by 17,608
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Segment Anythingcited by 8,234
- 2022Scalable Diffusion Models with Transformerscited by 6,054
- 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesiscited by 4,356
- 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesiscited by 4,181
- 2023Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detectioncited by 3,332
- 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generationcited by 3,300
33 more
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2022Prompt-to-Prompt Image Editing with Cross Attention Controlcited by 2,431
- 2022An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversioncited by 2,245
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2022A Survey on In-context Learningcited by 721
- 2022Paint by Example: Exemplar-based Image Editing with Diffusion Modelscited by 489
- 2023AnyDoor: Zero-shot Object-level Image Customizationcited by 412
- 2022Images Speak in Images: A Generalist Painter for In-Context Visual Learningcited by 318
- 2023Break-A-Scene: Extracting Multiple Concepts from a Single Imagecited by 231
- 2023Style Aligned Image Generation via Shared Attentioncited by 216
- 2023Interpreting CLIP's Image Representation via Text-Based Decompositioncited by 196
- 2023TF-ICON: Diffusion-Based Training-Free Cross-Domain Image Compositioncited by 182
- 2024In-Context LoRA for Diffusion Transformerscited by 158
- 2024Training-Free Consistent Text-to-Image Generationcited by 125
- 2023In-Context Learning Unlocked for Diffusion Modelscited by 104
- 2024Zero-shot Image Editing with Reference Imitationcited by 65
- 2024IMPRINT: Generative Object Compositing by Learning Identity-Preserving Representationcited by 64
- 2024TurboEdit: Text-Based Image Editing Using Few-Step Diffusion Modelscited by 64
- 2025Insert Anything: Image Insertion via In-Context Editing in DiTcited by 61
- 2023Custom-Edit: Text-Guided Image Editing with Customized Diffusion Modelscited by 54
- 2024Large-Scale Text-to-Image Model with Inpainting is a Zero-Shot Subject-Driven Image Generatorcited by 48
- 2023Photoswap: Personalized Subject Swapping in Imagescited by 47
- 2023DreamEdit: Subject-driven Image Editingcited by 37
- 2024FreeEdit: Mask-free Reference-based Image Editing with Multi-modal Instructioncited by 36
- 2024InstantSwap: Fast Customized Concept Swapping across Sharp Shape Differencescited by 34
- 2024Tuning-Free Image Customization with Image and Text Guidancecited by 25
- 2023Context Diffusion: In-Context Aware Image Generationcited by 21
- 2024PrimeComposer: Faster Progressively Combined Diffusion for Image Composition with Attention Steeringcited by 20
- 2024ObjectMate: A Recurrence Prior for Object Insertion and Subject-Driven Generationcited by 16
- 2024Can MLLMs Perform Text-to-Image In-Context Learning?cited by 13
- 2024SwapAnything: Enabling Arbitrary Object Swapping in Personalized Visual Editingcited by 13
- 2023Improving In-Context Learning in Diffusion Models with Visual Context-Modulated Promptscited by 10
- 2025IP-Prompter: Training-Free Theme-Specific Image Generation via Dynamic Visual Promptingcited by 3
Built on by
Citing papers per year: 2026: 7.
7 papers.
- 2026Omni2Sound: Towards Unified Video-Text-to-Audio Generationcited by 11
- 2026TAG-MoE: Task-Aware Gating for Unified Generative Mixture-of-Expertscited by 6
- 2026Beyond Pixels: Visual Metaphor Transfer via Schema-Driven Agentic Reasoningcited by 4
- 2026GeodesicNVS: Probability Density Geodesic Flow Matching for Novel View Synthesiscited by 2
- 2026FontCrafter: High-Fidelity Element-Driven Artistic Font Creation with Visual In-Context Generationcited by 1
- 2026Sissi: Zero-shot Style-guided Image Synthesis via Semantic-style Integrationcited by 0
- 2026CARE-Edit: Condition-Aware Routing of Experts for Contextual Image Editingcited by 0
- 2026FontCrafter: High-Fidelity Element-Driven Artistic Font Creation with Visual In-Context Generation23 Mar 2026
- 2026CARE-Edit: Condition-Aware Routing of Experts for Contextual Image Editing9 Mar 2026
- 2026GeodesicNVS: Probability Density Geodesic Flow Matching for Novel View Synthesis1 Mar 2026
- 2026Beyond Pixels: Visual Metaphor Transfer via Schema-Driven Agentic Reasoning1 Feb 2026
- 2026TAG-MoE: Task-Aware Gating for Unified Generative Mixture-of-Experts12 Jan 2026
- 2026Sissi: Zero-shot Style-guided Image Synthesis via Semantic-style Integration10 Jan 2026
- 2026Omni2Sound: Towards Unified Video-Text-to-Audio Generation6 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2023DreamInpainter: Text-Guided Subject-Driven Image Inpainting with Diffusion Models
- 2024InVi: Object Insertion In Videos Using Off-the-Shelf Diffusion Models
- 2023HD-Painter: High-Resolution and Prompt-Faithful Text-Guided Image Inpainting with Diffusion Models
- 2024Repositioning the Subject within Image
- 2024Coherent and Multi-modality Image Inpainting via Latent Space Optimization
- 2024Unleashing In-context Learning of Autoregressive Models for Few-shot Image Manipulation
- 2023Paste, Inpaint and Harmonize via Denoising: Subject-Driven Image Editing with Pre-Trained Diffusion Model
- 2023InFusion: Inject and Attention Fusion for Multi Concept Zero-Shot Text-based Video Editing