CoRe: Context-Regularized Text Embedding Learning for Text-to-Image Personalization
Abstract
Recent advances in text-to-image personalization have enabled high-quality and controllable image synthesis for user-provided concepts. However, existing methods still struggle to balance identity preservation with text alignment. Our approach is based on the fact that generating prompt-aligned images requires a precise semantic understanding of the prompt, which involves accurately processing the interactions between the new concept and its surrounding context tokens within the CLIP text encoder. To address this, we aim to embed the new concept properly into the input embedding space of the text encoder, allowing for seamless integration with existing tokens. We introduce Context Regularization (CoRe), which enhances the learning of the new concept's text embedding by regularizing its context tokens in the prompt. This is based on the insight that appropriate output vectors of the text encoder for the context tokens can only be achieved if the new concept's text embedding is correctly learned. CoRe can be applied to arbitrary prompts without requiring the generation of corresponding images, thus improving the generalization of the learned text embedding. Additionally, CoRe can serve as a test-time optimization technique to further enhance the generations for specific prompts. Comprehensive experiments demonstrate that our method outperforms several baseline methods in both identity preservation and text alignment. Code will be made publicly available.
Community
@akhaliq @kramp Hi AK and HF team,
Our recent work (https://arxiv.org/abs/2408.15914) proposes "CoRe," a novel method for text-to-image personalization.
Instead of investigating the text embedding of the new concept itself, as previous works did, we shift our focus to the context tokens surrounding the new concept in prompts. This approach has demonstrated significant improvements in both identity preservation and text alignment, particularly for prompts that demand high visual variability.
If you are interested in our paper, we would great appreciate it!
Congrats on your work🔥@FeizeWu
It would be great to share the code link here so the community can access it more easily.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Concept Conductor: Orchestrating Multiple Personalized Concepts in Text-to-Image Synthesis (2024)
- Layout-and-Retouch: A Dual-stage Framework for Improving Diversity in Personalized Image Generation (2024)
- PreciseControl: Enhancing Text-To-Image Diffusion Models with Fine-Grained Attribute Control (2024)
- Powerful and Flexible: Personalized Text-to-Image Generation via Reinforcement Learning (2024)
- Prompt-Softbox-Prompt: A free-text Embedding Control for Image Editing (2024)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Hi @FeizeWu ,
First of all, I wanted to say that I've read your paper and it's a really nice piece of work - congratulations!
In our paper Zero-Shot Composed Image Retrieval with Textual Inversion, we also observed that regularizing the learned word embeddings improves the generalization capabilities even when the textual inversion is performed directly in the CLIP common embedding space without relying on a generative model.
Furthermore, we found that applying regularization in conjunction with a broader context - by generating template sentences using a lightweight GPT model rather than relying on predefined prompts - helped to further improve performance. It might be interesting to explore whether a similar approach could benefit your method in the context of CoRe. I'd be curious to see how it works in your scenario!
Hi @ABaldrati ,
Thank you so much for your kind words and for taking the time to read our paper! We greatly appreciate it.
We've read your paper on Zero-Shot Composed Image Retrieval with Textual Inversion and were pleasantly surprised to see how textual inversion can be applied in the CIR domain. Your approach is quite insightful and we’re considering adding a discussion of it in our next version. We’re also eager to try out the approach you suggested to see how it could further enhance our work in the CoRe. If we achieve any positive results, we'll be sure to let you know!
Thanks again for your valuable feedback and suggestions.
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper