Image generation method and device

By introducing splicing parameters into the image generation model and optimizing the initial splicing parameters, the accuracy and performance deficiencies of the image generation method during editing are solved, the accuracy and quality of image generation are improved, and the model training process is simplified.

CN118710518APending Publication Date: 2024-09-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
CN202410952156.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing image generation methods have deficiencies in accuracy and performance during image editing. In particular, the accuracy of the generated image after editing the original image is poor, resulting in low quality of the generated image.

Method used

By introducing splicing parameters into the image generation model, weighted splicing of up and down sampling features is performed, the initial splicing parameters are optimized to improve the feature extraction and recovery capabilities of the image generation model, and the loss function is used to adjust parameters to improve the accuracy and quality of the model.

Benefits of technology

It improves the accuracy and quality of image generation, simplifies the model training process, reduces the amount of training data, and enhances the flexibility and performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710518A
    Figure CN118710518A
Patent Text Reader

Abstract

The embodiment of the invention discloses an image generation method and device. The method comprises the following steps: acquiring a media data sample and sample guide data; in the initial image generation model, performing down-sampling processing on the media data sample by adopting the sample guide data to obtain down-sampling sample features; in the initial image generation model, performing up-sampling processing on the down-sampling sample features by adopting the sample guide data to obtain up-sampling sample features, and performing weighted splicing on the down-sampling sample features and the up-sampling sample features by adopting the initial splicing parameters to obtain sample prediction features; and adjusting the initial splicing parameter through a loss function generated by the sample prediction feature and the media data sample until a feature splicing parameter during parameter convergence is obtained, and determining the initial image generation model comprising the feature splicing parameter as a target image generation model. According to the invention, the accuracy of image generation and the quality of the generated image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image generation method and device. Background Art

[0002] With the emergence of generative models based on diffusion models, significant progress has been made in the field of controllable image generation, allowing the technology to be widely used in products such as image creation and editing. Conventional image generation uses text descriptions to drive text-generated graph models to predict noise in the latent space with the help of denoising structures, thereby removing noise to obtain target image generation. In general, image-text controlled generation is performed with the help of a padding method, that is, the constraint graph is used as input for encoding processing, and then text is used to control generation based on the constraint graph. This method is to edit the original image (i.e., the constraint graph) so that the final generated image is not much different from the color and environment layout of the constraint graph. Compared with the original constraint graph, it is not very editable, resulting in poor accuracy of image generation and poor image generation performance. Summary of the invention

[0003] The embodiments of the present application provide an image generation method and device, which can improve the accuracy of image generation and the quality of the generated images.

[0004] On the one hand, an embodiment of the present application provides an image generation method, the method comprising:

[0005] Obtaining media data samples and sample guide data;

[0006] In the initial image generation model, the media data samples are downsampled using sample guidance data to obtain downsampled sample features; the downsampling process is used to reduce the dimension and extract features;

[0007] In the initial image generation model, the sample guidance data is used to upsample the downsampled sample features to obtain the upsampled sample features, and the initial splicing parameters are used to weighted splice the downsampled sample features and the upsampled sample features to obtain the sample prediction features; the upsampling process is used to increase the dimension and restore the image;

[0008] A loss function is generated by combining sample prediction features with media data samples, and the initial splicing parameters are adjusted based on the loss function until the feature splicing parameters are obtained when the parameters converge. The initial image generation model including the feature splicing parameters is determined as the target image generation model; the target image generation model is used to generate image data based on the image guidance data.

[0009] On the one hand, an embodiment of the present application provides an image generation method, the method comprising:

[0010] Obtaining initial media data and image guide data;

[0011] In the target image generation model, the image-guided data is used to downsample the initial media data to obtain downsampled semantic features; the downsampling process is used to reduce the dimension and extract features, and the parameters used in the downsampling process are hyperparameters;

[0012] In the target image generation model, the downsampled semantic features are upsampled using image guidance data to obtain upsampled semantic features, and the downsampled semantic features and the upsampled semantic features are weightedly spliced ​​using feature splicing parameters to obtain image prediction features; the upsampling process is used to increase the dimension and restore the image, and the parameters used in the upsampling process are hyperparameters, and the feature splicing parameters are parameters obtained through loss function training;

[0013] The image prediction features are denoised and decoded through the target image generation model to obtain target image data; the target image data has the features indicated by the image guidance data.

[0014] In one aspect, an embodiment of the present application provides an image generating device, the device comprising:

[0015] A sample acquisition module, used to acquire media data samples and sample guide data;

[0016] A sample downsampling module is used to downsample the media data samples using sample guidance data in the initial image generation model to obtain downsampled sample features; the downsampling process is used to reduce the dimension and extract features;

[0017] The sample upsampling module is used to perform upsampling processing on the downsampled sample features using the sample guidance data in the initial image generation model to obtain the upsampled sample features, and perform weighted splicing of the downsampled sample features and the upsampled sample features using the initial splicing parameters to obtain the sample prediction features; the upsampling processing is used to increase the dimension and restore the image;

[0018] A parameter adjustment module is used to generate a loss function through sample prediction features and media data samples, and adjust the initial splicing parameters based on the loss function until the feature splicing parameters are obtained when the parameters converge, and the initial image generation model including the feature splicing parameters is determined as the target image generation model; the target image generation model is used to generate image data according to the image guidance data.

[0019] The sample acquisition module can be used for:

[0020] Acquire a first business processing task, and acquire a second business processing task corresponding to the first business processing task; the second business processing task includes the first business processing task;

[0021] Acquire a first image generation model corresponding to the second business processing task, determine the first image generation model as an initial image generation model for the first business processing task, and acquire a model training set corresponding to the first business processing task and the initial image generation model; the initial image generation model is a model that has been trained;

[0022] A media data sample having the characteristics indicated by the first business processing task is obtained from the model training set, and sample guidance data is generated according to the first business processing task.

[0023] The device further comprises:

[0024] A model determination module, configured to determine the basic model of the model architecture corresponding to the first business processing task as the initial image generation model if the first image generation model corresponding to the second business processing task is not obtained, and insert initial splicing parameters into the initial image generation model;

[0025] The model determination module is further configured to, if the first image generation model corresponding to the second business processing task is acquired, execute a process of determining the first image generation model as the initial image generation model for the first business processing task.

[0026] Wherein, when the initial splicing parameters are adjusted based on the loss function until the feature splicing parameters are obtained when the parameters converge, the parameter adjustment module can be used to:

[0027] If the initial image generation model is the first image generation model, the initial splicing parameters are adjusted based on the loss function until the characteristic splicing parameters are obtained when the parameters converge;

[0028] If the initial image generation model is not the first image generation model, the original parameters and initial splicing parameters in the initial image generation model are adjusted based on the loss function until the feature splicing parameters and model parameters are obtained when the parameters converge; the original parameters are the parameters included in the initial image generation model, the model parameters are the parameters after the original parameters converge, and the feature splicing parameters are the parameters after the initial splicing parameters converge.

[0029] Wherein, the media data samples include image data samples and noise data samples;

[0030] The sample acquisition module can be used to:

[0031] Obtaining an image data sample and a sample size of the image data sample, generating random pixel values ​​based on the sample size, and composing the random pixel values ​​into a noise data sample; the number of random pixel values ​​is obtained from the sample size;

[0032] Perform screen analysis on the image data samples to obtain sample guidance data.

[0033] The media data sample includes a noise data sample; when a loss function is generated by using the sample prediction feature and the media data sample, the parameter adjustment module can be used to:

[0034] Obtaining conventional sample features and control sample features in sample prediction features, and obtaining the guidance scale of sample guidance data; conventional sample features are used to represent features obtained by sampling and processing media data samples; control sample features are used to represent features obtained by sampling and processing media data samples using sample guidance data;

[0035] The difference between the control sample feature and the regular sample feature is weighted by using the guided scale to obtain the control semantic feature, and the sum of the control semantic feature and the regular sample feature is determined as the sample prediction noise;

[0036] Construct a loss function based on the difference data between the sample prediction noise and the noise data sample.

[0037] The media data samples include image data samples; the image data samples refer to images having the features indicated by the sample guide data;

[0038] When generating a loss function through sample prediction features and media data samples, the parameter adjustment module can be used to:

[0039] Perform noise removal on the sample prediction features to obtain sample denoising features;

[0040] Decode the sample denoising features to obtain a sample prediction image;

[0041] A loss function is constructed based on the difference data between the sample prediction image and the image data sample.

[0042] The device further comprises:

[0043] The sample prediction module is used to obtain the t-th regular sample feature and the t-th control sample feature in the t-th sample prediction feature in the t-th denoising process, and determine the t-th sample prediction noise based on the t-th regular sample feature and the t-th control sample feature; t is a positive integer less than or equal to T; T is the total number of iterations of the denoising process;

[0044] The sample prediction module is further used to obtain a media data sample if t is 1, perform feature fusion on the media data sample and the t-th sample prediction noise, and obtain a t+1-th sample denoising feature;

[0045] The sample prediction module is further used for obtaining the t-th sample denoising feature if t is a positive integer greater than 1 and less than T, and performing feature fusion on the t-th sample denoising feature and the t-th sample prediction noise to obtain the t+1-th sample denoising feature;

[0046] The sample prediction module is also used to execute a process of generating a loss function through sample prediction features and media data samples if t is T.

[0047] The device further comprises:

[0048] A parameter generation module, used to obtain the sampling dimension of the upsampling block included in the initial image generation model, initialize the first initial parameter using a random Gaussian distribution, and initialize the second initial parameter using a random Gaussian distribution; the first initial parameter is used to perform weighted processing on the downsampled sample features, and the second initial parameter is used to perform weighted processing on the upsampled sample features; the parameter dimensions of the first initial parameter and the second initial parameter are obtained according to the sampling dimension;

[0049] The parameter generation module is also used to determine the first initial parameter and the second initial parameter as initial splicing parameters.

[0050] In one aspect, an embodiment of the present application provides an image generating device, the device comprising:

[0051] A data acquisition module, used to acquire initial media data and image guidance data;

[0052] The data downsampling module is used to downsample the initial media data using the image-guided data in the target image generation model to obtain downsampled semantic features; the downsampling process is used to reduce the dimension and extract features, and the parameters used in the downsampling process are hyperparameters;

[0053] The data upsampling module is used to upsample the downsampled semantic features using the image guidance data in the target image generation model to obtain the upsampled semantic features, and to weightedly splice the downsampled semantic features and the upsampled semantic features using the feature splicing parameters to obtain the image prediction features; the upsampling process is used to increase the dimension and restore the image, the parameters used in the upsampling process are hyperparameters, and the feature splicing parameters are parameters obtained through loss function training;

[0054] The data decoding module is used to perform denoising and decoding processing on the image prediction features through the target image generation model to obtain target image data; the target image data has the features indicated by the image guidance data.

[0055] The device further comprises:

[0056] A model acquisition module, used to acquire the third business processing task corresponding to the image guidance data, and search for the second image generation model corresponding to the third business processing task;

[0057] The model acquisition module is further used to determine the second image generation model as the target image generation model if the second image generation model is found;

[0058] The model acquisition module is also used to acquire a fourth business processing task including the third business processing task if the second image generation model is not found, and determine the third image generation model corresponding to the fourth business processing task as the target image generation model.

[0059] On the one hand, an embodiment of the present application provides a computer device, including a processor, a memory, and an input and output interface;

[0060] The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used to receive and output data, the memory is used to store a computer program, and the processor is used to call the computer program so that a computer device including the processor executes the image generation method in one aspect of an embodiment of the present application.

[0061] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the image generation method in one aspect of the embodiment of the present application.

[0062] In one aspect, an embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional ways in one aspect of the embodiment of the present application. In other words, when the computer instruction is executed by the processor, the method provided in various optional ways in one aspect of the embodiment of the present application is implemented.

