An image efficient generation method and device based on a diffusion model

By combining learning the linear vector field from noise to data with adversarial training, the direction of the vector field is optimized, solving the problem of slow generation speed of diffusion models and achieving efficient and high-quality image generation.

CN121330118BActive Publication Date: 2026-05-12ZHEJIANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2025-12-08
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing diffusion models require a large number of sampling steps during image generation, resulting in slow generation speed. Existing methods have failed to effectively improve generation speed and quality when reducing the curvature of the sampling trajectory or introducing complexity.

Method used

By learning the linear vector field from noise to data, and combining it with adversarial training to optimize the vector field orientation, a pre-trained vector field network is used for single-step forward prediction. The discriminator learns the difference between the generated data manifold and the real data manifold, and optimizes the vector field orientation to accelerate the generation process.

Benefits of technology

High-quality image generation was achieved within several network evaluations, improving generation speed while maintaining generation quality, which is superior to existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121330118B_ABST
    Figure CN121330118B_ABST
Patent Text Reader

Abstract

The application discloses an image efficient generation method and device based on a diffusion model, which realizes efficient high-quality image synthesis through a vector field estimation generation result and a discriminator cooperative optimization mechanism. In the method, Euler discretization is performed in the training process, and a prediction model generation result is generated through single forward propagation, which is used for subsequent model training; a multi-dimensional feature extractor discriminator is used to learn the difference between the prediction generation data manifold and the real data manifold; and the gradient information provided by the discriminator is used to guide the vector field to directly point to the real data manifold while learning the vector field. The application first combines the adversarial training and the vector field learning by efficiently predicting the generation result in the training process, greatly accelerates the generation process, guarantees the high-quality generation of the image, is superior to the prior art, and has the advantages of high generation quality and strong universality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer image generation, and in particular to an efficient image generation method and device based on a diffusion model. BACKGROUND

[0002] Fast generation of high-quality images plays an important role in artificial intelligence generated content, and has very important applications in virtual reality, content creation and other fields. Diffusion models can generate high-quality data and outperform the previous best method in image generation, generative adversarial networks. However, early diffusion models require thousands of denoising steps, resulting in a slow generation process. Since then, accelerating the diffusion model generation process has been a popular research topic.

[0003] Since the diffusion model can be regarded as a process of numerically solving ordinary differential equations when generating, using a more accurate ordinary differential equation solver can allow a larger step size, thereby accelerating sampling. Based on the improved ordinary differential equation solver, the number of sampling steps in the generation process of the diffusion model has been proven to be reduced to tens of steps while ensuring similar image generation quality. Among them, Song, J., Meng, C., & Ermon, S. (2020). Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502. extended the Markov process of the diffusion model to a non-Markov process, thereby achieving the effect of crossing multiple time steps at a time in the sampling process; Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., & Zhu, J. (2022). Dpm-solver: A fast odesolver for diffusion probabilistic model sampling in around 10 steps. Advances in Neural Information Processing Systems, 35, 5775-5787. by precisely analyzing the linear part of the numerical solution of the ordinary differential equation, it is equivalent to simplify it as an exponential weighted integral of the neural network, thereby obtaining an accurate solution of the diffusion model ordinary differential equation, and achieving an increase in the sampling process step size. However, these methods only start from the perspective of obtaining more accurate numerical solutions, ignoring the problem of large curvature of the diffusion model ordinary differential equation sampling trajectory, so that the generation process still requires tens of neural network calculations, limiting the further acceleration of the diffusion model sampling.

