# US 2025/0378609 A1 · Style-Aware Drag-and-Drop Insertion of Subjects into Images

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

- Number: US 2025/0378609 A1
- Document ID: US20250378609A1
- Status: Published application
- Kind: A1
- Application number: 19/232,551
- Filed: 2025-06-09
- Published: 2025-12-11
- Earliest claimed: 2024-06-10
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Nataniel Ruiz Gutierrez; Shlomo Fruchter
- Web page: https://patentgrep.com/patent/US20250378609A1

## CPC

- G06T 11/60: Creating or editing images; Combining images with text
- G06T 7/12: Edge-based segmentation
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Methods are provided for accurate and reduced-cost insertion of subjects (e.g., people, animals) from one source image into a target image, matching the inserted subject into the style of the target image while preserving the pose, identity, and other aspects of the subject and also integrating the style-translated subject into the target image with respect to shadows, occlusion, and other aspects of the target environment. These methods include fine-tuning a diffusion model to recover an image of the subject conditioned on an auxiliary input description (e.g., a token sequence) of the subject that is, itself also learned. Style information from a target image is then imposed on the fine-tuned model, conditioned on the learned auxiliary input, to generate a style-translated image of the subject. The translated subject is then inserted into the target image and a subject insertion model applied to integrate it therein.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving an image of a subject and a target image;
fine-tuning a diffusion model to predict the image of the subject based on a noisy version of the image of the subject, wherein fine-tuning the diffusion model to predict the image of the subject includes learning an auxiliary input that conditions an output of the diffusion model in a semantic embedding space;
executing the fine-tuned diffusion model, with the learned auxiliary input applied thereto and with style information determined from the target image imposed on the fine-tuned diffusion model, to generate a second image of the subject, wherein the second image of the subject depicts the subject in a style of the target image; and
using a subject insertion model to generate an output image that depicts the subject as depicted in the second image integrated into an environment depicted by the target image.

### Claim 2 (depends on 1)

The method of claim 1, wherein the auxiliary input comprises a sequence of tokens, and wherein learning the auxiliary input comprises learning one or more tokens of the sequence, and wherein every token of the sequence other than the learned one or more tokens is static.

### Claim 3 (depends on 2)

The method of claim 2, wherein learning one or more tokens of the sequence comprises learning a respective embedding for each of the learned one or more tokens.

### Claim 4 (depends on 1)

The method of claim 1, wherein fine-tuning the diffusion model comprises
learning at least one rank decomposition matrix for at least one layer of the diffusion model.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
determining, based on the target image, an embedding that represents a style of the target image, wherein executing the fine-tuned diffusion model with style information determined from the target image imposed on the fine-tuned diffusion model comprises injecting the embedding into at least one layer of the fine-tuned diffusion model.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining the embedding that represents the style of the target image comprises applying the target image to a trained machine learning model to generate the embedding.

### Claim 7 (depends on 6)

The method of claim 6, wherein the trained machine learning model has been trained by Contrastive Language-Image Pre-training, wherein the diffusion model includes UNet, and wherein injecting the embedding into at least one layer of the fine-tuned diffusion model comprises using an adapter model to inject image features of the embedding into at least one layer of the fine-tuned diffusion model.

### Claim 8 (depends on 1)

The method of claim 1, wherein the subject insertion model has been trained by:
using a pre-trained subject insertion model to remove a plurality of subjects from respective stylized images to generate a first plurality of training images, wherein the stylized images are not photographic representations of real scenes, and wherein the pre-trained subject insertion model has been trained using photographic representations of real scenes;
removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully to generate a first filtered plurality of training images; and
using the first filtered plurality of training images to fine-tune the pre-trained subject insertion model.

### Claim 9 (depends on 8)

The method of claim 8, wherein removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully includes manually removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully.

### Claim 10 (depends on 8)

The method of claim 8, wherein removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully includes applying the first plurality of training images to a trained predictive model to identify which images of the plurality of training images exhibit unsuccessful subject removal.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
using the fine-tuned pre-trained subject insertion model to remove the plurality of subjects from a subset of the stylized images to generate a second plurality of updated training images, wherein the subset of the stylized images are images whose corresponding to training images of the first plurality of training images wherein subject removal has been performed unsuccessfully;
removing, from the second plurality of training images, images wherein subject removal has been performed unsuccessfully to generate a second filtered plurality of training images; and
using the second filtered plurality of training images to further fine-tune the fine-tuned pre-trained subject insertion model.

### Claim 12 (depends on 1)

The method of claim 1, wherein using the subject insertion model to generate an output image that depicts the subject as depicted in the second image integrated into an environment depicted by the target image comprises:
segmenting the subject from the second image and copying the segmented subject onto the target image to generate an intermediate image; and
applying the intermediate image to the subject insertion model to generate the output image.

### Claim 13 (depends on 12)

The method of claim 12, wherein applying the intermediate image to the subject insertion model to generate the output image comprises applying, to the subject insertion model, the intermediate image and a mask representing the location and extent of the segmented subject within the intermediate image.

### Claim 14 (depends on 1)

The method of claim 1, wherein fine-tuning the diffusion model is performed by one or more processors of a first system, and wherein the method further comprises:
transmitting, from the first system to a second system, an indication of the fine-tuned diffusion model, wherein the second system is optionally a cellphone, tablet, or laptop, and wherein executing the fine-tuned diffusion model to generate the second image of the subject and using the subject insertion model to generate the output image are performed by one or more processors of the second system

### Claim 15

A method for training a subject insertion model comprising:
using a pre-trained subject insertion model to remove a plurality of subjects from respective stylized images to generate a first plurality of training images, wherein the stylized images are not photographic representations of real scenes, and wherein the pre-trained subject insertion model has been trained using photographic representations of real scenes;
removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully to generate a first filtered plurality of training images; and
using the first filtered plurality of training images to fine-tune the pre-trained subject insertion model.

### Claim 16 (depends on 15)

The method of claim 15, wherein removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully includes manually removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully.

### Claim 17 (depends on 15)

The method of claim 15, wherein removing, from the first plurality of training images, images wherein subject removal has been performed unsuccessfully includes applying the first plurality of training images to a trained predictive model to identify which images of the plurality of training images exhibit unsuccessful subject removal.

### Claim 18 (depends on 15)

The method of claim 15, further comprising:
using the fine-tuned pre-trained subject insertion model to remove the plurality of subjects from a subset of the stylized images to generate a second plurality of updated training images, wherein the subset of the stylized images are images whose corresponding to training images of the first plurality of training images wherein subject removal has been performed unsuccessfully;
removing, from the second plurality of training images, images wherein subject removal has been performed unsuccessfully to generate a second filtered plurality of training images; and
using the second filtered plurality of training images to further fine-tune the fine-tuned pre-trained subject insertion model.

### Claim 19

An article of manufacture including a non-transitory computer-readable medium, having stored thereon program instructions that, upon execution by a computing device, cause the computing device to perform operations comprising:
receiving an image of a subject and a target image;
fine-tuning a diffusion model to predict the image of the subject based on a noisy version of the image of the subject, wherein fine-tuning the diffusion model to predict the image of the subject includes learning an auxiliary input that conditions an output of the diffusion model in a semantic embedding space;
executing the fine-tuned diffusion model, with the learned auxiliary input applied thereto and with style information determined from the target image imposed on the fine-tuned diffusion model, to generate a second image of the subject, wherein the second image of the subject depicts the subject in a style of the target image; and
using a subject insertion model to generate an output image that depicts the subject as depicted in the second image integrated into an environment depicted by the target image.

### Claim 20 (depends on 19)

The article of manufacture of claim 19, wherein the auxiliary input comprises a sequence of tokens, and wherein learning the auxiliary input comprises learning one or more tokens of the sequence, and wherein every token of the sequence other than the learned one or more tokens is static.