[0063] Implementing the embodiments of the present application will have the following beneficial effects:

[0064] In an embodiment of the present application, media data samples and sample guide data can be obtained; in an initial image generation model, the sample guide data is used to perform downsampling processing on the media data samples to obtain downsampled sample features; the downsampling processing is used to reduce dimension and extract features; in the initial image generation model, the sample guide data is used to perform upsampling processing on the downsampled sample features to obtain upsampled sample features, and the initial splicing parameters are used to weighted splice the downsampled sample features and the upsampled sample features to obtain sample prediction features; the upsampling processing is used to increase dimension and restore the image; a loss function is generated by the sample prediction features and the media data samples, and the initial splicing parameters are adjusted based on the loss function until the feature splicing parameters when the parameters converge are obtained, and the initial image generation model including the feature splicing parameters is determined as the target image generation model; the target image generation model is used to generate image data according to the image guide data. By introducing the splicing parameters in the image generation model, the splicing parameter changes of the up and down sampling features become hyperparameter vectors, so that the generation features in the image generation model can be adjusted in more detail, improving the accuracy of image generation and the quality of the generated image. Moreover, by optimizing the loss of the model, converged feature splicing parameters are obtained, so that the model quality and performance of the final target image generation model can be further improved, thereby improving the accuracy of image generation. In addition, in this application, only the splicing parameters need to be optimized and adjusted, so that the number of model training is very small, so that when adjusting the function of the image generation model, only a small amount of data needs to be processed, thereby improving the flexibility of model training and model quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 This is a network interaction architecture diagram for image generation provided by an embodiment of the present application;

[0067] Figure 2 is a schematic diagram of an image generation scenario provided by an embodiment of the present application;

[0068] Figure 3 It is a schematic diagram of a model architecture provided in an embodiment of the present application;

[0069] Figure 4 is a flow chart of a method for image generation provided in an embodiment of the present application;

[0070] Figure 5aIt is a schematic diagram of a model training architecture provided in an embodiment of the present application;

[0071] Figure 5b This is another schematic diagram of a model training architecture provided in an embodiment of the present application;

[0072] Figure 6 This is a schematic diagram of a specific process of image generation provided by an embodiment of the present application;

[0073] Figure 7 is a schematic diagram of a feature splicing scene provided in an embodiment of the present application;

[0074] Figure 8 This is a schematic diagram of a T-time denoising process provided by an embodiment of the present application;

[0075] Fig. 9 is a flow chart of another method for generating an image provided by an embodiment of the present application;

[0076] Fig.10 It is a schematic diagram of a model architecture provided in an embodiment of the present application;

[0077] Fig.11 It is a schematic diagram of a feature stitching processing scenario provided in an embodiment of the present application;

[0078] Fig.12 It is a schematic diagram of a model hierarchical structure provided in an embodiment of the present application;

[0079] Fig.13 It is a data processing schematic diagram of an image generation scenario provided by an embodiment of the present application;

[0080] Fig.14 It is a schematic diagram of another specific process of image generation provided by an embodiment of the present application;

[0081] Fig.15 is a schematic diagram of an image generating device provided in an embodiment of the present application;

[0082] Fig.16 is a schematic diagram of another image generating device provided in an embodiment of the present application;

[0083] Fig.17 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0085] Among them, if it is necessary to collect object (such as user, etc.) data in this application, a prompt interface or pop-up window will be displayed before and during the collection. The prompt interface or pop-up window is used to prompt the user that certain data is currently being collected. Only after the user confirms the prompt interface or pop-up window, the relevant steps of data acquisition are started, otherwise the process ends. Moreover, the acquired user data will be used in reasonable and legal scenarios or purposes. Optionally, in some scenarios where user data needs to be used but is not authorized by the user, authorization can be requested from the user, and the user data can be used when the authorization is passed. In other words, the use of user data by this application will comply with the relevant provisions of laws and regulations.

[0086] In the examples of this application, see Figure 1 , Figure 1 is a network interaction architecture diagram of image generation provided by an embodiment of the present application, such as Figure 1 As shown, the computer device 101 can obtain media data samples and sample guide data from the service device or local memory, use the sample guide data to sample and process the media data samples, and use the initial splicing parameters to perform feature splicing on the downsampled features and the upsampled features to obtain sample prediction features. Further, the initial splicing parameters can be adjusted and optimized based on the loss function obtained from the sample prediction features and the media data samples to obtain the target image generation model. By introducing the splicing parameters into the image generation model, a more detailed adjustment of the generation features in the target image generation model is achieved, thereby improving the accuracy of image generation and the quality of the generated image. Moreover, the adjustment performs a quantitative evaluation on the splicing parameters, making the adjustment of the splicing parameters more systematic and effective, thereby improving the model quality and performance, and then improving the accuracy of image generation and the quality of the generated image.

[0087] The computer device 101 can use the media data samples and sample guide data to optimize and adjust the initial splicing parameters through the media data samples and sample guide data to obtain feature splicing parameters, and determine the initial image generation model including the feature splicing parameters as the target image generation model. The computer device 101 can also obtain the media data samples and sample guide data from any business device (such as business device 102a, business device 102b or business device 102c, etc.). Further optionally, after the computer device 101 obtains the target image generation model through training, it can also send the target image generation model to any business device.

[0088] For details, see Figure 2 , Figure 2 Schematic diagram of an image generation scenario provided by an embodiment of the present application. Figure 2 As shown, the computer device can obtain a media data sample 201 and sample guidance data 203 (such as "sun"). In the initial image generation model, the media data sample 201 is downsampled using the sample guidance data 203 to obtain a downsampled sample feature 202, and the downsampled sample feature 202 is upsampled using the sample guidance data 203 to obtain an upsampled sample feature 204. The downsampled sample feature 202 and the upsampled sample feature 204 are weightedly spliced ​​205 using the initial splicing parameters to obtain a sample prediction feature 206. Based on the loss function obtained from the sample prediction feature 206 and the media data sample 201, the initial splicing parameters are adjusted to obtain feature splicing parameters. The initial image generation model including the feature splicing parameters is determined as the target image generation model, and the splicing parameters are updated and optimized to obtain the optimized feature splicing parameters, thereby further improving the model quality and performance of the final target image generation model.

[0089] Specifically, the computer device can obtain an initial image generation model, generate initial splicing parameters, insert the initial splicing parameters into the initial image generation model, use the media data sample and the sample guidance data to adjust and optimize the initial splicing parameters, obtain characteristic splicing parameters, and determine the initial image generation model at this time as the target image generation model, which includes the characteristic splicing parameters. Optionally, you can refer to Figure 3 , Figure 3 is a schematic diagram of a model architecture provided in an embodiment of the present application, such as Figure 3As shown, the image generation model (such as the initial image generation model and the target image generation model, etc.) may include an encoding network, an image denoising network, and a decoding network, etc., wherein the image denoising network may include a downsampling network, an intermediate sampling network, and an upsampling network, etc. Specifically, the initial splicing parameters may be inserted into the upsampling network of the initial image generation model, and the initial splicing parameters may be optimized and adjusted to obtain the feature splicing parameters.

[0090] It is understandable that the computer devices mentioned in the embodiments of the present application include but are not limited to terminal devices or servers. In other words, the computer device can be a server or a terminal device, or it can be a system composed of a server and a terminal device. Among them, the terminal device mentioned above can be an electronic device, including but not limited to mobile phones, tablet computers, desktop computers, laptop computers, PDAs, vehicle-mounted devices, augmented reality / virtual reality (Augmented Reality / Virtual Reality, AR / VR) devices, helmet displays, smart TVs, wearable devices, smart speakers, digital cameras, cameras and other mobile Internet devices (mobile internet device, MID) with network access capabilities, or terminal devices in scenarios such as trains, ships, and flights. Figure 1 As shown in , the terminal device may be a laptop computer (as shown in the service device 102b), a mobile phone (as shown in the service device 102c), or a vehicle-mounted device (as shown in the service device 102a), etc. Figure 1 Only some of the devices are listed, and optionally, the business device 102a refers to a device located in the vehicle 103, and the business device 102a can be used to display image data 1021, etc. Among them, the server mentioned above can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, vehicle-road collaboration, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0091] Optionally, the data involved in the embodiments of the present application can be stored in a computer device, or the data can be stored based on cloud storage technology or a blockchain network, which is not limited here.

[0092] For further information, see Figure 4 , Figure 4 This is a flow chart of a method for image generation provided by an embodiment of the present application. Figure 4 As shown, the image generation process includes the following steps:

[0093] Step S401, obtaining media data samples and sample guide data.

[0094] In an embodiment of the present application, a computer device can obtain a media data sample and sample guide data, wherein the sample guide data can be considered as control information for generating image data, such as text guide data, or image guide data, or can include text guide data and image guide data, etc. That is, text guide data can be used to generate text images, and image guide data can be used to generate images, etc., without limitation. Among them, the present application is mainly described by taking the sample guide data as text guide data as an example, that is, it mainly realizes text images. Of course, when the sample guide data is image guide data, it can be used to realize image images.

[0095] Specifically, the computer device can obtain an initial image generation model, which can be a diffusion model (stable diffusion, SD), a two-stage cascade diffusion model (stable diffusion XL, SDXL) or an artificial intelligence image large model (imagen), etc., which is not limited here. Specifically, the computer device can directly obtain the initial image generation model. Alternatively, the initial image generation model can be obtained based on the first business processing task of model training. Among them, the initial image generation model can be used to implement the image function. The first business processing task is obtained, and the second business processing task corresponding to the first business processing task is obtained; the second business processing task includes the first business processing task, and the first business processing task is used to indicate the purpose of model training. For example, the first business processing task is "training images with cats", and the second business processing task can be "training images with animals", etc. For example, the first business processing task is "training images of animation themes", and the second business processing task can be "training images of film and television themes", etc. Furthermore, the first image generation model corresponding to the second business processing task can be obtained, the first image generation model can be determined as the initial image generation model for the first business processing task, and the model training set corresponding to the first business processing task and the initial image generation model can be obtained; the initial image generation model is a trained model. Media data samples with the features indicated by the first business processing task are obtained from the model training set, and sample guidance data is generated according to the first business processing task. Specifically, the media data samples can be analyzed to obtain sample guidance data, or the sample guidance data can be directly obtained. That is, the sample guidance data can be provided manually or obtained through analysis of media data samples, which is not limited here.

[0096] Optionally, if the first image generation model corresponding to the second business processing task is not obtained, the basic model of the model architecture corresponding to the first business processing task is determined as the initial image generation model, and the initial splicing parameters are inserted into the initial image generation model; if the first image generation model corresponding to the second business processing task is obtained, the process of determining the first image generation model as the initial image generation model for the first business processing task can be executed. Among them, since the second business processing task includes the first business processing task, when training the model used to implement the first business processing task, the model corresponding to the second business processing task can be first found, and the model can be fine-tuned on this basis to reduce the amount of data processed by the model training and improve the efficiency of model training.

[0097] The computer device may generate initial stitching parameters and insert the initial stitching parameters into the initial image generation model. Specifically, the computer device may obtain the sampling dimension of the upsampling block included in the initial image generation model, initialize the first initial parameter using a random Gaussian distribution, and initialize the second initial parameter using a random Gaussian distribution; the first initial parameter is used to perform weighted processing on the downsampled sample features, and the second initial parameter is used to perform weighted processing on the upsampled sample features; the parameter dimensions of the first initial parameter and the second initial parameter are obtained based on the sampling dimension; the first initial parameter and the second initial parameter are determined as the initial stitching parameters. The initial image generation model includes P up-sampled blocks to be updated in which splicing parameters are to be inserted, P is a positive integer, P is less than or equal to M, and M is the number of up-sampled blocks included in the initial image generation model. The computer device can obtain the sampling dimensions corresponding to the P up-sampled blocks to be updated, and initialize the first initial parameter and the second initial parameter using random Gaussian distribution under the P sampling dimensions to obtain the initial splicing parameters corresponding to the P up-sampled blocks to be updated, each initial splicing parameter includes a first initial parameter and a second initial parameter, and the parameter dimension of each initial splicing parameter is obtained according to the sampling dimension of the up-sampled block to be updated corresponding to the initial splicing parameter. For example, the sampling dimension of the up-sampled block to be updated is 16*16*1280, and in the initial splicing parameters corresponding to the up-sampled block to be updated, the parameter dimensions of the first initial parameter and the second initial parameter are 1*1280.

[0098] Optionally, if the initial image generation model obtained is the first image generation model, the stitching parameters may already exist in the initial image generation model. In this case, if the initial image generation model includes stitching parameters, the stitching parameters in the initial image generation model can be directly determined as the initial stitching parameters. Alternatively, the initial stitching parameters can be randomly generated and the stitching parameters in the initial image generation model can be replaced with the initial stitching parameters. The process of randomly generating the initial stitching parameters can refer to the process of initializing the first initial parameters and the second initial parameters with random Gaussian distribution mentioned above.

[0099] Among them, the computer device can obtain media data samples with features indicated by the first business processing task from the model training set, wherein the first business processing task can be used to represent the features required for the image data to be generated, and can be a text description, such as "a cat lying on the floor". Optionally, in a data acquisition method ①, the computer device can identify the sample description information of the training image samples included in the model training set, obtain the information similarity between the sample description information of the training image samples and the first business processing task, and determine the training image samples corresponding to the sample description information with information similarity greater than or equal to the business association threshold as media data samples. Alternatively, the business object targeted by the first business processing task can be obtained, the business object can be identified from the training image samples included in the model training set, and the training image samples with the identified business object can be determined as media data samples. That is, an image with features indicated by the first business processing task can be obtained from the model training set corresponding to the initial image generation model, or an image including the business object required by the training task can be obtained as a media data sample.

[0100] In a data acquisition method ②, the computer device may obtain an initial image sample having the features indicated by the first business processing task from the model training set, and determine the initial image sample as a media data sample. Alternatively, the initial image sample having the features indicated by the first business processing task may be obtained from the model training set, and the initial image sample may be subjected to image optimization processing to obtain a media data sample, and the image optimization processing may include but is not limited to image sharpening, image de-shaking processing, aesthetic enhancement processing, and image color balance processing. Alternatively, the computer device may obtain an initial image sample having the features indicated by the first business processing task from the model training set, obtain the sample quality of the initial image sample, and determine the media data sample from the initial image sample based on the sample quality, wherein the sample quality of the initial image sample may be predicted by an aesthetic scoring model or an image quality detection model, and further, the initial image samples may be sorted based on the sample quality to obtain an initial image sample sequence, and the first K initial image samples of the initial image sample sequence may be determined as media data samples, where K is a positive integer, or the initial image samples that account for the sample proportion of the initial image sample sequence (such as the first 30% of the initial image samples, etc.) may be determined as media data samples. The acquisition of the initial image sample may refer to the process of acquiring the media data sample in data acquisition method ①.

[0101] The media data sample includes an image data sample and a noise data sample. The computer device can obtain the image data sample and the sample size of the image data sample, generate random pixel values ​​based on the sample size, and form the random pixel values ​​into a noise data sample; the number of random pixel values ​​is obtained from the sample size, such as if the sample size is U*V, the number of random pixel values ​​is U*V. The value range of each random pixel value is the value range of the pixel value of the pixel point included in the media data. For example, if U is 64 and V is 64, 64*64 random pixel values ​​are generated, and the 64*64 random pixel values ​​are formed into a matrix of 64*64 dimensions, and the matrix is ​​determined as a noise data sample. The acquisition process of the image data sample can refer to the acquisition process of the media data sample in the above-mentioned data acquisition methods, that is, the media data samples obtained in the above-mentioned data acquisition methods are image data samples in the media data samples. Further optionally, sample guide data for the image data sample can be obtained, or the image data sample can be subjected to screen analysis to obtain sample guide data.

[0102] Step S402: In the initial image generation model, the media data samples are downsampled using sample guidance data to obtain downsampled sample features.

[0103] In the embodiment of the present application, downsampling processing is used for dimensionality reduction and feature extraction. Specifically, the computer device can obtain the media sample features corresponding to the media data samples in the initial image generation model, and use the sample guidance data to downsample the media sample features to obtain the downsampled sample features. Specifically, feature extraction can be performed on the sample guidance data to obtain the sample guidance features, and the sample guidance features can be used to downsample the media data samples to obtain the downsampled sample features.

[0104] When obtaining the media sample features corresponding to the media data samples, the computer device can encode the image data samples in the media data samples to obtain the sample encoding features to convert the image into the latent space features, which can be recorded as z=V(x), where x represents the image data sample and V() is used to represent the encoding network; based on the feature dimension of the sample encoding features, generate the noise data samples; perform feature fusion on the sample encoding features and the noise data samples to obtain the media sample features. For details, please refer to Figure 5a and Figure 5b , Figure 5a is a schematic diagram of a model training architecture provided in an embodiment of the present application, Figure 5b Schematic diagram of another model training architecture provided in the embodiment of the present application. Figure 5a or Figure 5bAs shown, the computer device can encode the image data samples through the encoding network to obtain sample encoding features, and perform feature fusion on the sample encoding features and the noise data samples to obtain media sample features.

[0105] Optionally, the downsampled sample features include downsampled residual features, downsampled self-attention features, and downsampled cross-attention features. The computer device can perform residual processing on the media sample features corresponding to the media data samples in the initial image generation model to obtain downsampled residual features; the residual processing is used to retain the features before the residual processing. The downsampled residual features are subjected to self-attention processing to obtain downsampled self-attention features; the downsampled self-attention features are used to represent the semantic information of the media data samples themselves. The sample guide features corresponding to the sample guide data are obtained, and the downsampled self-attention features are feature-fused with the sample guide features to obtain downsampled cross-attention features; the downsampled cross-attention features are used to represent the combined semantic information of the media data samples and the sample guide data.

[0106] The downsampling network in the present application may include M downsampling blocks, where M is a positive integer, and each downsampling block may include a residual network layer, a self-attention processing layer, and a cross-attention processing layer. The computer device may perform residual processing on the media sample features corresponding to the media data sample through the residual network layer to obtain downsampled residual features; perform self-attention processing on the downsampled residual features through the self-attention processing layer to obtain downsampled self-attention features; and perform feature fusion of the downsampled self-attention features and the sample guided features through the cross-attention processing layer to obtain downsampled cross-attention features.

[0107] Among them, the residual network layer in the present application is used to extract high-level semantic information from the input features, and the input features of the residual network layer can be convolutionally activated to obtain residual convolution features, and the input features of the residual network layer are summed with the residual convolution features to obtain the output features of the residual network layer. This process can be used for any residual network layer mentioned in the present application; the self-attention processing layer is used to associate different positions of a single sequence to calculate the representation of the same sequence, and the correlation between each feature element included in the input features of the self-attention processing layer and other feature elements can be obtained. Based on each feature element The correlation with other feature elements is performed, and other feature elements are merged into the feature element to obtain updated feature elements, and each updated feature element is used to form the output feature of the self-attention processing layer. This process can be used for any self-attention processing layer mentioned in this application; the cross-attention processing layer is used to combine different features into one feature, and the input features of the cross-attention processing layer (including text features and the output features of the previous network layer of the cross-attention processing layer) can be feature fused to obtain the output features of the cross-attention processing layer. This process can be used for any cross-attention processing layer mentioned in this application.

[0108] Optionally, the computer device may perform T denoising processes on the media sample features, where T is a positive integer and T is the total number of iterations of the denoising process. Specifically, in the t-th denoising process, the sample guidance data may be used to downsample the t-th sample denoising feature to obtain the downsampled sample features of the t-th denoising process, where t is a positive integer less than or equal to T. Wherein, when t is 1, the t-th sample denoising feature is a media data sample, and specifically may be a media sample feature. Specifically, in the t-th denoising process, if t is 1, the sample guidance data is used to downsample the media sample features to obtain the downsampled sample features of the t-th denoising process; if t is a positive integer greater than 1 and less than or equal to T, the sample guidance data is used to downsample the t-th sample denoising feature to obtain the downsampled sample features of the t-th denoising process.

[0109] Step S403, in the initial image generation model, the down-sampled sample features are up-sampled using the sample guidance data to obtain up-sampled sample features, and the down-sampled sample features and the up-sampled sample features are weightedly spliced ​​using the initial splicing parameters to obtain sample prediction features.

[0110] In the embodiment of the present application, upsampling processing is used to increase dimension and restore the image.

[0111] Specifically, when i is a positive integer greater than 1 and less than or equal to M, in the i-th upsampling block of the initial image generation model, the sample guidance data is used to upsample the i-1th sample prediction feature to obtain the i-th upsampled sample feature, the M-i+1th downsampled sample feature generated by the M-i+1th downsampled block is obtained, and the i-th initial splicing parameter in the i-th upsampling block is used to weighted splice the M-i+1th downsampled sample feature and the i-th upsampled sample feature to obtain the i-th sample prediction feature; M is the number of upsampling blocks included in the initial image generation model. When i is 1, in the first upsampling block of the initial image generation model, the sample guidance data is used to upsample the M-th downsampled sample feature to obtain the first upsampled sample feature, and the first initial splicing parameter is used to weighted splice the M-th downsampled sample feature and the first upsampled sample feature to obtain the first sample prediction feature.

[0112] Optionally, the upsampling network of the initial image generation model includes M upsampling blocks, and initial splicing parameters can be introduced into P upsampling blocks among the M upsampling blocks, where P is a positive integer less than or equal to M, that is, the initial splicing parameters can be introduced into each upsampling block, or the initial splicing parameters can be introduced into some upsampling blocks. At this time, in the i-th upsampling block, the i-1-th sample prediction feature is upsampled using the sample guidance data to obtain the i-th upsampled sample feature, and the M-i+1-th downsampled sample feature generated by the M-i+1-th downsampled block is obtained. If there is no initial splicing parameter in the i-th upsampling block, the M-i+1-th downsampled sample feature and the i-th upsampled sample feature are directly spliced ​​to obtain the i-th sample prediction feature; if there is an initial splicing parameter in the i-th upsampling block, the i-th initial splicing parameter in the i-th upsampling block is used to perform weighted splicing on the M-i+1-th downsampled sample feature and the i-th upsampled sample feature to obtain the i-th sample prediction feature.

[0113] Optionally, in the t-th denoising process, the sample guidance data can be used to upsample the downsampled sample features of the t-th denoising process to obtain the upsampled features of the t-th denoising process, and the initial splicing parameters are used to weighted splice the downsampled sample features of the t-th denoising process with the upsampled sample features of the t-th denoising process to obtain the t-th sample prediction features. Each denoising process includes downsampling of the downsampled sample features of the t-th denoising process by M upsampling blocks.

[0114] Step S404, generating a loss function through sample prediction features and media data samples, adjusting the initial splicing parameters based on the loss function until obtaining feature splicing parameters when the parameters converge, and determining the initial image generation model including the feature splicing parameters as the target image generation model.

[0115] In an embodiment of the present application, a target image generation model is used to generate image data according to image guidance data. The computer device can generate a loss function through sample prediction features and media data samples, and adjust the initial splicing parameters based on the loss function until the feature splicing parameters are obtained when the parameters converge. Specifically, the conventional sample features and the control sample features in the sample prediction features can be obtained to obtain the guidance scale of the sample guidance data; the conventional sample features are used to represent the features obtained by sampling and processing the media data samples; the control sample features are used to represent the features obtained by sampling and processing the media data samples using the sample guidance data. Among them, the sample prediction noise can be recorded as Z', and Z' can include these two parts of the results [pred_uncond, pred_text], among which pred_uncond is used to represent the conventional sample features, and pred_text is used to represent the control sample features. The guidance scale can be a hyperparameter, such as 7.5, etc., which is not limited here. Furthermore, the difference between the control sample feature and the regular sample feature can be weighted by using the guidance scale to obtain the control semantic feature. The sum of the control semantic feature and the regular sample feature is determined as the sample prediction noise, which can be recorded as noise_pred = pred_uncond + guidance_scale * (pred_text - pred_uncond), where guidance_scale is used to represent the guidance scale. According to the difference data between the sample prediction noise and the noise data sample, a loss function is constructed, such as Figure 5a The loss function shown in . The loss function can be shown in formula ①:

[0116]

[0117] As shown in formula ①, c is used to represent the sample guidance feature corresponding to the sample guidance data, t represents the tth denoising process, z t It is used to represent the data after adding noise to the media sample feature z at time step t, ∈ θ is used to represent sample prediction noise, ∈ is used to represent noise data samples, and x is used to represent image data samples.

[0118] Alternatively, the computer device may perform noise removal processing on the sample prediction feature to obtain a sample denoising feature; perform decoding processing on the sample denoising feature to obtain a sample prediction image; the computer device may decode the sample prediction feature through a decoding network of the initial image generation model to obtain a sample prediction image. Based on the difference data between the sample prediction image and the image data sample, a loss function is constructed, such as Figure 5b The loss function shown in . For example, the loss function can be shown in formula ②:

[0119]

[0120] As shown in formula ②, D represents the collection of image data samples used to train the model, x is used to represent image data sample x in the collection of image data samples, and Y x Used to represent the sample prediction image corresponding to the image data sample x.

[0121] In the t-th denoising process, the t-th regular sample feature and the t-th control sample feature in the t-th sample prediction feature are obtained, and the t-th sample prediction noise is determined based on the t-th regular sample feature and the t-th control sample feature; t is a positive integer less than or equal to T; and T is the total number of iterations of the denoising process. Further, if t is 1, the media data sample is obtained, and the media data sample and the t-th sample prediction noise are feature fused to obtain the t+1-th sample denoising feature. Specifically, the media sample feature corresponding to the media data sample is obtained, and the media sample feature and the t-th sample prediction noise are feature fused to obtain the t+1-th sample denoising feature; if t is a positive integer greater than 1 and less than T, the t-th sample denoising feature is obtained, and the t-th sample denoising feature and the t-th sample prediction noise are feature fused to obtain the t+1-th sample denoising feature; if t is T, the process of generating a loss function through the sample prediction feature and the media data sample is executed.

[0122] Furthermore, the computer device can adjust the initial stitching parameters based on the loss function until the feature stitching parameters are obtained when the parameters converge. At this time, the parameters in the initial image generation model except the initial stitching parameters can be considered as trained model parameters, that is, hyperparameters. Hyperparameters refer to parameters that are directly obtained without training. In this application, they refer to parameters that are obtained without training in this application, such as parameters used in sampling processing and parameters used in encoding and decoding processing, etc., which are hyperparameters in this application. Alternatively, if the initial image generation model is the first image generation model, the initial stitching parameters are adjusted based on the loss function until the feature stitching parameters are obtained when the parameters converge; if the initial image generation model is not the first image generation model, the original parameters and the initial stitching parameters in the initial image generation model are adjusted based on the loss function until the feature stitching parameters and model parameters are obtained when the parameters converge; the original parameters are the parameters included in the initial image generation model, such as the parameters used in the sampling process and the parameters used in the encoding and decoding processes, etc., the model parameters are the parameters after the original parameters converge, and the feature stitching parameters are the parameters after the initial stitching parameters converge.

[0123] Specific as Figure 5a or Figure 5b As shown, the computer device can encode the image data sample through the encoding network to obtain the sample encoding feature, and perform feature fusion on the sample encoding feature and the noise data sample to obtain the media sample feature. Further, the image denoising network 501 can perform diffusion processing on the media sample feature to obtain the sample diffusion data Z T ; The sample diffusion data is sampled and processed by the denoising module 502 to obtain the sample prediction feature 507, namely Z′ T , wherein the denoising module 502 may include multiple sampling blocks 504, and the sample guide data may participate in the feature processing process of the denoising module 502 through the network connection 503. The up-sampling block in the denoising module 502 corresponds to the initial splicing parameter 506, and the sample diffusion data may be denoised by the denoising module 502 to obtain a sample prediction feature 507, and the sample prediction feature may be denoised to obtain a sample denoised feature; further, the sample prediction feature 507 may be denoised T-1 times by the denoising module 502 to obtain a sample prediction feature 508, i.e., Z', specifically, the sample denoised feature corresponding to the sample prediction feature 507 may be denoised. Further, as Figure 5b As shown, the computer device can perform noise removal processing on the sample prediction feature 508 to obtain a sample denoising feature, and decode the sample denoising feature through a decoding network to obtain a sample prediction image.

[0124] For details, see Figure 6 , Figure 6 This is a schematic diagram of a specific process of image generation provided by an embodiment of the present application. Figure 6 As shown, the image generation process includes the following steps:

[0125] Step S601, obtaining an initial image generation model.

[0126] In an embodiment of the present application, the computer device may obtain an initial image generation model, generate initial stitching parameters, and insert the initial stitching parameters into the initial image generation model.

[0127] Specifically, when generating the initial stitching parameters, the computer device can randomly generate a first initial parameter and a second initial parameter. The first initial parameter is used to perform weighted processing on the downsampled sample features and can be denoted as a1. The second initial parameter is used to perform weighted processing on the upsampled sample features and can be denoted as a2. The first initial parameter and the second initial parameter are determined as the initial stitching parameters, that is, (a1, a2). Among them, the initial image generation model includes M upsampling blocks, and there are P upsampling blocks among the M upsampling blocks to introduce the initial stitching parameters. Then, the sampling dimensions corresponding to the P upsampling blocks can be obtained. Based on the sampling dimensions corresponding to the P upsampling blocks, the initial stitching parameters are generated for the P upsampling blocks. That is to say, it is equivalent to obtaining P initial stitching parameters as the initial values ​​of the stitching parameters in the initial image generation model.

[0128] Step S602: Acquire media data samples and sample guide data.

[0129] In the embodiments of this application, please refer to Figure 4 The relevant description in step S401 will not be repeated here.

[0130] Step S603: In the j-th down-sampling block of the initial image generation model, the sample guidance data is used to perform down-sampling processing on the j-1-th down-sampled sample feature to obtain the j-th down-sampled sample feature.

[0131] In an embodiment of the present application, a computer device may use sample guidance data to downsample the j-1th downsampled sample feature in the j-th downsampled block of the initial image generation model to obtain the j-th downsampled sample feature, where j is a positive integer less than or equal to M. Specifically, when j is 1, the j-1th downsampled sample feature may be considered as a media sample feature, and the media sample feature may be downsampled using sample guidance data in the j-th downsampled block of the initial image generation model to obtain the j-th downsampled sample feature; when j is greater than 1 and less than or equal to M, the j-1th downsampled sample feature may be downsampled using sample guidance data in the j-th downsampled block of the initial image generation model to obtain the j-th downsampled sample feature. Specifically, this process can be found in Figure 4 The relevant description in step S402 will not be repeated here.

[0132] Step S604, detecting whether the downsampling process is completed.

[0133] In an embodiment of the present application, the computer device can detect whether the downsampling process is completed, that is, whether j is M. If the downsampling process is completed, step S605 is executed; if the downsampling process is not completed, j++ is executed, step S603 is executed, and the next downsampling block is run.

[0134] Step S605: In the intermediate sampling block of the initial image generation model, perform intermediate sampling processing on the Mth down-sampled sample feature to obtain the intermediate sample feature.

[0135] In an embodiment of the present application, the computer device may perform intermediate sampling processing on the Mth down-sampled sample feature in the intermediate sampling block of the initial image generation model to obtain the intermediate sample feature.

[0136] Step S606: In the i-th upsampling block of the initial image generation model, the i-1-th sample prediction feature is upsampled using the sample guidance data to obtain the i-th upsampled sample feature, and the i-th initial splicing parameter in the i-th upsampling block is used to weighted splice the M-i+1-th downsampled sample feature and the i-th upsampled sample feature to obtain the i-th sample prediction feature.

[0137] In an embodiment of the present application, when i is 1, the i-1th sample prediction feature can be considered as an intermediate sample feature, and the sample guidance data can be used in the i-th upsampling block of the initial image generation model to perform upsampling processing on the intermediate sample feature to obtain the first upsampling sample feature, and the first initial splicing parameter in the first upsampling block is used to weighted splice the M-th downsampling sample feature and the first upsampling sample feature to obtain the first sample prediction feature. When i is greater than 1 and less than or equal to M, the sample guidance data can be used in the i-th upsampling block of the initial image generation model to perform upsampling processing on the i-1th sample prediction feature to obtain the i-th upsampling sample feature, and the i-th initial splicing parameter in the i-th upsampling block is used to weighted splice the M-i+1th downsampling sample feature and the i-th upsampling sample feature to obtain the i-th sample prediction feature. For details, please refer to Figure 4 The relevant description of step S403 is not repeated here.

[0138] For example, see Figure 7 , Figure 7 Schematic diagram of a feature splicing scene provided in an embodiment of the present application. Figure 7 As shown, the computer device can use the initial splicing parameter 702 to perform weighted splicing 700 on the up-sampled sample features and the down-sampled sample features to obtain the sample prediction features 703. Figure 7 As shown, the i-th initial splicing parameter 702 may include the i-th first initial parameter 702a (which can be denoted as a1) and the i-th second initial parameter 702b (which can be denoted as a2). The i-th first initial parameter 702a can be used to perform weighted processing 700 on the M-i+1-th down-sampled sample feature 701a (which can be denoted as f1) to obtain the i-th down-sampled weighted feature 703a; the i-th second initial parameter 702b is used to perform weighted processing 700 on the i-th up-sampled sample feature 701b (which can be denoted as f2) to obtain the i-th up-sampled weighted feature 703b; the i-th down-sampled weighted feature 703a is feature spliced ​​with the i-th up-sampled weighted feature 703b to obtain the i-th sample prediction feature 703, as denoted as [f1*a1, f2*a2].

[0139] like Figure 5a or Figure 5b As shown in , assuming that there are two upsampling blocks, the initial splicing parameters 506 include the first initial parameters 50a and the second initial parameters 50b of one upsampling block, and the first initial parameters 51a and the second initial parameters 51b of the other upsampling block. The initial splicing parameters 506 can be used to perform feature splicing on the downsampled sample features and the generated features of the upsampling block.

[0140] Step S607, detecting whether the upsampling process is completed.

[0141] In an embodiment of the present application, the computer device can detect whether the upsampling process is completed, that is, whether i is M. If the upsampling process is completed, step S608 is executed; if the upsampling process is not completed, i++ is executed, step S606 is executed, and the next upsampling block is run.

[0142] Step S608: In the initial image generation model, the Mth sample prediction feature is decoded to obtain sample image data.

[0143] In the embodiment of the present application, the computer device can decode the Mth sample prediction feature through the decoding network of the initial image generation model to obtain sample image data. Optionally, this step is an optional step. When the loss function is generated based on the noise data sample, this step may not be performed. Figure 5a The loss function shown in ; when generating a loss function based on image data samples, perform this step, such as Figure 5b The loss function shown in , so that when the loss function is generated based on the noise data sample, image decoding is not required, thereby improving the efficiency of data processing.

[0144] Step S609, generating a loss function.

