Controllable diffusion model
Abstract
A method, apparatus, and non-transitory computer readable medium for image generation are described. Embodiments of the present disclosure obtain a content input and a style input via a user interface or from a database. The content input includes a target spatial layout and the style input includes a target style. A content encoder of an image processing apparatus encodes the content input to obtain a spatial layout mask representing the target spatial layout. A style encoder of the image processing apparatus encodes the style input to obtain a style embedding representing the target style. An image generation model of the image processing apparatus generates an image based on the spatial layout mask and the style embedding, where the image includes the target spatial layout and the target style.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 0.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A method comprising: obtaining a content input and a style input, wherein the content input comprises a target spatial layout and the style input comprises a target style; encoding, by a content encoder, the content input to obtain a spatial layout mask representing the target spatial layout; encoding, by a style encoder, the style input to obtain a style embedding representing the target style; and generating, by an image generation model, an image by denoising noisy features based on the spatial layout mask and the style embedding, wherein the image includes the target spatial layout and the target style.
- Claim 2Depends on #1
The method of claim 1, wherein: the content input comprises a content image and the style input comprises a style image.
- Claim 3Depends on #1
The method of claim 1, further comprising: performing a spatial-wise operation based on the spatial layout mask, wherein the image is generated based on the spatial-wise operation.
- Claim 4Depends on #1
The method of claim 1, further comprising: performing a channel-wise operation based on the style embedding, wherein the image is generated based on the channel-wise operation.
- Claim 5Depends on #1
The method of claim 1, further comprising: computing a content weight based on a diffusion timestep, wherein the image is generated based on the spatial layout mask according to the content weight.
- Claim 6Depends on #1
The method of claim 1, further comprising: computing a style weight based on a diffusion timestep, wherein the image is generated based on the style embedding according to the style weight.
- Claim 7Depends on #1
The method of claim 1, further comprising: generating a noise vector, wherein the image is generated based on the noise vector using a reverse diffusion process.
- Claim 8Depends on #1
The method of claim 1, wherein: the style embedding includes global semantic information representing the target style.
- Claim 9Depends on #1
The method of claim 1, wherein: the spatial layout mask comprises a plurality of values corresponding to a plurality of locations of the content input, respectively, and wherein the style embedding comprises a tuple of values that together represent the target style.
- Claim 10Independent Claim
A method comprising: initializing a content encoder, a style encoder, and an image generation model; receiving training data including an image comprising spatial content and a style attribute; computing an objective function based on the spatial content and the style attribute; and jointly training the content encoder, the style encoder, and the image generation model using an end-to-end process based on the objective function.
- Claim 11Depends on #10
The method of claim 10, wherein: the content encoder is trained to generate a spatial layout mask representing a target spatial layout.
- Claim 12Depends on #10
The method of claim 10, wherein: the style encoder is trained to generate a style embedding representing a target style.
- Claim 13Depends on #10
The method of claim 10, wherein: the image generation model is trained to generate a predicted image including a target spatial layout and a target style based on an output of the content encoder and an output of the style encoder.
- Claim 14Depends on #10
The method of claim 10, further comprising: generating a latent code based on the image using an image encoder; generating a noisy latent code based on the latent code using a forward diffusion process; and generating a predicted image using the image generation model, wherein the objective function is computed based on the predicted image.
- Claim 15Depends on #14
The method of claim 14, further comprising: generating a predicted spatial layout mask using the content encoder; and generating a predicted style embedding using the style encoder, wherein the predicted image is generated based on the predicted spatial layout mask and the predicted style embedding.
- Claim 16Independent Claim
An apparatus comprising: at least one processor; at least one memory including instructions executable by the at least one processor; a content encoder comprising parameters stored in the at least one memory and trained to encode a content input to obtain a spatial layout mask representing a target spatial layout; a style encoder comprising parameters stored in the at least one memory and trained to encode a style input to obtain a style embedding representing a target style; and an image generation model comprising parameters stored in the at least one memory and trained to generate an image by denoising noisy features based on the spatial layout mask and the style embedding, wherein the image includes the target spatial layout and the target style.
- Claim 17Depends on #16
The apparatus of claim 16, wherein: the content encoder and the style encoder each comprise a residual neural network.
- Claim 18Depends on #16
The apparatus of claim 16, wherein: the image generation model comprises a denoising unit.
- Claim 19Depends on #16
The apparatus of claim 16, further comprising: an image encoder configured to generate a latent code based on the image.
- Claim 20Depends on #16
The apparatus of claim 16, further comprising: a timestep scheduling component configured to compute a content weight based on a diffusion timestep, wherein the image is generated based on the spatial layout mask according to the content weight, and to compute a style weight based on the diffusion timestep, wherein the image is generated based on the style embedding according to the style weight.
Technical Overview & Description
BACKGROUND The following relates generally to machine learning, and more specifically to machine learning for image processing. Digital image processing refers to the use of a computer to edit a digital image using an algorithm or a processing network. In some cases, image processing software can be used for various image processing tasks, such as image editing, image restoration, image generation, etc. Some image processing systems may implement machine learning techniques, for example, to perform tasks using predictive models (e.g., without explicitly programing the system for each task), to perform tasks with more accuracy or in less time, to perform tasks using special-purpose hardware, etc. Image generation (a subfield of digital image processing) includes the use of a machine learning model to generate images. Diffusion-based models are one category of machine learning models that can be used to generate images. Specifically, diffusion models can be trained to take random noise as input and generate new images with features similar to the training data. SUMMARY The present disclosure describes systems and methods for image generation. Embodiments of the present disclosure include an image processing apparatus that generates a synthesized image (e.g., a style-transferred image) based on a content image and a style image. The image processing apparatus performs diffusion-based image generation by jointly learning a content latent space and a style latent space and training an image generation model (e.g., a diffusion model). In some embodiments, the image processing apparatus includes a content encoder and a style encoder. The content encoder outputs a spatial layout mask while the style encoder outputs a flattened semantic code (i.e., style embedding) to condition the diffusion model during training. The spatial layout mask and the style embedding are two separate conditional inputs for subsequent image generation. For example, the spatial layout mask and style
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (5)
Non-Patent Literature (10)
- Cho, et al.,
- “
- Towards Enhanced Controllability of Diffusion Models
- ”
- , arXiv preprint arXiv:2302.14368v2 [cs.CV] Mar. 15, 2023, 28 pages.
- Balaji, et al.,
- “
- eDiff-I: Text-to-Image Diffusion Models with an Ensemble of Expert Denoisers
- ”
- , arXiv preprint arXiv:2211.01324v5 [cs.CV] Mar. 14, 2023, 24 pages.