[0004] Another type of approach focuses on reducing the curvature of the sampling trajectory in the diffusion model, thereby fundamentally reducing the number of steps required in the sampling process. These methods were first proposed by Lipman, Y., Chen, RT, Ben-Hamu, H., Nickel, M., & Le, M. (2022). Flow matching for generative modeling. arXiv preprint arXiv:2210.02747., Liu, X., Gong, C., & Liu, Q. (2022). Flow straight and fast: Learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.03003., Albergo, MS, & Vanden-Eijnden, E. (2022). Building normalizing flows with stochastic interpolants. arXiv preprint arXiv:2209.15571. These methods reduce the curvature of the sampling trajectory by having the neural network directly learn vectors from noise to data to construct a straight vector field from noise to data. In addition, some methods further reduce the curvature of the sampling trajectory based on the above methods, such as "Pooladian, AA, Ben-Hamu, H., Domingo-Enrich, C., Amos, B., Lipman, Y., & Chen, RT (2023). Multisampleflow matching: Straightening flows with minibatch couplings. arXiv preprint arXiv:2304.14772." and "Tong, A., Fatras, K., Malkin, N., Huguet, G., Zhang, Y., Rector-Brooks, J., ... & Bengio, Y. (2023). Improving and generalizing flow-based generative models with minibatch optimal transport. arXiv preprint arXiv:2302.00482."By optimizing the transmission pairing of noise and data within mini-batches of training data, the construction of the most direct vector field within mini-batches was achieved; 《Yan, H., Liu, X., Pan, J., Liew, JH, Liu, Q., & Feng, J. (2024). Perflow: Piecewise rectified flow as universal plug-and-play accelerator. arXiv preprint arXiv:2405.07510. 》《Nguyen, B., Nguyen, B., & Nguyen, VA (2023). Bellman optimal stepsize straightening of flow-matching models. arXiv preprint arXiv:2312.16414. 》By segmenting the sampling trajectory in the time dimension and further straightening the trajectory at each time interval, the number of sampling steps is reduced to about the number of segments; 《Lee, S., Kim, B., & Ye, JC (2023, July). Minimizing trajectory curvature The paper "ofode-based generative models" (published in the International Conference on Machine Learning, pp. 18957-18973, PMLR) extends the originally parameterless feedforward process of diffusion models into a learnable one using neural networks, helping the model learn vector fields with lower curvature of sampling trajectories. However, these methods have their limitations, either restricting the straightness of the vector field to small batches of data or segmented time intervals, or complicating the modeling of diffusion models by introducing additional neural networks for the feedforward process. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing an efficient image generation method and apparatus based on a diffusion model.

[0006] According to a first aspect of the embodiments of this application, an efficient image generation method based on a diffusion model is provided, comprising:

[0007] (1) Obtain a pre-trained vector field network, and use the vector field network to perform single-step forward prediction to generate the first pseudo-sample image;

[0008] (2) Obtain a real image set and a discriminator. Sample a real image from the real image set and train the discriminator in one round with the goal of maximizing the difference between the first pseudo-sample image and the real image.

[0009] (3) Obtain the second pseudo-sample image, and train the vector field network for one round with the goal of maximizing the confidence score of the discriminator on the second pseudo-sample image and minimizing the difference between the output of the vector field network and the conditional vector field.

[0010] (4) Use the trained vector field network to generate a new first pseudo sample image, and repeat steps (2) to (3) until the predetermined training objective is achieved;

[0011] (5) Use the trained vector field network to quickly generate high-quality images.

[0012] Furthermore, the vector field network is used to realize the differential homeomorphism mapping from Gaussian noise distribution to image data manifold.

[0013] Furthermore, the pseudo-sample images are based on a parameterized vector field network. Spatiotemporal coordinates of points in the local manifold space The main feature direction is analyzed and obtained by constructing a single-step prediction operator through explicit Euler discretization.

[0014] Furthermore, the discriminator adopts a homogeneous visual Transformer architecture, including a feature extractor and several parallel discriminant heads;

[0015] The feature extractor extracts high-dimensional semantic features at different scales from the local and global correlations of the input image through a multi-head attention mechanism.

[0016] The discriminator is constructed based on a multi-head collaborative decision-making mechanism. Each discriminator judges the authenticity of the input image based on one of the high-dimensional semantic features and forms a confidence score for the fake sample image.

[0017] Furthermore, the training loss function of the discriminator is the negative of the sum of the logarithmic expectation of the confidence score of the real image and the logarithmic expectation of the doubt score of the pseudo-sample image.

[0018] Furthermore, the total loss of the vector field network includes the vector field loss and the discriminator loss;

[0019] The vector field loss is the expected squared difference between the vector field information predicted by the vector field network and the conditional vector field information.

[0020] The discriminator loss is the negative expectation of the logarithm of the confidence score of the pseudo-sample image;

[0021] The total loss of the training vector field is the sum of the vector field loss and the discriminator loss, where the discriminator loss is set with weight λ.

[0022] Furthermore, during the training phase of the vector field network, initial noise is randomly sampled from a Gaussian noise distribution, and target data points are randomly sampled from a set of real images. Based on the difference between the target data points and the initial noise, conditional vector field information is obtained.

[0023] Calculate the linear interpolation between the initial noise and the target data point, input the linear interpolation into the vector field network, obtain the vector field information predicted by the vector field network, and thus construct the vector field loss.

[0024] According to a second aspect of the embodiments of this application, an efficient image generation apparatus based on a diffusion model is provided, comprising:

[0025] The single-step forward prediction module is used to obtain a pre-trained vector field network, and to perform single-step forward prediction using the vector field network to generate a first pseudo-sample image.

[0026] The discriminator training module is used to acquire a set of real images and a discriminator, sample a real image from the set of real images, and train the discriminator in one round with the goal of maximizing the difference between the first pseudo-sample image and the real image.

[0027] The vector field network training module is used to acquire a second pseudo-sample image and to train the vector field network in one round with the goal of maximizing the confidence score of the discriminator on the second pseudo-sample image and minimizing the difference between the output of the vector field network and the conditional vector field.

[0028] The repeat module is used to generate a new first pseudo-sample image using the trained vector field network, repeating the process from the discriminator training module to the vector field network training module until the predetermined training objective is achieved.

[0029] The image generation module is used to quickly generate high-quality images using a trained vector field network.

[0030] According to a third aspect of the embodiments of this application, an electronic device is provided, comprising:

[0031] One or more processors;

[0032] Memory, used to store one or more programs;

[0033] When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in the first aspect.

[0034] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0035] The technical solution of this invention can be summarized as follows:

[0036] 1. A method for efficiently predicting generated results during training is proposed. The model learns a linear vector field from noise to data to obtain the characteristics of a relatively linear vector field. A differential homeomorphism mapping is performed on the continuous state space through a vector field function parameterized by a neural network. Euler discretization is implemented at the current time step, and a single forward propagation is performed to predict the state transition.

[0037] 2. A method to improve model generation quality by utilizing predicted generation results during training. Based on a multi-dimensional feature extractor, a discriminator is used to learn the difference between the generated data manifold and the real data manifold, and the alignment between the generated data manifold and the real data manifold is optimized during the training of the vector field;

[0038] 3. A method to improve model generation speed by combining adversarial training with diffusion models. When training the vector field, on the one hand, the model learns a linear vector field from noise to data; on the other hand, adversarial training is combined to optimize the direction of the vector field, which greatly improves the model generation speed while ensuring the generation quality.

[0039] The technical solutions provided by the embodiments of this application may include the following beneficial effects:

[0040] As can be seen from the above embodiments, this application utilizes the learned linear vector field to perform a single forward prediction based on the vector field at the current position and time during training. This combines adversarial training with vector field learning, allowing the model to learn information from the conditional vector field and optimize the vector field orientation based on the discriminator loss. This improves the generation speed of the diffusion model while ensuring high-quality generated data. This invention is the first to propose using the learned linear vector field for efficient prediction of generation results during training, and using adversarial training to optimize the vector field orientation. While reducing the number of evaluation networks required for image generation to just a few, it achieves generation results similar to or even better than the original diffusion model. This method is superior to existing methods and has advantages such as high generation quality and strong versatility. This method utilizes the straight characteristic of the noise-to-data vector to efficiently predict the generation result. This improves the quality of generated data and directly applies the discriminator loss to the vector field, facilitating optimization of the vector field orientation and accelerating high-quality sampling by the model.

[0041] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0043] Figure 1 This is a flowchart illustrating an efficient image generation method based on a diffusion model, according to an exemplary embodiment.

[0044] Figure 2 This is a schematic diagram illustrating a model training process according to an exemplary embodiment.

[0045] Figure 3 This is a block diagram illustrating an efficient image generation apparatus based on a diffusion model according to an exemplary embodiment.

[0046] Figure 4 This is a schematic diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0047] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.

[0048] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0049] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0050] This invention proposes a method for rapid generation of high-quality images based on a diffusion model, such as... Figure 1 As shown, it includes the following steps:

[0051] (1) Obtain a pre-trained vector field network, and use the vector field network to perform single-step forward prediction to generate the first pseudo-sample image;

[0052] like Figure 2 As shown, during the training phase, a dynamic system simulation framework based on a vector field network is constructed (i.e., the continuous trajectory evolution process of particles under the action of a vector field is described by ordinary differential equations). The continuous state space is mapped by a vector field network parameterized by a neural network. Euler discretization is implemented at the current time step, and a single forward propagation is performed to predict the state transition and generate pseudo-sample images.

[0053] Specifically, a U-shaped network structure with a symmetric encoding / decoding architecture (in one embodiment, an NCSNpp network) is used as the vector field network. The skeleton (of which) Let be a point in the data space, representing a sample of the current state. (As a time parameter, controlling the evolution of the flow), and using pre-trained network parameters. Initialize model parameters to accelerate model convergence:

[0054]

[0055] In one embodiment, the pre-trained network parameters provided in "Liu, X., Gong, C., & Liu, Q. (2022). Flowstraight and fast: Learning to generate and transfer data with rectifiedflow. arXiv preprint arXiv:2209.03003." can be used. Use this to initialize the vector field network parameters.

[0056] Using vector field network This allows for the realization of Gaussian noise distribution. To image data manifold Differential homeomorphism. When generating image data, the model first samples an arbitrary point from Gaussian noise. Then move along the vector field:

[0057]

[0058] In the actual image generation process, the integral in the above formula is discretized:

[0059]

[0060] in, To generate sampling points for the data manifold, This represents the total number of steps after discretization.

[0061] Traditional diffusion models are constrained by a differential equation framework based on noise addition and denoising. Their probability flow trajectories must strictly satisfy the compatibility conditions (Fokker-Planck-Kolmogorov conditions) of the FPK equations for forward noise addition and backward denoising. This results in a large curvature of the modeled vector field, forcing the sampling process to require hundreds or even thousands of steps from the ordinary differential equation solver. This invention directly learns the straight-line vector field from Gaussian noise to the data, reducing the vector field curvature and the number of sampling steps to just a few. Furthermore, adversarial training is employed to improve the quality of generated data, achieving the same or even better generation results with fewer sampling steps.

[0062] Based on parameterized vector field network Spatiotemporal coordinates of points in the local manifold space In the direction of the analytical principal feature, a single-step prediction operator is constructed through explicit Euler discretization. ,Right now

[0063]

[0064] in, This represents the direction of the vector field. In this embodiment, the vector field is predicted by a vector field network. .

[0065] This method achieves efficient prediction of generated results during training. It leverages the low curvature of the vector field to directly predict and generate pseudo-sample images based on the current vector field direction. Its advantages lie in its simplicity and effectiveness, while also allowing the subsequent discriminator loss to be directly applied to the vector field direction to optimize it.

[0066] (2) Obtain a real image set and a discriminator. Sample a real image from the real image set and train the discriminator in one round with the goal of maximizing the difference between the first pseudo-sample image and the real image.

[0067] Before using the feature extractor in the discriminator to extract features, the image is first augmented (by flipping, etc.) and cropped:

[0068]

[0069] in For image data after data augmentation and cropping, For cropping operations, crop the image to the specified size. , This involves data augmentation operations. The processed image is then tokenized for use in subsequent visual Transformer architectures.

[0070]

[0071] This is a tokenization operation.

[0072] The discriminator consists of a feature extractor and several discriminant heads. The feature extractor adopts the ViT-S model based on the visual transformer architecture. This model is pre-trained using the DINO algorithm with a self-supervised learning objective function and extracts high-dimensional semantic features with high spatial resolution from the local and global correlations of the input image through a multi-head attention mechanism. These processes can be summarized as follows:

[0073]

[0074] in, For high-dimensional semantic features, It is a feature extractor.

[0075] Discriminator It adopts a homogeneous visual Transformer architecture, in which each layer of the network maintains a constant representation dimension and global receptive field, and the discriminator head uses a five-parallel branch structure. Each branch is constructed based on a multi-head collaborative decision-making mechanism. The feature extractor extracts high-dimensional semantic features at different scales. Each discriminator judges the authenticity of the input image based on one of the high-dimensional semantic features. Finally, a confidence score is formed based on the output of all discriminators.

[0076] Each discriminator consists of a convolutional layer, a batch regularization layer, and an activation layer, which are connected in the form of a residual network.

[0077] like Figure 2 As shown, during the discriminator training phase, the single-step prediction results of the vector field network are input into the discriminator, while real images are sampled from the real image set. The input discriminator achieves feature space discriminability by maximizing the difference between the pseudo-sample images and real images; that is, the loss function for training the discriminator is:

[0078]

[0079] in These are the trainable parameters in the discriminator.

[0080] (3) Obtain the second pseudo-sample image, and train the vector field network for one round with the goal of maximizing the confidence score of the discriminator on the second pseudo-sample image and minimizing the difference between the output of the vector field network and the conditional vector field.

[0081] like Figure 2As shown, during the training phase of the vector field network, the Gaussian noise distribution... Initial noise of random sampling At the same time, target data points are randomly sampled from the real image set. To construct noise-data paired training samples The vectors from noise to data in this sample provide information about the conditional vector field for training the vector field. ,Right now

[0082]

[0083] When training the vector field network, the first step is to obtain linear interpolation of the noise-data pairing:

[0084]

[0085] Then linear interpolation Inputting the vector field network yields the model's prediction of the vector field at this location and time. The mean squared error between this prediction and the vector error from noise to data is calculated as the loss function to optimize the vector field network. In other words, the vector field loss during training is...

[0086]

[0087] During the training phase of the vector field network, a single-step forward prediction is performed again using the vector field network. The obtained second pseudo-sample image is input into the discriminator, and its output is used as a loss. The weight parameters of the vector field network are optimized using the gradient backpropagation algorithm to maximize the discriminator's confidence score for the pseudo-sample image. That is, the discriminator loss during vector field training is...

[0088]

[0089] When balancing the vector field loss and discriminator loss during the training of a vector field network, hyperparameters are used. As weights in the discriminator loss, they enable the vector field to learn a straight vector field from the noisy manifold to the data manifold, and improve the quality of data generation, thus optimizing the vector field. In other words, the total loss for training the vector field is...

[0090]

[0091] (4) Use the trained vector field network to generate a new first pseudo sample image, and repeat steps (2) to (3) until the predetermined training objective is achieved;

[0092] Specifically, during the training process, since the training results of the vector field network and the discriminator affect each other, the training of the vector field network and the discriminator is set to be carried out alternately, that is, after updating the parameters of the vector field network once, the parameters of the discriminator network are updated once.

[0093] Training is stopped once the predetermined number of training rounds is reached, or once the total training loss of the vector field converges.

[0094] (5) Use the trained vector field network to quickly generate high-quality images;

[0095] Specifically, sampling a point from Gaussian noise. Moving along the vector field yields This enables image generation.

[0096] An implementation example of the invention was conducted on a machine equipped with an Intel(R) Xeon(R) Gold 6330 CPU and an NVIDIA A800 80GB GPU. The effectiveness of the invention was verified on multiple datasets, including CIFAR-10 (image size 32*32), CelebA-HQ (image size 256*256), and AFHQ-Cat (image size 256*256). Without compromising generation quality, the invention reduces the generation speed of the diffusion model to one-hundredth to one-thousandth of the original speed.

[0097] Corresponding to the aforementioned embodiments of the efficient image generation method based on the diffusion model, this application also provides embodiments of an efficient image generation apparatus based on the diffusion model.

[0098] Figure 3 This is a block diagram illustrating an efficient image generation apparatus based on a diffusion model, according to an exemplary embodiment. (Refer to...) Figure 3 The device may include:

[0099] The single-step forward prediction module 21 is used to obtain a pre-trained vector field network, and use the vector field network to perform single-step forward prediction to generate a first pseudo-sample image.

[0100] The discriminator training module 22 is used to acquire a set of real images and a discriminator, sample a real image from the set of real images, and train the discriminator in one round with the goal of maximizing the difference between the first pseudo-sample image and the real image.

[0101] The vector field network training module 23 is used to acquire a second pseudo-sample image and to train the vector field network in one round with the goal of maximizing the confidence score of the discriminator on the second pseudo-sample image and minimizing the difference between the output of the vector field network and the conditional vector field.

[0102] The repeat module 24 is used to generate a new first pseudo-sample image using the trained vector field network, repeating the process from the discriminator training module to the vector field network training module until the predetermined training objective is achieved.

[0103] Image generation module 25 is used to quickly generate high-quality images using a trained vector field network.

[0104] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0105] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0106] Accordingly, this application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the above-described efficient image generation method based on a diffusion model.

[0107] Accordingly, this application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the above-described efficient image generation method based on a diffusion model. Figure 4 The diagram shown is a hardware structure diagram of any data processing device, including a high-efficiency image generation device based on a diffusion model provided in an embodiment of the present invention. Except for... Figure 4 In addition to the processor, memory, and network interface shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0108] Accordingly, this application also provides a computer-readable storage medium storing computer instructions thereon, which, when executed by a processor, implement the efficient image generation method based on the diffusion model described above. The computer-readable storage medium can be an internal storage unit of any data processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0109] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

Claims