[0145] In the embodiment of the present application, the computer device can generate a loss function through the sample prediction feature and the media data sample. The process can be seen in Figure 4 The relevant description in step S404 will not be repeated here.

[0146] Step S610, detecting whether the parameters have converged.

[0147] In the embodiment of the present application, it is possible to detect whether the parameters in the initial image generation model have converged. The convergence judgment condition is the model convergence condition of the model training, which is not described in detail here. If the parameters of the initial image generation model have converged, step S612 is executed; if the parameters of the initial image generation model have not converged, step S611 is executed.

[0148] Step S611, adjusting the initial splicing parameters based on the loss function to obtain new initial splicing parameters.

[0149] In the embodiment of the present application, the computer device adjusts the initial splicing parameters based on the loss function to obtain new initial splicing parameters. Further, i and j may be initialized, and the process returns to step S603 for the new initial splicing parameters.

[0150] Step S612: determining the initial stitching parameters as feature stitching parameters.

[0151] In an embodiment of the present application, the computer device may determine the initial image generation model including the feature splicing parameters as the target image generation model. The feature splicing parameters include P upsampling blocks that introduce the initial feature splicing parameters, and the corresponding first splicing parameters (which may be recorded as a1) and second splicing parameters (which may be recorded as a2) respectively. The first splicing parameter refers to the parameter obtained by adjusting the first initial parameter, and the second splicing parameter refers to the parameter obtained by adjusting the second initial parameter.

[0152] In an embodiment of the present application, media data samples and sample guide data can be obtained; in an initial image generation model, the sample guide data is used to perform downsampling processing on the media data samples to obtain downsampled sample features; the downsampling processing is used to reduce dimension and extract features; in the initial image generation model, the sample guide data is used to perform upsampling processing on the downsampled sample features to obtain upsampled sample features, and the initial splicing parameters are used to weighted splice the downsampled sample features and the upsampled sample features to obtain sample prediction features; the upsampling processing is used to increase dimension and restore the image; a loss function is generated by the sample prediction features and the media data samples, and the initial splicing parameters are adjusted based on the loss function until the feature splicing parameters when the parameters converge are obtained, and the initial image generation model including the feature splicing parameters is determined as the target image generation model; the target image generation model is used to generate image data according to the image guide data. By introducing the splicing parameters in the image generation model, the splicing parameter changes of the up and down sampling features become hyperparameter vectors, so that the generation features in the image generation model can be adjusted in more detail, improving the accuracy of image generation and the quality of the generated image. Moreover, by optimizing the loss of the model, converged feature splicing parameters are obtained, so that the model quality and performance of the final target image generation model can be further improved, thereby improving the accuracy of image generation. In addition, in this application, only the splicing parameters need to be optimized and adjusted, so that the number of model training is very small, so that when adjusting the function of the image generation model, only a small amount of data needs to be processed, thereby improving the flexibility of model training and model quality.

[0153] The computer device can perform T times of denoising on the media data samples, which can be seen in Figure 8 , Figure 8 is a schematic diagram of a T-time denoising process provided by an embodiment of the present application. Figure 8 As shown, the method may include the following steps:

[0154] Step S801, obtaining an initial image generation model.

[0155] In the embodiments of this application, please refer to Figure 4 Step S401 and Figure 6The relevant description in step S601 will not be repeated here.

[0156] Step S802: Acquire media data samples and sample guide data.

[0157] In the embodiments of this application, please refer to Figure 4 Step S401 and Figure 6 The relevant description in step S602 will not be repeated here.

[0158] Step S803: perform diffusion processing on the media data sample to obtain sample diffusion data.

[0159] In the embodiment of the present application, the computer device may perform diffusion processing on the media data sample to obtain sample diffusion data. Specifically, the media sample feature corresponding to the media data sample is subjected to noise processing at T time steps, that is, T noise processing is performed to obtain sample diffusion data Z. T .

[0160] Step S804, in the t-th denoising process, sampling is performed on the t-th sample denoising feature to obtain the t-th sample prediction feature.

[0161] In the embodiment of the present application, the computer device may perform sampling processing on the t-th sample denoising feature in the t-th denoising process to obtain the t-th sample prediction feature, where t is a positive integer less than or equal to T. Specifically, if t is 1, the sample diffusion data is sampled to obtain the t-th sample prediction feature. The process can be referred to Figure 4 Steps S402 to S403, and Figure 6 The process of obtaining the sample prediction feature in step S603 to step S606 in the above is not described in detail here; if t is a positive integer greater than 1 and less than or equal to T, the t-th sample denoising feature is sampled to obtain the t-th sample prediction feature. The process can be referred to Figure 4 Steps S402 to S403, and Figure 6 The process of obtaining the sample prediction features in step S603 to step S606 in the above will not be described in detail here. The t-th sample prediction feature can be denoted as Z t t, which can be considered as the sample prediction feature output by the Mth upsampling block in the tth denoising process, can be recorded as [pred_uncond t , pred_text t ].

[0162] Step S805: In the t-th denoising process, denoising prediction is performed on the t-th sample prediction feature to obtain the t+1-th sample denoising feature.

[0163] In the embodiment of the present application, in the tth denoising process, the computer device can perform denoising prediction on the tth sample prediction feature to obtain the t+1th sample denoising feature. Specifically, the tth sample prediction feature can be denoised and predicted to obtain the tth sample prediction noise, which can be recorded as noise_pred t =pred_uncond t +guidance_scale*(pred_text t -pred_uncond t ). The t-th sample denoising feature and the t-th sample prediction noise can be feature fused to obtain the t+1-th sample denoising feature, where when t is 1, the t-th sample denoising feature is the media sample feature. This process can be referred to Figure 4 The relevant description in step S404 will not be repeated here.

[0164] Step S806, detecting whether the denoising process is completed.

[0165] In an embodiment of the present application, the computer device can detect whether the denoising process is completed. If the denoising process is completed, that is, t is T, step S807 is executed; if the denoising process is not completed, that is, t is not T, t is updated, that is, t++, and return to execute step S804 to perform the next denoising process.

[0166] Step S807, decoding the t+1 sample denoising features to obtain a sample prediction image.

[0167] In an embodiment of the present application, the computer device can decode the t+1 sample denoising features to obtain a sample prediction image.

[0168] In an embodiment of the present application, by performing T times of denoising and denoising processing, a latent space representation of the image, namely, a sample denoising feature, is obtained, and the sample denoising feature is decoded (decoder) to obtain a final sample prediction image, which can then be used to adjust the parameters of the initial image generation model to improve the accuracy of the image generation model.

[0169] For further information, see Fig. 9 , Fig. 9 FIG. 1 is a flow chart of another method for generating an image provided by an embodiment of the present application. Fig. 9 As shown, the image generation process includes the following steps:

[0170] Step S901, obtaining initial media data and image guide data.

[0171] In an embodiment of the present application, a computer device may obtain a random seed, generate random noise data according to the random seed, determine the random noise data as initial media data, and obtain image guidance data. Alternatively, a random seed may be obtained, random noise data may be generated according to the random seed, input image data may be obtained, the random noise data may be fused with the input image data to obtain initial media data, and image guidance data may be obtained. Of course, in order to reduce the influence of the original image on the image generated by the model, the random noise data is generally determined as the initial media data, that is, the input is set to 0, and at this time, the encoding network may not be used. For example, see Fig.10 , Fig.10 is a schematic diagram of a model architecture provided in an embodiment of the present application, such as Fig.10 As shown, the computer device can encode the input image data through the encoding network to obtain the media data features. Here, the input image data is set to 0, that is, the random noise data can be directly determined as the initial media data. The image guidance data is used to indicate the features of the generated image, that is, to guide the features required for the final generated image. For example, if the image guidance data is "a cat lying on the floor", the final generated image (i.e., the target image data) includes a cat lying on the floor.

[0172] Optionally, the computer device may obtain the third business processing task corresponding to the image guidance data, and search for the second image generation model corresponding to the third business processing task. If the second image generation model is found, the second image generation model is determined as the target image generation model; if the second image generation model is not found, the fourth business processing task including the third business processing task is obtained, and the third image generation model corresponding to the fourth business processing task is determined as the target image generation model. Wherein, when the fourth business processing task includes the third business processing task, the image generation model corresponding to the fourth business processing task can be considered as the upstream model of the image generation model corresponding to the third business processing task.

[0173] Step S902: In the target image generation model, the image-guided data is used to downsample the initial media data to obtain downsampled semantic features.

[0174] In the embodiment of the present application, the downsampling process is used to reduce the dimension and extract features. The parameters used in the downsampling process are hyperparameters. Specifically, the computer device can use the image guidance data to downsample the initial media data in the downsampling network of the target image generation model to obtain downsampled semantic features. This process can be seen in Figure 4 The relevant description of the process of obtaining the down-sampled sample features in step S402 will not be repeated here.

[0175] Step S903, in the target image generation model, the downsampled semantic features are upsampled using the image guidance data to obtain upsampled semantic features, and the downsampled semantic features and the upsampled semantic features are weightedly spliced ​​using feature splicing parameters to obtain image prediction features.

[0176] In the embodiment of the present application, the upsampling process is used to increase the dimension and restore the image. The parameters used in the upsampling process are hyperparameters, and the feature splicing parameters are parameters obtained by training the loss function. The process can be seen in Figure 4 The description of the process of obtaining the sample prediction features in step S403 will not be repeated here.

[0177] Step S904: De-noising and decoding the image prediction features are performed through the target image generation model to obtain target image data.

[0178] In the embodiment of the present application, the target image data has the features indicated by the image guidance data. Specifically, the image prediction features can be denoised and decoded by the decoding network of the target image generation model to obtain the target image data. The process can be referred to in Figure 4 The process of generating the sample prediction image in step S404. The image prediction features include the conventional data features and the control data features, and a guide scale can be obtained. The guide scale is used to perform weighted processing on the difference between the control data features and the conventional data features to obtain the control data features, and the sum of the control data features and the conventional data features is determined as the image prediction noise; the image prediction noise is subjected to noise removal processing to obtain a denoising feature, and the denoising feature is decoded to obtain the target image data.

[0179] Specifically, Fig.10 As shown, in the image denoising network 1001, the media data feature Z can be subjected to diffusion processing to obtain the diffusion data Z T, the media data feature is a feature obtained by extracting features from the initial media data; the diffusion data is sampled and processed by the denoising module 1002 to obtain a denoised feature 1007, wherein the denoising module 1002 may include multiple sampling blocks 1004, and the image guidance data may participate in the feature processing process of the denoising module 1002 through the network connection 1003. Among them, the upsampling block in the denoising module 1002 corresponds to the feature splicing parameter 1006, and the diffusion data can be denoised by the denoising module 1002 to obtain a denoised feature 1007; further, the denoising feature 1007 is denoised T-1 times by the denoising module 1002 to obtain a denoised feature 1008. Further, the denoised feature 1008 can be decoded by a decoding network to obtain the target image data. Among them, the computer device can use the feature splicing parameter 1006 to perform feature splicing on the generated features of the downsampling block and the generated features of the upsampling block to obtain image prediction features, such as Fig.10 As shown in the figure, there are two upsampling blocks. The first initial parameter 200a and the second initial parameter 200b can be used to weightedly concatenate the first upsampling semantic feature and the second downsampling semantic feature to obtain the first image prediction feature; the first initial parameter 100a and the second initial parameter 100b can be used to weightedly concatenate the second upsampling semantic feature and the first downsampling semantic feature to obtain the second image prediction feature.

