# US 2025/0095256 A1 · In-context image generation using style images

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0095256 A1
- Document ID: US20250095256A1
- Status: Published application
- Kind: A1
- Application number: 18/890,203
- Filed: 2024-09-19
- Published: 2025-03-20
- Earliest claimed: 2023-09-20
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Vlad-Constantin Lungu-Stan; Marian Lupascu; Ionut Mironicä
- Web page: https://patentgrep.com/patent/US20250095256A1

## CPC

- G06T 11/60: Creating or editing images; Combining images with text
- G06T 7/11: Region-based segmentation
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A method, apparatus, non-transitory computer readable medium, and system for generating images with a particular style that fit coherently into a scene includes obtaining a text prompt and a preliminary style image. The text prompt describes an image element, and the preliminary style image includes a region with a target style. Embodiments then extract the region with the target style from the preliminary style image to obtain a style image. Embodiments subsequently generate, using an image generation model, a synthetic image based on the text prompt and the style image. The synthetic image depicts the image element with the target style.

## Claims

### Claim 1

A method comprising:
obtaining a text prompt and a preliminary style image, wherein the text prompt describes an image element and the preliminary style image includes a region with a target style;
extracting the region with the target style from the preliminary style image to obtain a style image; and
generating, using an image generation model, a synthetic image based on the text prompt and the style image, wherein the synthetic image depicts the image element with the target style.

### Claim 2 (depends on 1)

The method of claim 1, wherein extracting the region comprises:
applying padding to a background region of the preliminary style image.

### Claim 3 (depends on 1)

The method of claim 1, wherein extracting the region comprises:
obtaining a mask indicating the region with the target style; and
applying the mask to the preliminary style image.

### Claim 4 (depends on 1)

The method of claim 1, wherein extracting the region comprises:
computing a semantic similarity between the region and the text prompt, wherein the region is identified based on the semantic similarity.

### Claim 5 (depends on 1)

The method of claim 1, wherein extracting the region comprises:
computing a salience value for the region of the preliminary style image, wherein the region of the preliminary style image is identified based on the salience value.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
combining the synthetic image with the preliminary style image to obtain a combined image.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
modifying a luminance of the style image to obtain a modified style image, wherein the synthetic image is generated based on the modified style image.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
identifying a location for inserting the synthetic image into the preliminary style image, wherein the luminance of the style image is modified based on the location.

### Claim 9

A non-transitory computer readable medium storing code for image processing, the code comprising instructions executable by a processor to perform operations comprising:
obtaining a text prompt and a preliminary style image, wherein the text prompt describes an image element and the preliminary style image includes a region with a target style;
extracting the region with the target style from the preliminary style image to obtain a style image; and
generating, using an image generation model, a synthetic image based on the text prompt and the style image, wherein the synthetic image depicts the image element with the target style.

### Claim 10 (depends on 9)

The non-transitory computer readable medium of claim 9, the code further comprising instructions executable by the processor to perform operations comprising:
applying padding to a background region of the preliminary style image.

### Claim 11 (depends on 9)

The non-transitory computer readable medium of claim 9, the code further comprising instructions executable by the processor to perform operations comprising:
obtaining a mask indicating the region with the target style; and
applying the mask to the preliminary style image.

### Claim 12 (depends on 9)

The non-transitory computer readable medium of claim 9, the code further comprising instructions executable by the processor to perform operations comprising:
computing a semantic similarity between the region and the text prompt, wherein the region is identified based on the semantic similarity.

### Claim 13 (depends on 9)

The non-transitory computer readable medium of claim 9, the code further comprising instructions executable by the processor to perform operations comprising:
computing a salience value for the region of the preliminary style image, wherein the region of the preliminary style image is identified based on the salience value.

### Claim 14 (depends on 9)

The non-transitory computer readable medium of claim 9, the code further comprising instructions executable by the processor to perform operations comprising:
modifying a luminance of the style image to obtain a modified style image, wherein the synthetic image is generated based on the modified style image.

### Claim 15

An apparatus comprising:
a memory component;
a processing device coupled to the memory component;
an extraction component comprising parameters stored in the memory component and configured to extract a region with a target style from a preliminary style image to obtain a style image; and
an image generation model comprising parameters stored in the memory component and trained to generate a synthetic image based on a text prompt and the style image, wherein the synthetic image depicts an image element from the text prompt with the target style.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the extraction component comprises:
a padding component configured to apply padding to a background region of the preliminary style image.

### Claim 17 (depends on 1)

The apparatus of claim 1, wherein the extraction component is further configured to:
obtain a mask indicating the region with the target style; and
apply the mask to the preliminary style image.

### Claim 18 (depends on 15)

The apparatus of claim 15, wherein the extraction component comprises:
a segmentation component configured to compute a semantic similarity between the region and the text prompt, wherein the region is identified based on the semantic similarity.

### Claim 19 (depends on 15)

The apparatus of claim 15, wherein the extraction component is further configured to:
compute a salience value for the region of the preliminary style image, wherein the region of the preliminary style image is identified based on the salience value.

### Claim 20 (depends on 15)

The apparatus of claim 15, further comprising:
a luminance injector configured to modify a luminance of the style image to obtain a modified style image, wherein the synthetic image is generated based on the modified style image.
