IP Library Granted Patent US 12711678
Granted Patent B2
US 12711678 · App. 18/620,630 · Granted Aug 18, 2026

Fast personalized image generation using a machine learning model

Inventors: Yizhe Zhu (Los Angeles, CA); Qing Yan (Los Angeles, CA); Xiao Yang (Los Angeles, CA)
Assignee: Lemon Inc.
G06T11/10G06T7/194G06T11/60G06V10/44G06T2207/10024G06T2207/20081
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12711678
App. No.
18/620,630
Granted
Aug 18, 2026
Kind
B2
Abstract

The present disclosure describes techniques for fast personalized image generation using a machine learning model. Contextualized features are generated by a first sub-model of the machine learning model. The contextualized features are generated based on an object image and a text prompt. The object image comprises a target object. The text prompt depicts a target image and indicates at least one of changing textures of the target object or placing the target object in a particular context. Self-attention features are generated from the object image. The self-attention features contain detailed information about the target object. A target image is generated based on the contextualized features and the self-attention features by a second sub-model of the machine learning model. The second sub-model comprises context cross attention layers and object cross attention layers. The target image preserves an identity of the target object.

Claims (61)

1 . A method of generating images using a machine learning model, comprising:

generating contextualized features based on an object image and a text prompt by a first sub-model of the machine learning model, wherein the object image comprises a target object, and wherein the text prompt depicts a target image and indicates at least one of changing textures of the target object or placing the target object in a particular context;

generating self-attention features from the object image, wherein the self-attention features contain detailed information about the target object;

generating the target image based on the contextualized features and the self-attention features by a second sub-model of the machine learning model, wherein the target image preserves an identity of the target object, and wherein the second sub-model comprises context cross attention layers and object cross attention layers;

wherein the method further comprises:

collecting and transferring the self-attention features into the object cross-attention layers of the second sub-model; and

applying a masking mechanism during a self-attention feature transfer such that only features of a foreground in the object image are injected into a foreground of a generated image while a background of the generated image remains unaffected by the self-attention feature transfer.

2 . The method of claim 1 , further comprising:

generating the object image by replacing a background of a reference image with white color while remaining the target object in the reference image.

3 . The method of claim 1 , wherein the generating contextualized features based on an object image and a text prompt by a first sub-model of the machine learning model comprises:

extracting image features from the object image;

editing the image features based on the text prompt; and

generating a sequence of embedding based on the edited image features.

4 . The method of claim 3 , further comprising:

integrating the sequence of embedding into the context cross-attention layers of the second sub-model.

5 . The method of claim 1 , further comprising:

training the machine learning model using a two-staged training pipeline.

6 . The method of claim 5 , further comprising:

training the first sub-model to compose image features of target objects with text prompts and output prompt-contextualized image embeddings.

7 . The method of claim 6 , further comprising:

training and optimizing the context cross-attention layers and the object cross-attention layers of the second sub-model.

8 . A computing system of generating images using a machine learning model, comprising:

at least one processor; and

at least one non-transitory memory communicatively coupled to the at least one processor and comprising computer-readable instructions that upon execution by the at least one processor cause the at least one processor to perform operations comprising:

generating contextualized features based on an object image and a text prompt by a first sub-model of the machine learning model, wherein the object image comprises a target object, and wherein the text prompt depicts a target image and indicates at least one of changing textures of the target object or placing the target object in a particular context;

generating self-attention features from the object image, wherein the self-attention features contain detailed information about the target object;

generating the target image based on the contextualized features and the self-attention features by a second sub-model of the machine learning model, wherein the target image preserves an identity of the target object, and wherein the second sub-model comprises context cross attention layers and object cross attention layers;

wherein the operations further comprise:

collecting and transferring the self-attention features into the object cross-attention layers of the second sub-model; and

applying a masking mechanism during a self-attention feature transfer such that only features of a foreground in the object image are injected into a foreground of a generated image while a background of the generated image remains unaffected by the self-attention feature transfer.

9 . The computing system of claim 8 , the operations further comprising:

generating the object image by replacing a background of a reference image with white color while remaining the target object in the reference image.

10 . The computing system of claim 8 , wherein the generating contextualized features based on an object image and a text prompt by a first sub-model of the machine learning model comprises:

extracting image features from the object image;

editing the image features based on the text prompt; and

generating a sequence of embedding based on the edited image features.

11 . The computing system of claim 8 , the operations further comprising:

training the first sub-model to compose image features of target objects with text prompts and output prompt-contextualized image embeddings; and

training and optimizing the context cross-attention layers and the object cross-attention layers of the second sub-model.

12 . The computing system of claim 8 , the operations further comprising:

training the machine learning model using a two-staged training pipeline.

13 . A non-transitory computer-readable storage medium, storing computer-readable instructions that upon execution by a processor cause the processor to implement operations comprising:

generating contextualized features based on an object image and a text prompt by a first sub-model of the machine learning model, wherein the object image comprises a target object, and wherein the text prompt depicts a target image and indicates at least one of changing textures of the target object or placing the target object in a particular context;

generating self-attention features from the object image, wherein the self-attention features contain detailed information about the target object;

generating the target image based on the contextualized features and the self-attention features by a second sub-model of the machine learning model, wherein the target image preserves an identity of the target object, and wherein the second sub-model comprises context cross attention layers and object cross attention layers;

wherein the operations further comprise:

collecting and transferring the self-attention features into the object cross-attention layers of the second sub-model; and

applying a masking mechanism during a self-attention feature transfer such that only features of a foreground in the object image are injected into a foreground of a generated image while a background of the generated image remains unaffected by the self-attention feature transfer.

14 . The non-transitory computer-readable storage medium of claim 13 , wherein the generating contextualized features based on an object image and a text prompt by a first sub-model of the machine learning model comprises:

extracting image features from the object image;

editing the image features based on the text prompt; and

generating a sequence of embedding based on the edited image features.

15 . The non-transitory computer-readable storage medium of claim 14 , the operations further comprising:

integrating the sequence of embedding into the context cross-attention layers of the second sub-model.

16 . The non-transitory computer-readable storage medium of claim 13 , the operations further comprising:

training the first sub-model to compose image features of target objects with text prompts and output prompt-contextualized image embeddings; and

training and optimizing the context cross-attention layers and the object cross-attention layers of the second sub-model.

17 . The non-transitory computer-readable storage medium of claim 13 , the operations further comprising:

generating the object image by replacing a background of a reference image with white color while remaining the target object in the reference image.

18 . The non-transitory computer-readable storage medium of claim 13 , the operations further comprising:

training the machine learning model using a two-staged training pipeline.