[0180] Optionally, the computer device may perform T denoising processes on the initial media data to obtain image prediction features. Specifically, Fig.10 As shown, the computer device can diffuse the data Z T Perform denoising to obtain denoising feature 1007, which can be denoted as Z T ', perform (T-1) denoising processes on the denoised feature 1007 to obtain the denoised feature 1008, which can be recorded as Z'. The process of each denoising process can be seen in Fig. 9 In the related process from step S902 to step S904, when the denoised feature 1008 after T denoising processes is obtained, the denoised feature 1008 is decoded by the target image generation model to obtain the target image data.

[0181] Among them, Fig.10In the image denoising network 1001 shown, the input Z (i.e., media data features) is made into two parts [Ex+noise, Ex+noise], where E represents embedding, x represents initial media data, and noise is a noise map generated by a random seed, i.e., random noise data. Because while training a conditional diffusion model (the condition is the text control provided by the text control end, i.e., image guidance data), an unconditional diffusion model is also trained, so two parts are required as inputs, where the former is recorded as control information (text condition) and the latter is uncontrolled (uncondition); therefore, the predicted Z' also includes these two parts of results [pred_uncond, pred_text], and noise prediction is generated by noise_pred = pred_uncond + guidance_scale * (pred_text-pred_uncond); then the diffusion process samples according to the current pred_text and noise_pred distributions to obtain the final predicted image latent space representation, i.e., denoising features. Wherein, guidance_scale is used to represent the guidance scale. Among them, this process is the implementation method of the image denoising network, and you can refer to the implementation principle of the initial image generation model, which will not be repeated here.

[0182] For example, see Fig.11 , Fig.11 Schematic diagram of a feature splicing processing scenario provided by an embodiment of the present application. Fig.11As shown, the image denoising network 1100 may include a downsampling network 1101, an intermediate sampling network 1102, and an upsampling network 1103. The computer device may use a feature concatenation feature 1104 to concatenate the generated features of the downsampling network 1101 and the upsampling network 1103. Specifically, assuming that M is 3, the media data features are downsampled by the downsampling network 1101 to obtain a downsampled semantic feature 101a; the downsampled semantic feature 101a is downsampled to obtain a downsampled semantic feature 101b; the downsampled semantic feature 101b is downsampled to obtain a downsampled semantic feature 101c. The downsampled semantic feature 101c is intermediately processed by the intermediate sampling network 1102 to obtain intermediate semantic features 102a, intermediate semantic features 102b, and intermediate semantic features 102c in sequence. In the upsampling network 1103, the intermediate semantic feature 102c is upsampled to obtain an upsampled semantic feature 103c, and the downsampled semantic feature 101c and the upsampled semantic feature 103c are weightedly concatenated using the first initial parameter 131c and the second initial parameter 132c to obtain an image prediction feature c; the image prediction feature c is upsampled to obtain an upsampled semantic feature 103b, and the downsampled semantic feature 101b and the upsampled semantic feature 103b are weightedly concatenated using the first initial parameter 121b and the second initial parameter 122b to obtain an image prediction feature b; the image prediction feature b is upsampled to obtain an upsampled semantic feature 103a, and the downsampled semantic feature 101a and the upsampled semantic feature 103a are weightedly concatenated using the first initial parameter 111a and the second initial parameter 112a to obtain an image prediction feature a. Further, the image prediction feature a can be decoded to obtain the target image data.

[0183] Optionally, the sampling blocks included in the downsampling network and the upsampling network in the target image generation model may include sampling blocks that perform feature transfer between the upsampling network and the downsampling network, and may also include sampling blocks that do not perform feature transfer. Fig.12 , Fig.12 Schematic diagram of a model hierarchy structure provided in the embodiment of the present application. Fig.12As shown, it is assumed that the downsampling network includes three downsampling blocks (such as CrossAttnDownBlock2D) and an intermediate downsampling block (such as DownBlock2D), and the upsampling network includes three upsampling blocks (such as CrossAttnUpBlock2D) and an intermediate upsampling block (such as UpBlock2D). Specifically, assuming that the initial media data is obtained, the feature conversion is performed on the initial media data to obtain the media data feature. Assuming that the dimension of the initial media data is 64*64*4, the dimension of the obtained media data feature is 64*64*320. In the downsampling block 1, the image-guided data can be used to downsample the media data feature to obtain the downsampled semantic feature 1, and the downsampled semantic feature 1 is passed to the upsampling block 3. Assuming that the dimension of the downsampled semantic feature 1 is 32*32*640; in the downsampling block 2, the image-guided data is used to downsample the downsampled semantic feature 1 to obtain the downsampled semantic feature 2, and the downsampled semantic feature 2 is passed to the upsampling block 2. Assuming that the dimension of the downsampled semantic feature 2 is 16*16*1280; in the downsampling block 3, the image-guided data is used to downsample the downsampled semantic feature 2 to obtain the downsampled semantic feature 3, and the downsampled semantic feature 3 is passed to the upsampling block 1. Assuming that the dimension of the downsampled semantic feature 3 is 8*8*1280. Further, the downsampled semantic feature 3 is transformed by the intermediate downsampled block to obtain the intermediate downsampled feature, the dimension of which is 8*8*1280; the intermediate downsampled feature is sampled by the intermediate sampling block (MidBlock2DCrossAttn) using the image guidance data to obtain the intermediate sampling feature; the intermediate sampling feature is transformed by the intermediate upsampled block to obtain the intermediate upsampled feature. Among them, the intermediate downsampled block and the intermediate upsampled block can be considered as sampling blocks that do not perform dimensionality change processing, and can include one or more convolutional layers, which are not limited here.

[0184] Further, in upsampling block 1, image guidance data can be used to upsample the intermediate upsampled features to obtain upsampled semantic feature 1. At this time, the dimension of the upsampled semantic feature 1 is 8*8*1280. The feature splicing parameter 1 corresponding to upsampling block 1 is used to weighted splice the downsampled semantic feature 3 and the upsampled semantic feature 1 to obtain image prediction feature 1. At this time, the dimension of the image prediction feature 1 is 16*16*1280, and the dimension of the first splicing parameter and the second splicing parameter in the feature splicing parameter 1 is 1*1280; in upsampling block 2, image guidance data can be used to upsample the image prediction feature 1 to obtain upsampled semantic feature 2. At this time, the dimension of the upsampled semantic feature 2 is 16*16*1280. The feature splicing parameter corresponding to upsampling block 2 is used. 2 weighted splicing of downsampled semantic feature 2 and upsampled semantic feature 2 is performed to obtain image prediction feature 2. At this time, the dimension of image prediction feature 2 is 32*32*640, and the dimension of the first splicing parameter and the second splicing parameter in the feature splicing parameter 2 is 1*640; in upsampled block 3, image prediction feature 2 is upsampled by image guidance data to obtain upsampled semantic feature 3. At this time, the dimension of upsampled semantic feature 3 is 64*64*320. The feature splicing parameter 3 corresponding to upsampled block 3 is used to weighted splice downsampled semantic feature 1 and upsampled semantic feature 3 to obtain image prediction feature 3. At this time, the dimension of image prediction feature 3 is 64*64*320, and the dimension of the first splicing parameter and the second splicing parameter in the feature splicing parameter 3 is 1*320. Image prediction feature 3 can be decoded to obtain target image data.

[0185] For further information, see Fig.13 , Fig.13 Schematic diagram of data processing for an image generation scenario provided in an embodiment of the present application. Fig.13 As shown, the process may include the following steps:

[0186] Step S1, obtaining initial media data and image guide data.

[0187] In the embodiments of this application, please refer to Figure 8 The relevant description in step S801 will not be repeated here.

[0188] Step S2, loading the image generation model, and generating target image data through the image generation model.

[0189] In the embodiment of the present application, this step can be divided into: S21, loading the image generation model according to the image guidance data; S22, generating the target image data through the image generation model. Fig. 9 The relevant descriptions of each step in the above will not be repeated here.

[0190] Step S3, outputting target image data.

[0191] In the embodiment of the present application, at this time, the target image data has the features indicated by the image guidance data.

[0192] For details, see Fig.14 , Fig.14 FIG. 1 is a schematic diagram of another specific process of image generation provided by an embodiment of the present application. Fig.14 As shown, the process may include the following steps:

[0193] Step S1401, obtaining initial media data and image guide data.

[0194] In the embodiment of the present application, this process can be referred to Fig. 9 The relevant description in step S901 will not be repeated here.

[0195] Step S1402: In the j-th down-sampling block of the target image generation model, the image guidance data is used to down-sample the j-1-th down-sampled semantic feature to obtain the j-th down-sampled semantic feature.

[0196] In the embodiment of the present application, when j is 1, the computer device may use the image guidance data to downsample the initial media data in the first downsampling block of the target image generation model to obtain the first downsampled semantic feature. When j is a positive integer greater than 1 and less than or equal to M, the computer device may use the image guidance data to downsample the j-1th downsampled semantic feature in the jth downsampling block of the target image generation model to obtain the jth downsampled semantic feature. The process can be referred to in Fig. 9 The relevant description in step S902 will not be repeated here.

[0197] Step S1403, detecting whether the downsampling process is completed.

[0198] In an embodiment of the present application, the computer device can detect whether the downsampling process is completed, that is, whether j is M. If the downsampling process is completed, step S1404 is executed; if the downsampling process is not completed, j++ is executed, step S1402 is executed, and the next downsampling block is run.

[0199] Step S1404: In the intermediate sampling block of the target image generation model, an intermediate sampling process is performed on the Mth down-sampled semantic feature to obtain an intermediate semantic feature.

[0200] Step S1405: In the i-th upsampling block of the target image generation model, the i-1-th image prediction feature is upsampled using the image guidance data to obtain the i-th upsampled semantic feature, and the i-th feature splicing parameter in the i-th upsampling block is used to weighted splice the M-i+1-th downsampled semantic feature and the i-th upsampled semantic feature to obtain the i-th image prediction feature.

[0201] In an embodiment of the present application, when i is 1, in the first upsampling block of the target image generation model, the image guidance data is used to upsample the intermediate semantic features to obtain the first upsampled semantic feature. The first feature splicing parameter of the first upsampling block is used to weighted splice the Mth downsampled semantic feature and the first upsampled semantic feature to obtain the first image prediction feature. When i is a positive integer greater than 1 and less than or equal to M, in the i-th upsampling block of the target image generation model, the image guidance data is used to upsample the i-1th image prediction feature to obtain the i-th upsampled semantic feature, and the i-th feature splicing parameter in the i-th upsampling block is used to weighted splice the M-i+1th downsampled semantic feature and the i-th upsampled semantic feature to obtain the i-th image prediction feature. This process can be referred to. Fig. 9 The relevant description in step S903 will not be repeated here.

[0202] Step S1406, detecting whether the upsampling process is completed.

[0203] In an embodiment of the present application, the computer device can detect whether the upsampling process is completed, that is, whether i is M. If the upsampling process is completed, step S1407 is executed; if the upsampling process is not completed, i++ is executed, step S1405 is executed, and the next upsampling block is run.

[0204] Step S1407, in the target image generation model, denoising and decoding are performed on the Mth image prediction feature to obtain target image data.

[0205] In the embodiment of the present application, the computer device can decode the Mth image prediction feature through the decoding network of the target image generation model to obtain the target image data. The process can be seen in Fig. 9 The relevant description in step S904 will not be repeated here.

[0206] For further information, see Fig.15 , Fig.15Schematic diagram of an image generation device provided in an embodiment of the present application. The image generation device may be a computer program running in a computer device, for example, the image generation device may be an application software; the device may be used to execute the corresponding steps in the method provided in an embodiment of the present application. Fig.15 As shown, the image generating device 1500 can be used for Figure 4 The computer device in the corresponding embodiment may specifically include: a sample acquisition module 11 , a sample down-sampling module 12 , a sample up-sampling module 13 and a parameter adjustment module 14 .

[0207] The sample acquisition module 11 is used to acquire media data samples and sample guide data;