1. An efficient image generation method based on a diffusion model, characterized in that, Includes the following steps: (1) Obtain a pre-trained vector field network, and use the vector field network to perform single-step forward prediction to generate the first pseudo-sample image. Here, a U-shaped network structure with a symmetric encoding and decoding architecture is used as the skeleton of the vector field network, and the pre-trained network parameters are used. Initialize the model parameters, which is the pre-trained vector field network; (2) Obtain a real image set and a discriminator. Sample a real image from the real image set and train the discriminator in one round with the goal of maximizing the difference between the first pseudo-sample image and the real image. (3) Obtain the second pseudo-sample image, and with the goal of maximizing the confidence score of the discriminator on the second pseudo-sample image and minimizing the difference between the output of the vector field network and the conditional vector field, train the vector field network for one round, wherein the second pseudo-sample image is the image obtained by using the vector field network to perform single-step forward prediction during the training phase of the vector field network; (4) Use the trained vector field network to generate a new first pseudo sample image, and repeat steps (2) to (3) until the predetermined training objective is achieved; (5) Use the trained vector field network to quickly generate high-quality images; The conditional vector field is obtained in the following way: From Gaussian noise distribution Initial noise of random sampling At the same time, target data points are randomly sampled from the real image set. To construct noise-data paired training samples The vectors from noise to data in this sample provide information about the conditional vector field for training the vector field. ,Right now .

2. The method according to claim 1, characterized in that, The vector field network is used to implement a differential homeomorphism mapping from Gaussian noise distribution to image data manifold.

3. The method according to claim 1, characterized in that, The pseudo-sample images are based on a parameterized vector field network. Spatiotemporal coordinates of points in the local manifold space The principal feature direction is analyzed and obtained by constructing a single-step prediction operator through explicit Euler discretization.

4. The method according to claim 1, characterized in that, The discriminator adopts a homogeneous visual Transformer architecture, including a feature extractor and several parallel discriminant heads; The feature extractor extracts high-dimensional semantic features at different scales from the local and global correlations of the input image through a multi-head attention mechanism. The discriminator is constructed based on a multi-head collaborative decision-making mechanism. Each discriminator judges the authenticity of the input image based on one of the high-dimensional semantic features and forms a confidence score for the fake sample image.

5. The method according to claim 1, characterized in that, The training loss function of the discriminator is the negative of the sum of the logarithmic expectation of the confidence score of the real image and the logarithmic expectation of the doubt score of the pseudo-sample image.

6. The method according to claim 1, characterized in that, The total loss of the vector field network includes the vector field loss and the discriminator loss; The vector field loss is the expected squared difference between the vector field information predicted by the vector field network and the conditional vector field information. The discriminator loss is the negative expectation of the logarithm of the confidence score of the pseudo-sample image; The total loss of the training vector field is the sum of the vector field loss and the discriminator loss, where the discriminator loss is set with weight λ.

7. The method according to claim 6, characterized in that, During the training phase of the vector field network, initial noise is randomly sampled from a Gaussian noise distribution, and target data points are randomly sampled from a set of real images. Based on the difference between the target data points and the initial noise, the conditional vector field information is obtained. Calculate the linear interpolation between the initial noise and the target data point, input the linear interpolation into the vector field network, obtain the vector field information predicted by the vector field network, and thus construct the vector field loss.

8. An efficient image generation device based on a diffusion model, characterized in that, Includes the following steps: The single-step forward prediction module is used to acquire a pre-trained vector field network, perform single-step forward prediction using the vector field network, and generate a first pseudo-sample image. A U-shaped network structure with a symmetrical encoding / decoding architecture is used as the skeleton of the vector field network, and pre-trained network parameters are used. Initialize the model parameters, which is the pre-trained vector field network; The discriminator training module is used to acquire a set of real images and a discriminator, sample a real image from the set of real images, and train the discriminator in one round with the goal of maximizing the difference between the first pseudo-sample image and the real image. The vector field network training module is used to acquire a second pseudo-sample image and to train the vector field network in one round with the goal of maximizing the confidence score of the discriminator on the second pseudo-sample image and minimizing the difference between the output of the vector field network and the conditional vector field. The second pseudo-sample image is an image obtained by performing a single-step forward prediction using the vector field network during the training phase of the vector field network. The repeat module is used to generate a new first pseudo-sample image using the trained vector field network, repeating the process from the discriminator training module to the vector field network training module until the predetermined training objective is achieved. The image generation module is used to quickly generate high-quality images using the trained vector field network. The conditional vector field is obtained in the following way: From Gaussian noise distribution Initial noise of random sampling At the same time, target data points are randomly sampled from the real image set. To construct noise-data paired training samples The vectors from noise to data in this sample provide information about the conditional vector field for training the vector field. ,Right now .

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-7.