Stable Diffusion Models Are Secretly Good at Visual In-Context Learning
Trevine Oorloff, Vishwanath Sindagi, Wele Gedara Chaminda Bandara, Ali Shafahi, Amin Ghiasi, Charan Prakash, Reza Ardekani
摘要
Large language models (LLM) in natural language processing (NLP) have demonstrated great potential for in-context learning (ICL) - the ability to leverage a few sets of example prompts to adapt to various tasks without having to explicitly update the model weights. ICL has recently been explored for computer vision tasks with promising early outcomes. These approaches involve specialized training and/or additional data that complicate the process and limit its generalizability. In this work, we show that off-the-shelf Stable Diffusion models can be repurposed for visual incontext learning (V-ICL). Specifically, we formulate an inplace attention re-computation within the self-attention layers of the Stable Diffusion architecture that explicitly incorporates context between the query and example prompts. Without any additional fine-tuning, we show that this repurposed Stable Diffusion model is able to adapt to six different tasks: foreground segmentation, single object detection, semantic segmentation, keypoint detection, edge detection, and colorization. For example, the proposed approach improves the mean intersection over union (mIoU) for the foreground segmentation task on Pascal-5i dataset by 8.9% and 3.2% over recent methods such as Visual Prompting and IMProv, respectively. Additionally, we show that the proposed method is able to effectively leverage multiple prompts through ensembling to infer the task better and further improve the performance.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper4
- PromptHub: Enhancing Multi-Prompt Visual In-Context Learning with Locality-Aware Fusion, Concentration and AlignmentTianci Luo, Jinpeng Wang, Shiyu Qin, Niu Lian 等ICLR 2026 · 被引用 3 次
- Splatent: Splatting Diffusion Latents for Novel View SynthesisOr Hirschorn, Omer Sela, Inbar Huberman-Spiegelglas, Netalee Efrat Sela 等CVPR 2026 · 被引用 2 次
- Love Me, Love My Label: Rethinking the Role of Labels in Prompt Retrieval for Visual In-Context LearningTianci Luo, Haohao Pan, Jinpeng Wang, Niu Lian 等CVPR 2026
- The Latent Color Subspace: Emergent Order in High-Dimensional ChaosMateusz Pach, Jessica Bader, Quentin Bouniot, Serge Belongie 等ICML 2026
它引用的顶会 Paper24
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 被引用 47,906 次
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 被引用 21,477 次
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser 等CVPR 2022 · 被引用 13,123 次
- MasaCtrl: Tuning-Free Mutual Self-Attention Control for Consistent Image Synthesis and EditingMingdeng Cao, Xintao Wang, Zhongang Qi, Ying Shan 等ICCV 2023 · 被引用 770 次
- Improved Distribution Matching Distillation for Fast Image SynthesisTianwei Yin, Michaël Gharbi, Taesung Park, Richard Zhang 等NeurIPS 2024 · 被引用 728 次
相关 Paper
- In-Context Learning Unlocked for Diffusion ModelsZhendong Wang, Yifan Jiang, Yadong Lu, Yelong Shen 等NeurIPS 2023 · 被引用 128 次
- Visual in-Context PromptingFeng Li, Qing Jiang, Hao Zhang, Tianhe Ren 等CVPR 2024
- SLiMe: Segment Like MeAliasghar Khani, Saeid Asgari Taghanaki, Aditya Sanghi, Ali Mahdavi-Amiri 等ICLR 2024 · 被引用 47 次
- What Makes Good Examples for Visual In-Context Learning?Yuanhan Zhang, Kaiyang Zhou, Ziwei LiuNeurIPS 2023 · 被引用 219 次
- Dynamic Prompt Learning: Addressing Cross-Attention Leakage for Text-Based Image EditingKai Wang, Fei Yang, Shiqi Yang, Muhammad Atif Butt 等NeurIPS 2023 · 被引用 108 次