[0208] The sample downsampling module 12 is used to perform downsampling processing on the media data sample using the sample guidance data in the initial image generation model to obtain downsampled sample features; the downsampling processing is used to perform dimensionality reduction and feature extraction;

[0209] The sample upsampling module 13 is used to perform upsampling processing on the downsampled sample features using the sample guide data in the initial image generation model to obtain the upsampled sample features, and perform weighted splicing on the downsampled sample features and the upsampled sample features using the initial splicing parameters to obtain the sample prediction features; the upsampling processing is used to increase the dimension and restore the image;

[0210] The parameter adjustment module 14 is used to generate a loss function through sample prediction features and media data samples, adjust the initial splicing parameters based on the loss function until the feature splicing parameters are obtained when the parameters converge, and determine the initial image generation model including the feature splicing parameters as the target image generation model; the target image generation model is used to generate image data according to the image guidance data.

[0211] The sample acquisition module 11 may be used for:

[0212] Acquire a first business processing task, and acquire a second business processing task corresponding to the first business processing task; the second business processing task includes the first business processing task;

[0213] Acquire a first image generation model corresponding to the second business processing task, determine the first image generation model as an initial image generation model for the first business processing task, and acquire a model training set corresponding to the first business processing task and the initial image generation model; the initial image generation model is a model that has been trained;

[0214] A media data sample having the characteristics indicated by the first business processing task is obtained from the model training set, and sample guidance data is generated according to the first business processing task.

[0215] The device 1500 further includes:

[0216] The model determination module 15 is used to determine the basic model of the model architecture corresponding to the first business processing task as the initial image generation model if the first image generation model corresponding to the second business processing task is not obtained, and insert the initial splicing parameters into the initial image generation model;

[0217] The model determination module 15 is further configured to, if the first image generation model corresponding to the second business processing task is acquired, execute a process of determining the first image generation model as an initial image generation model for the first business processing task.

[0218] When the initial splicing parameters are adjusted based on the loss function until the characteristic splicing parameters are obtained when the parameters converge, the parameter adjustment module 14 can be used to:

[0219] If the initial image generation model is the first image generation model, the initial splicing parameters are adjusted based on the loss function until the characteristic splicing parameters are obtained when the parameters converge;

[0220] If the initial image generation model is not the first image generation model, the original parameters and initial splicing parameters in the initial image generation model are adjusted based on the loss function until the feature splicing parameters and model parameters are obtained when the parameters converge; the original parameters are the parameters included in the initial image generation model, the model parameters are the parameters after the original parameters converge, and the feature splicing parameters are the parameters after the initial splicing parameters converge.

[0221] Wherein, the media data samples include image data samples and noise data samples;

[0222] The sample acquisition module 11 can be used for:

[0223] Obtaining an image data sample and a sample size of the image data sample, generating random pixel values ​​based on the sample size, and composing the random pixel values ​​into a noise data sample; the number of random pixel values ​​is obtained from the sample size;

[0224] Perform screen analysis on the image data samples to obtain sample guidance data.

[0225] The media data sample includes a noise data sample; when generating a loss function through the sample prediction feature and the media data sample, the parameter adjustment module 14 can be used to:

[0226] Obtaining conventional sample features and control sample features in sample prediction features, and obtaining the guidance scale of sample guidance data; conventional sample features are used to represent features obtained by sampling and processing media data samples; control sample features are used to represent features obtained by sampling and processing media data samples using sample guidance data;

[0227] The difference between the control sample feature and the regular sample feature is weighted by using the guided scale to obtain the control semantic feature, and the sum of the control semantic feature and the regular sample feature is determined as the sample prediction noise;

[0228] Construct a loss function based on the difference data between the sample prediction noise and the noise data sample.

[0229] The media data samples include image data samples; the image data samples refer to images having the features indicated by the sample guide data;

[0230] When generating a loss function through sample prediction features and media data samples, the parameter adjustment module 14 can be used to:

[0231] Perform noise removal on the sample prediction features to obtain sample denoising features;

[0232] Decode the sample denoising features to obtain a sample prediction image;

[0233] A loss function is constructed based on the difference data between the sample prediction image and the image data sample.

[0234] The device 1500 further includes:

[0235] The sample prediction module 16 is used to obtain the t-th regular sample feature and the t-th control sample feature in the t-th sample prediction feature in the t-th denoising process, and determine the t-th sample prediction noise based on the t-th regular sample feature and the t-th control sample feature; t is a positive integer less than or equal to T; T is the total number of iterations of the denoising process;

[0236] The sample prediction module 16 is further configured to obtain a media data sample if t is 1, perform feature fusion on the media data sample and the t-th sample prediction noise, and obtain a t+1-th sample denoising feature;

[0237] The sample prediction module 16 is further configured to obtain the t-th sample denoising feature if t is a positive integer greater than 1 and less than T, and perform feature fusion on the t-th sample denoising feature and the t-th sample prediction noise to obtain the t+1-th sample denoising feature;

[0238] The sample prediction module 16 is further configured to, if t is T, execute a process of generating a loss function through sample prediction features and media data samples.

[0239] The device 1500 further includes:

[0240] The parameter generation module 17 is used to obtain the sampling dimension of the up-sampling block included in the initial image generation model, and initialize the first initial parameter using a random Gaussian distribution and the second initial parameter using a random Gaussian distribution; the first initial parameter is used to perform weighted processing on the down-sampled sample features, and the second initial parameter is used to perform weighted processing on the up-sampled sample features; the parameter dimensions of the first initial parameter and the second initial parameter are obtained according to the sampling dimension

[0241] The parameter generating module 17 is further configured to determine the first initial parameter and the second initial parameter as initial splicing parameters.

[0242] An embodiment of the present application provides an image generation device, which can obtain media data samples and sample guidance data; in an initial image generation model, the sample guidance data is used to downsample the media data samples to obtain downsampled sample features; the downsampling process is used to reduce dimension and extract features; in the initial image generation model, the sample guidance data is used to upsample the downsampled sample features to obtain upsampled sample features, and the downsampled sample features and the upsampled sample features are weightedly spliced ​​using initial splicing parameters to obtain sample prediction features; the upsampling process is used to increase dimension and restore the image; the sample prediction features are decoded by the initial image generation model to obtain sample image data, and image evaluation indicators of the sample image data are obtained; a data distribution relationship is constructed by the initial splicing parameters and the image evaluation indicators, and the initial splicing parameters are adjusted by the data distribution relationship to obtain feature splicing parameters, and the initial image generation model including the feature splicing parameters is determined as the target image generation model; the target image generation model is used to generate image data according to the image guidance data. By introducing splicing parameters in the image generation model, the splicing parameter changes of the up and down sampling features become hyperparameter vectors, so that the generation features in the image generation model can be adjusted in more detail, improving the accuracy of image generation and the quality of the generated image. Moreover, by constructing a data distribution relationship, the application effect of the splicing parameters (i.e., image evaluation indicators) is quantitatively evaluated, and the update optimization of the splicing parameters is achieved to obtain the optimized feature splicing parameters, so that the model quality and performance of the final target image generation model can be further improved, thereby improving the accuracy of image generation. In addition, in the present application, only the splicing parameters need to be optimized and adjusted, so that the number of model training is very small, so that when the function of the image generation model is adjusted, only a small amount of data needs to be processed, thereby improving the flexibility of model training and the model quality.

[0243] For further information, see Fig.16 , Fig.16 is a schematic diagram of another image generating device provided in an embodiment of the present application. The image generating device may be a computer program running in a computer device, for example, the image generating device may be an application software; the device may be used to execute the corresponding steps in the method provided in an embodiment of the present application. Fig.16 As shown, the image generating device 1600 can be used for Fig. 9 The computer device in the corresponding embodiment may specifically include: a data acquisition module 21 , a data down-sampling module 22 , a data up-sampling module 23 and a data decoding module 24 .

[0244] A data acquisition module 21 is used to acquire initial media data and image guidance data;

[0245] The data downsampling module 22 is used to perform downsampling processing on the initial media data using the image guidance data in the target image generation model to obtain downsampled semantic features; the downsampling processing is used to perform dimensionality reduction and feature extraction, and the parameters used in the downsampling processing are hyperparameters;

[0246] The data upsampling module 23 is used to perform upsampling processing on the downsampled semantic features using the image guidance data in the target image generation model to obtain the upsampled semantic features, and perform weighted splicing of the downsampled semantic features and the upsampled semantic features using the feature splicing parameters to obtain the image prediction features; the upsampling processing is used to increase the dimension and restore the image, the parameters used in the upsampling processing are hyperparameters, and the feature splicing parameters are parameters obtained by training the loss function;

[0247] The data decoding module 24 is used to perform denoising and decoding processing on the image prediction features through the target image generation model to obtain target image data; the target image data has the features indicated by the image guidance data.

[0248] The device 1600 further includes:

[0249] The model acquisition module 25 is used to acquire the third business processing task corresponding to the image guidance data, and search for the second image generation model corresponding to the third business processing task;

[0250] The model acquisition module 25 is further configured to determine the second image generation model as the target image generation model if the second image generation model is found;

[0251] The model acquisition module 25 is further used to acquire a fourth business processing task including the third business processing task if the second image generation model is not found, and determine the third image generation model corresponding to the fourth business processing task as the target image generation model.

[0252] In an embodiment of the present application, the generation of image data is realized by adopting a target image generation model that introduces trained feature splicing parameters, that is, realizing functions such as text-generated images or image-generated images. In this process, the output features of the same size from the downsampling block are spliced ​​with the features generated by the current network flow (that is, the features generated by the corresponding upsampling block) by adopting feature splicing parameters to obtain image prediction features, and the features from the downsampling block and the features generated by the current network flow are in different positions of the image denoising network, so that different degrees of information can be learned respectively (the shallower the network, the more basic information it learns, and the deeper the network, the more detailed information it learns), and the different degrees of information are spliced ​​to achieve the fusion of different semantic information, thereby improving the semantic information content of the features, achieving more detailed adjustment of the generated features, and then improving the accuracy of image generation and the quality of the generated images.

[0253] See also Fig.17 , Fig.17 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.17 As shown, the computer device in the embodiment of the present application may include: one or more processors 1701, a memory 1702 and an input-output interface 1703. The processor 1701, the memory 1702 and the input-output interface 1703 are connected via a bus 1704. The memory 1702 is used to store a computer program, which includes program instructions, and the input-output interface 1703 is used to receive data and output data, such as for data interaction between a computer device and a business device; the processor 1701 is used to execute the program instructions stored in the memory 1702 to execute the process of the image generation method or device in the above embodiments, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated.

[0254] In some feasible implementations, the processor 1701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0255] The memory 1702 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1701 and the input / output interface 1703. A portion of the memory 1702 may also include a non-volatile random access memory. For example, the memory 1702 may also store information about the device type.

[0256] In a specific implementation, the computer device can execute the following operations through its built-in functional modules: Figure 4 or Fig. 9 For details on the implementation methods provided in each step, please refer to the Figure 4 or Fig. 9 The implementation methods provided in each step will not be repeated here.

