Prompt-to-prompt image editing with cross-attention control
Abstract
Some implementations are directed to editing a source image, where the source image is one generated based on processing a source natural language (NL) prompt using a Large-scale language-image (LLI) model. Those implementations edit the source image based on user interface input that indicates an edit to the source NL prompt, and optionally independent of any user interface input that specifies a mask in the source image and/or independent of any other user interface input. Some implementations of the present disclosure are additionally or alternatively directed to applying prompt-to-prompt editing techniques to editing a source image that is one generated based on a real image, and that approximates the real image.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 1.
Claims (8)
- Claim 1Independent Claim
A method implemented by one or more processors, the method comprising: identifying source cross-attention maps that were produced using cross-attention layers, of a large-scale language-image (LLI) model, in generating a source image based on processing a source natural language (NL) prompt using the LLI model; identifying one or more source random seeds that were utilized in generating the source image based on processing the source NL prompt using the LLI model; subsequent to generating the source image: receiving user interface input that indicates an edit to the source NL prompt that was used in generating the source image; in response to receiving the user interface input that indicates the edit to the source NL prompt: generating, in multiple iterations of processing using the LLI model, an edited image that is visually similar to the source image but that includes visual modifications consistent with the edit, to the NL prompt, indicated by the user interface input, wherein gene
- Claim 2Depends on #1
The method of claim 1, wherein the edit comprises a replacement, of a subset of tokens of the source NL prompt, with one or more replacement tokens that differ from the subset of tokens of the source NL prompt.
- Claim 3Depends on #2
The method of claim 2, wherein the one or more features generated based on the edit to the source NL prompt comprise a text embedding of a modified prompt that conforms to the source NL prompt, but replaces the subset of tokens of the source NL prompt with the one or more replacement tokens.
- Claim 4Depends on #3
The method of claim 3, wherein injecting, in the at least some of the iterations of generating the edited image using the LLI model, at least a portion of the source cross-attention maps comprises: using the entirety of the source cross-attention maps in processing the text embedding, of the modified prompt, in the at least some of the iterations.
- Claim 5Depends on #4
The method of claim 4, wherein the at least some of the iterations are a subset of the iterations and wherein in other iterations, that are not included in the subset of the iterations, other cross-attention maps are utilized in processing the text embedding and the source cross-attention maps are not utilized in processing the text embedding.
- Claim 6Depends on #5
The method of claim 5, wherein the subset of the iterations is an initial continuous sequence of the iterations.
- Claim 7Depends on #5
The method of claim 5, wherein the subset of the iterations comprises more than five percent of the iterations, but less than ninety-five percent of the iterations.
- Claim 8Depends on #1
The method of claim 1, wherein the edit comprises an addition, of one or more additional tokens, to the source NL prompt.
Technical Overview & Description
BACKGROUND Large-scale language-image (LLI) models, such as GOOGLE'S IMAGEN, have shown phenomenal generative semantic and compositional power, and have gained unprecedented attention from the research community and the public eye. These LLI models are trained on extremely large language-image datasets and use state-of-the-art image generative models, such as auto-regressive and/or diffusion models. These LLI models enable the generation of images conditioned on plain text, known as text-to-image synthesis. For example, these LLI models enable, in response to a plain text prompt of “ photo of dog riding on a bicycle ” , generation of a realistic image that reflects a dog riding on a bicycle. Various LLI models have recently emerged that demonstrate unprecedented semantic generation. Image editing is one of the most fundamental tasks in computer graphics, encompassing the process of modifying an input image through the use of an auxiliary input, such as a label, scribble, mask, or reference image. However, many LLI models do not provide simple editing means for a generated image, and generally lack control over specific semantic regions of a given image (e.g., using text guidance only). For example, even the slightest change in the textual prompt may lead to a completely different output image being generated using an LLI model. For instance, changing “ photo of dog riding on a bicycle ” to “ photo of white dog riding on a bicycle ” can result in a completely different generated image, such as one that changes the dog's shape. To circumvent this, many proposed LLI-based editing methods require the user to explicitly mask a part of the image to be inpainted, and drive the edited image to change in the masked area only, while matching the background of the original image. However, the masking procedure is cumbersome (e.g., requiring a large quantity of user inputs to define the mask), hampering quick and intuitive text-driven editing. Moreover, masking the image conten
Cited By — Indexed Forward Citations (1 of 1 total)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 12,711,678 B2 | Fast personalized image generation using a machine learning model | 2026 | 0 |
References Cited — Backward Prior Art (5)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- Wang, Jianan, et al.
- “
- Manitrans: Entity-level text-guided image manipulation via token-wise semantic alignment and generation.
- ”
- Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. Jun. 2022, pp. 10697-10707. (Year: 2022).
- Wu, Chen Henry, and Fernando De la Torre.
- “
- Making Text-to-Image Diffusion Models Zero-Shot Image-to-Image Editors by Inferring
- “
- Random Seeds