[0257] The embodiment of the present application provides a computer device, including: a processor, an input / output interface, and a memory, wherein the processor obtains a computer program in the memory and executes the computer program. Figure 4The various steps of the method shown in are used to perform image generation operations. The embodiment of the present application realizes obtaining media data samples and sample guide data; in the initial image generation model, the media data samples are downsampled using the sample guide data to obtain downsampled sample features; the downsampling process is used to reduce the dimension and extract features; in the initial image generation model, the downsampled sample features are upsampled using the sample guide data to obtain upsampled sample features, and the downsampled sample features and upsampled sample features are weightedly spliced ​​using the initial splicing parameters to obtain sample prediction features; the upsampling process is used to increase the dimension and restore the image; the sample prediction features are decoded by the initial image generation model to obtain sample image data, and image evaluation indicators of the sample image data are obtained; a data distribution relationship is constructed by the initial splicing parameters and the image evaluation indicators, and the initial splicing parameters are adjusted by the data distribution relationship to obtain feature splicing parameters, and the initial image generation model including the feature splicing parameters is determined as the target image generation model; the target image generation model is used to generate image data according to the image guide data. By introducing splicing parameters in the image generation model, the splicing parameter changes of the up and down sampling features become hyperparameter vectors, so that the generation features in the image generation model can be adjusted in more detail, improving the accuracy of image generation and the quality of the generated image. Moreover, by constructing a data distribution relationship, the application effect of the splicing parameters (i.e., image evaluation indicators) is quantitatively evaluated, and the update optimization of the splicing parameters is achieved to obtain the optimized feature splicing parameters, so that the model quality and performance of the final target image generation model can be further improved, thereby improving the accuracy of image generation. In addition, in the present application, only the splicing parameters need to be optimized and adjusted, so that the number of model training is very small, so that when the function of the image generation model is adjusted, only a small amount of data needs to be processed, thereby improving the flexibility of model training and the model quality.

[0258] The present application also provides a computer-readable storage medium storing a computer program suitable for being loaded and executed by the processor. Figure 4 or Fig. 9 The image generation methods provided in each step are detailed in this Figure 4 or Fig. 9 The implementation methods provided in each step are not repeated here. In addition, the description of the beneficial effects of adopting the same method is not repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the computer program can be deployed to execute on one computer device, or on multiple computer devices located in one place, or on multiple computer devices distributed in multiple locations and interconnected by a communication network.

[0259] The computer-readable storage medium may be the image generation device provided by any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0260] The present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 4 or Fig. 9 The method provided in the various optional methods in the invention realizes the introduction of splicing parameters in the image generation model, so that the splicing parameter changes of the up and down sampling features become hyperparameter vectors, so that the generation features in the image generation model can be adjusted in more detail, and the accuracy of image generation and the quality of the generated image can be improved. Moreover, by constructing a data distribution relationship, the application effect of the splicing parameters (i.e., image evaluation indicators) is quantitatively evaluated, and the update optimization of the splicing parameters is realized to obtain the optimized feature splicing parameters, so that the model quality and performance of the final target image generation model can be further improved, thereby improving the accuracy of image generation. In addition, in the present application, only the splicing parameters need to be optimized and adjusted, so that the number of model training is very small, so that when the function of the image generation model is adjusted, only a small amount of data needs to be processed, thereby improving the flexibility of model training and the quality of the model.

[0261] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.

[0262] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0263] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in this description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0264] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable image generation device to generate a machine, so that the instructions executed by the processor of the computer or other programmable image generation device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable image generating device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable image generating device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.

[0265] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0266] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0267] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. An image generation method, characterized in that: The method comprises: Obtaining media data samples and sample guide data; In the initial image generation model, the media data sample is downsampled using the sample guide data to obtain downsampled sample features; the downsampling process is used to perform dimensionality reduction and feature extraction; In the initial image generation model, the downsampled sample features are upsampled using the sample guidance data to obtain upsampled sample features, and the downsampled sample features and the upsampled sample features are weightedly spliced ​​using initial splicing parameters to obtain sample prediction features; the upsampling process is used to increase the dimension and restore the image; A loss function is generated by combining the sample prediction features with the media data samples, and the initial splicing parameters are adjusted based on the loss function until the feature splicing parameters are obtained when the parameters converge, and the initial image generation model including the feature splicing parameters is determined as the target image generation model; the target image generation model is used to generate image data according to the image guidance data.

2. The method according to claim 1, characterized in that The obtaining of the media data sample and the sample guide data includes: Acquire a first business processing task, and acquire a second business processing task corresponding to the first business processing task; the second business processing task includes the first business processing task; Acquire a first image generation model corresponding to the second business processing task, determine the first image generation model as an initial image generation model for the first business processing task, and acquire a model training set corresponding to the first business processing task and the initial image generation model; the initial image generation model is a model that has been trained; A media data sample having the features indicated by the first business processing task is obtained from the model training set, and sample guidance data is generated according to the first business processing task.

3. The method according to claim 2, characterized in that The method further comprises: If the first image generation model corresponding to the second business processing task is not obtained, determining the basic model of the model architecture corresponding to the first business processing task as the initial image generation model, and inserting the initial splicing parameters into the initial image generation model; If the first image generation model corresponding to the second business processing task is acquired, the process of determining the first image generation model as the initial image generation model for the first business processing task is performed.

4. The method according to claim 3, characterized in that The adjusting the initial splicing parameters based on the loss function until obtaining feature splicing parameters when the parameters converge includes: If the initial image generation model is the first image generation model, adjusting the initial splicing parameters based on the loss function until obtaining feature splicing parameters when the parameters converge; If the initial image generation model is not the first image generation model, then based on the loss function, the original parameters in the initial image generation model and the initial stitching parameters are adjusted until the feature stitching parameters and model parameters are obtained when the parameters converge; the original parameters are the parameters included in the initial image generation model, the model parameters are the parameters after the original parameters converge, and the feature stitching parameters are the parameters after the initial stitching parameters converge.

5. The method according to claim 1, characterized in that The media data samples include image data samples and noise data samples; The obtaining of the media data sample and the sample guide data includes: Acquire the image data sample and the sample size of the image data sample, generate random pixel values ​​based on the sample size, and form the random pixel values ​​into the noise data sample; the number of the random pixel values ​​is obtained from the sample size; Performing picture analysis on the image data sample to obtain sample guide data.

6. The method according to claim 1, characterized in that The media data sample includes a noise data sample; and the generating a loss function by using the sample prediction feature and the media data sample includes: Obtaining conventional sample features and control sample features from the sample prediction features, and obtaining a guide scale for the sample guide data; the conventional sample features are used to represent features obtained by sampling the media data samples; the control sample features are used to represent features obtained by sampling the media data samples using the sample guide data; The guide scale is used to perform weighted processing on the difference between the control sample feature and the regular sample feature to obtain a control semantic feature, and the sum of the control semantic feature and the regular sample feature is determined as sample prediction noise; A loss function is constructed based on the difference data between the sample prediction noise and the noise data sample.

7. The method according to claim 1, characterized in that The media data sample includes an image data sample; the image data sample refers to an image having the features indicated by the sample guide data; The generating a loss function by using the sample prediction feature and the media data sample includes: Performing noise removal processing on the sample prediction feature to obtain a sample denoising feature; Decoding the sample denoising features to obtain a sample prediction image; A loss function is constructed based on the difference data between the sample prediction image and the image data sample.

8. The method according to claim 1, characterized in that The method further comprises: In the t-th denoising process, the t-th regular sample feature and the t-th control sample feature in the t-th sample prediction feature are obtained, and the t-th sample prediction noise is determined based on the t-th regular sample feature and the t-th control sample feature; t is a positive integer less than or equal to T; T is the total number of iterations of the denoising process; If t is 1, the media data sample is obtained, and feature fusion is performed on the media data sample and the t-th sample prediction noise to obtain a denoising feature of the t+1-th sample; If t is a positive integer greater than 1 and less than T, the t-th sample denoising feature is obtained, and the t-th sample denoising feature is fused with the t-th sample prediction noise to obtain the t+1-th sample denoising feature; If t is T, the process of generating a loss function using the sample prediction features and the media data sample is performed.

9. The method according to claim 1, characterized in that The method further comprises: Acquire the sampling dimension of the upsampling block included in the initial image generation model, use random Gaussian distribution to initialize the first initial parameter, and use the random Gaussian distribution to initialize the second initial parameter; the first initial parameter is used to perform weighted processing on the down-sampled sample features, and the second initial parameter is used to perform weighted processing on the up-sampled sample features; the parameter dimensions of the first initial parameter and the second initial parameter are obtained according to the sampling dimension; The first initial parameter and the second initial parameter are determined as the initial splicing parameters.

10. An image generation method, characterized in that: The method comprises: Obtaining initial media data and image guide data; In the target image generation model, the image guidance data is used to perform downsampling processing on the initial media data to obtain downsampled semantic features; the downsampling processing is used to perform dimensionality reduction and feature extraction, and the parameters used in the downsampling processing are hyperparameters; In the target image generation model, the image guidance data is used to perform upsampling processing on the downsampled semantic features to obtain upsampled semantic features, and feature splicing parameters are used to perform weighted splicing on the downsampled semantic features and the upsampled semantic features to obtain image prediction features; the upsampling process is used to increase the dimension and restore the image, the parameters used in the upsampling process are hyperparameters, and the feature splicing parameters are parameters obtained through loss function training; The image prediction features are denoised and decoded by the target image generation model to obtain target image data; the target image data has the features indicated by the image guidance data.

11. The method according to claim 10, characterized in that The method further comprises: Acquire a third business processing task corresponding to the image guidance data, and search for a second image generation model corresponding to the third business processing task; If the second image generation model is found, determining the second image generation model as the target image generation model; If the second image generation model is not found, a fourth business processing task including the third business processing task is obtained, and the third image generation model corresponding to the fourth business processing task is determined as the target image generation model.

12. An image generating device, characterized in that: The device comprises: A sample acquisition module, used to acquire media data samples and sample guide data; A sample downsampling module, used to perform downsampling processing on the media data sample using the sample guide data in the initial image generation model to obtain downsampled sample features; the downsampling processing is used to perform dimensionality reduction and feature extraction; A sample upsampling module is used to perform upsampling processing on the downsampled sample features using the sample guidance data in the initial image generation model to obtain upsampled sample features, and perform weighted splicing of the downsampled sample features and the upsampled sample features using initial splicing parameters to obtain sample prediction features; the upsampling processing is used to perform dimensionality increase and image restoration; A parameter adjustment module is used to generate a loss function through the sample prediction features and the media data sample, adjust the initial splicing parameters based on the loss function until the feature splicing parameters are obtained when the parameters converge, and determine the initial image generation model including the feature splicing parameters as the target image generation model; the target image generation model is used to generate image data according to the image guidance data.

13. An image generating device, characterized in that: The device comprises: A data acquisition module, used to acquire initial media data and image guidance data; A data downsampling module, used to perform downsampling processing on the initial media data using the image guidance data in a target image generation model to obtain downsampled semantic features; the downsampling processing is used to perform dimensionality reduction and feature extraction, and the parameters used in the downsampling processing are hyperparameters; A data upsampling module is used to use the image guidance data to perform upsampling processing on the downsampled semantic features in the target image generation model to obtain upsampled semantic features, and use feature splicing parameters to perform weighted splicing on the downsampled semantic features and the upsampled semantic features to obtain image prediction features; the upsampling process is used to increase the dimension and restore the image, the parameters used in the upsampling process are hyperparameters, and the feature splicing parameters are parameters obtained through loss function training; A data decoding module is used to decode the image prediction features through the target image generation model to obtain target image data; the target image data has the features indicated by the image guidance data.

14. A computer device, characterized in that: Includes processor, memory, input and output interfaces; The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used to receive data and output data, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method described in any one of claims 1 to 9, or executes the method described in any one of claims 10 to 11.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 9, or executes the method according to any one of claims 10 to 11.

16. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the method described in any one of claims 1 to 9 is implemented, or the method described in any one of claims 10 to 11 is executed.

Citation Information

Patent Citations

  • Image processing method and device, computer and readable storage medium

    CN114332467A

  • Pentograph model training method and device, equipment and storage medium

    CN117173504A

  • Training method of image sample generation model and image sample generation method and device

    CN117422783A

  • Deep space probe few-sample geological image category identification method based on diffusion model fusion active learning

    CN117437491A

  • Diffusion models having continuous scaling through patch-wise image generation

    US20240161327A1

Cited By

  • Image generation method and device, model training method and device and computer equipment

    CN121921394A