Image generation method and device, equipment, storage medium and program product

By retrieving the original images related to the prompt text from the target image dataset and performing denoising and denoising processing, the problem of low generation efficiency of the text-generated image model is solved, and more efficient image generation is achieved.

CN120707656APending Publication Date: 2025-09-26BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410346745.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing technology, text-to-image generation models require a long inference time when generating images, resulting in low image generation efficiency.

Method used

The original image related to the prompt text is retrieved from the target image dataset, denoised and fused to construct a target noisy image, and then denoised based on the prompt text to generate the target image.

Benefits of technology

The denoising steps in the image inference process are reduced, the image generation efficiency is improved, and the generation time is shortened.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707656A_ABST
    Figure CN120707656A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image generation, and discloses an image generation method and device, equipment, a storage medium and a program product, and the method comprises the steps: obtaining a prompt text; retrieving at least one target original image related to the prompt text from a target image data set comprising a plurality of original images; performing noise addition processing on each target original image based on the prompt text, and fusing the images obtained by noise addition processing to obtain a target noise image; and denoising the target noise image based on the prompt text to obtain a target image corresponding to the prompt text. The target noise image contains the image information related to the prompt text, so that the denoising step can be reduced, and the image generation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image generation technology, and in particular to an image generation method, apparatus, device, storage medium, and program product. Background Art

[0002] Currently, text-to-image generation models primarily remove initial noise from a given prompt text to generate diverse images. However, this image generation method requires a long inference time to generate images, resulting in low image generation efficiency. Summary of the Invention

[0003] In view of this, the present disclosure provides an image generation method, apparatus, device, storage medium, and program product to solve the problem of low image generation efficiency.

[0004] In a first aspect, the present disclosure provides an image generation method, the method comprising:

[0005] Get the prompt text;

[0006] Retrieving at least one target original image related to the prompt text from a target image data set including a plurality of original images;

[0007] performing noise processing on each of the target original images based on the prompt text and fusing the noise-processed images to obtain a target noise image;

[0008] The target noise image is denoised based on the prompt text to obtain a target image corresponding to the prompt text.

[0009] In a second aspect, the present disclosure provides an image generating device, the device comprising:

[0010] Data acquisition module, used to obtain prompt text;

[0011] An image retrieval module, configured to retrieve at least one target original image related to the prompt text from a target image data set comprising a plurality of original images;

[0012] a noise construction module, configured to perform noise processing on each of the target original images based on the prompt text and fuse the noise-processed images to obtain a target noise image;

[0013] The image generation module is used to perform denoising on the target noise image based on the prompt text to obtain a target image corresponding to the prompt text.

[0014] In a third aspect, the present disclosure provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image generation method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image generation method of the first aspect or any corresponding embodiment thereof.

[0016] In a fifth aspect, the present disclosure provides a computer program product, comprising computer instructions for causing a computer to execute the image generation method of the first aspect or any corresponding embodiment thereof.

[0017] The image generation method provided by the disclosed embodiments retrieves at least one target original image associated with a prompt text and constructs a target noise image using the target original image. The target noise image is then denoised based on the prompt text to obtain a target image corresponding to the prompt text. Because the target noise image contains image information related to the prompt text, the denoising step in the image inference process can be reduced, thereby shortening inference time and improving image generation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 is a flowchart of an image generation method according to an embodiment of the present disclosure;

[0020] Figure 2 is a flowchart of another image generation method according to an embodiment of the present disclosure;

[0021] Figure 3 is a structural block diagram of an image generating device according to an embodiment of the present disclosure;

[0022] Figure 4 It is a structural block diagram of a computer device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.

[0024] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0025] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0026] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0027] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0028] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0029] In related technologies, text-to-image models primarily generate diverse images by denoising initialization noise given a given prompt text. However, because this image generation method uses irregular, pure initialization noise, it requires more denoising steps, resulting in longer inference times and lower image generation efficiency.

[0030] In view of this, according to an embodiment of the present disclosure, an image generation method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0031] In this embodiment, an image generation method is provided, which can be used in computer devices such as mobile phones, tablets, computers, etc. Figure 1 is a flow chart of an image generation method according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps:

[0032] Step S101, obtaining prompt text.

[0033] Specifically, the prompt text is used to guide the generation of the desired target image, and the prompt text may include, but is not limited to, descriptive text about the subject, scene, image style, etc. For example, if a target image including "a pair of headphones on a guitar" needs to be generated, the prompt text may be "A pair of headphones on a guitar".

[0034] Step S102 : Retrieve at least one target original image related to the prompt text from a target image data set including a plurality of original images.

[0035] Specifically, images from multiple application scenarios can be collected to obtain image datasets for multiple application scenarios. In actual use, the target image dataset is determined from the multiple application scenario image datasets by analyzing the application scenario corresponding to the prompt text. Furthermore, during actual operation, newly added images from each application scenario can be acquired in real time to update the image dataset for each application scenario.

[0036] It should be noted that to ensure the final image quality, the image quality of the images collected for each application scenario must be higher than the image quality of the target images for the subsequent prompt text. For example, if the target images for the prompt text are generated using the text-based image diffusion model, the image quality of the original images in the target image dataset must be higher than the image quality of the target images generated by the text-based image diffusion model.

[0037] Specifically, the similarity between each original image and the prompt text may be calculated through an image-text retrieval model, and at least one target original image related to the prompt text may be retrieved from the target image dataset based on the similarity.

[0038] For example, the CLIP model (Contrastive Language-Image Pre-training) or other pre-trained neural network models for matching text and images can be used to extract features from the prompt text and each original image to obtain text features of the prompt text and image features of each original image. The cosine similarity between each image feature and the text feature is calculated as the similarity between each original image and the prompt text. Then, based on the similarity between each original image and the prompt text, a preset number of target original images are selected from the target image dataset in descending order.

[0039] Step S103 , performing noise processing on each target original image based on the prompt text and fusing the noise processed images to obtain a target noise image.

[0040] Specifically, the prompt text can be input into a pre-trained text-to-image model, and the text-to-image model can be used to perform noise processing on each target original image. Alternatively, other image processors can be used to continuously add Gaussian noise to the target original image to obtain the target noise image.

[0041] Step S104 , performing denoising processing on the target noisy image based on the prompt text to obtain a target image corresponding to the prompt text.

[0042] Specifically, the prompt text can be input into a pre-trained text-to-image model, and the text-to-image model can be used to perform denoising on the target noisy image to obtain the target image corresponding to the prompt text.

[0043] Specifically, the text-to-image generation model can adopt a large pre-trained model such as a text-to-image generative adversarial network model, a diffusion model, or a language model.

[0044] The image generation method provided in this embodiment retrieves at least one target original image associated with the prompt text and constructs a target noise image using the target original image. The target noise image is then denoised based on the prompt text to obtain the target image corresponding to the prompt text. Because the target noise image contains image information related to the prompt text, the denoising step in the image inference process can be reduced, thus shortening inference time and improving image generation efficiency.

[0045] In some optional embodiments, the target image dataset in the above step S102 is obtained by: analyzing the prompt text to determine the target application scenario corresponding to the prompt text; querying the target image dataset corresponding to the target application scenario in a preset image library, and the preset image library includes image datasets corresponding to multiple application scenarios.

[0046] The image generation method provided in this embodiment, after obtaining the prompt text, analyzes the target application scenario corresponding to the prompt text and then searches a preset image library for a target image dataset corresponding to the target application scenario. This allows the obtained target image dataset to better align with the prompt text, thereby improving the image quality of the ultimately generated target image.

[0047] Furthermore, the image generation method disclosed herein further includes: acquiring an image dataset of a newly added application scenario; and updating a preset image library based on the image dataset of the newly added application scenario.

[0048] The image generation method provided in this embodiment updates the preset image library based on the image dataset of the newly added application scenario when a new application scenario is added. Therefore, the target image corresponding to the prompt text of the newly added application scenario can be adaptively generated based on the updated image dataset, thereby improving the scenario adaptability of the image generation.

[0049] For example, taking the example of denoising the target noise image based on the Vignette Diffusion Model to obtain the target image corresponding to the prompt text, the image generation capability of the Vignette Diffusion Model depends on its training data in the training stage. If the training data does not contain data of the application scenario corresponding to the current prompt text, the Vignette Diffusion Model will have a poor effect on the image generation of the current prompt text.

[0050] In the image generation method disclosed herein, since the target noise image used for image generation is constructed based on the original image corresponding to the prompt text, the preset image library only needs to be updated based on the image dataset of the newly added application scenario. The target original image corresponding to the prompt text of the newly added application scenario can be obtained from the preset image library to construct a target noise image containing image information related to the prompt text. Inference can then be performed based on this target noise image to obtain the target image corresponding to the prompt text of the newly added application scenario, improving the image generation effect in different application scenarios.

[0051] For example, if the original preset image library includes image datasets for the first, second, and third application scenarios, the image generation effect for the prompt text of the first, second, and third application scenarios will be relatively good. If you want to generate an image for the prompt text of the fourth application scenario, you can obtain the image dataset of the fourth application scenario and add it to the preset image library. Then, based on the preset image library and the prompt text corresponding to the fourth application scenario, you can generate the target image for the fourth application scenario.

[0052] In some optional implementations, the step S103 of performing noise processing on each target original image based on the prompt text and fusing the noise processed images to obtain a target noise image includes:

[0053] In step a1, based on the prompt text and the text-image diffusion model, each target original image is subjected to noise processing to obtain a noise image corresponding to each target original image.

[0054] Step a2: fuse the noise images to obtain a target noise image.

[0055] The image generation method provided in this embodiment uses prompt text and a text-image diffusion model to add noise to each target original image, and then fuses the noise images to generate a target noise image. This allows data perturbation of image information related to the prompt text, increasing the diversity of the image data and thus improving the generalization capability of image generation.

[0056] In some optional embodiments, the above-mentioned step a1 performs noise processing on each target original image based on the prompt text and the Vincent graph diffusion model to obtain a noise image corresponding to each target original image, including: inputting the prompt text and the target original image into the Vincent graph diffusion model, and performing noise processing on the target original image using the noise adding module of the Vincent graph diffusion model to obtain a noise image corresponding to each target original image.

[0057] In some optional implementations, the step a2 of fusing the noise images to obtain the target noise image includes:

[0058] Step a21: Obtain the similarity between the target original image and the prompt text.

[0059] Step a22: fusing the noise images based on similarity to obtain a target noise image.

[0060] The image generation method provided in this embodiment fuses the noise image based on the similarity between the target original image and the prompt text to obtain the target noise image. Therefore, it can fuse image information related to the prompt text, providing more complete image information for image generation of the prompt text, thereby improving the image generation effect.

[0061] It should be noted that if the similarity between each original image and the prompt text has been calculated when retrieving the target original image related to the prompt text from the target image dataset, the similarity calculated when retrieving the image can be directly obtained. If the similarity between each original image and the prompt text has not been calculated when retrieving the target original image related to the prompt text from the target image dataset, feature extraction can be performed on the prompt text and each target original image based on the image-text retrieval model to obtain the text features of the prompt text and the image features of each target original image. The cosine similarity between the image features and the text features of each target original image is calculated as the similarity between each target original image and the prompt text.

[0062] Furthermore, the step a22 of fusing the noise images based on the similarity to obtain the target noise image includes: using the similarity as the weight of the corresponding noise image, and performing weighted calculation on the noise images based on the weight to obtain the target noise image.

[0063] The image generation method provided in this embodiment uses the similarity of each noise image as a weight and performs a weighted calculation on the noise images based on the weights to obtain a target noise image. This method can thereby increase image information related to the prompt text while reducing information irrelevant to the prompt text, further improving the image generation effect.

[0064] In some optional embodiments, the above-mentioned step S104 performs denoising on the target noise image based on the prompt text to obtain the target image corresponding to the prompt text, including: inputting the target noise image into the denoising module of the Vincent graph diffusion model for denoising to obtain the target image corresponding to the prompt text.

[0065] The image generation method provided in this embodiment inputs the target noisy image into the denoising module of the cultural image diffusion model for denoising, thereby inferring the target image corresponding to the prompt text. Therefore, the inference capability of the cultural image diffusion model can be leveraged to further improve the image generation effect.

[0066] It should be noted that the denoising and denoising modules of the Wensheng graph diffusion model are integrated into the sampler of the Wensheng graph diffusion model. There is no limit on the number of target images generated based on the prompt text and the number can be set based on actual needs.

[0067] As an example, take the target image corresponding to the prompt text generated by the text-image diffusion model as an example, Figure 2 As shown, the image generation method disclosed in the present invention includes the following contents:

[0068] (1) Collect high-quality images of multiple application scenarios to form image datasets of multiple application scenarios, and store the image datasets of multiple application scenarios in a preset image library.

[0069] (2) When the prompt text is obtained, the image retrieval model is used to retrieve k target original images related to the prompt text from the preset image library.

[0070] (3) The sampler based on the Wensheng graph diffusion model iteratively adds noise to the k target original images to obtain the noise images corresponding to the k target original images.

[0071] (4) Based on the similarity between the k target original images and the prompt text, the k noise images are weightedly fused to obtain the target noise image.

[0072] (5) Taking the prompt text as the guiding condition, the sampler based on the Wensheng graph diffusion model is used to iteratively denoise the target noise image to obtain the target image corresponding to the prompt text.

[0073] In a specific application scenario, an experiment was conducted using the example of generating a target image based on a given prompt text. If the target image corresponding to the given prompt text is directly inferred based on pure noise using the text-based diffusion model, 25 denoising steps are required. In the experiment, an image dataset consisting of 1 million high-quality images was constructed, and a target original image related to the given prompt text was retrieved from the image dataset using the image-text retrieval model. This target original image was used as the target noise image, and the text-based diffusion model was used to perform inference based on the target noise image to generate the target image for the given prompt text. This only required 20 denoising steps. It can be seen that the image generation efficiency of the image generation method disclosed in the present invention has been improved by 20%.

[0074] It is worth noting that the image generation method disclosed in the present invention retrieves the original image related to the prompt text from the preset image library / target image dataset through the image-text retrieval model, and performs noise processing on the relevant original image and fuses it to obtain the target noise image. The target noise image is denoised as the initialization noise in the denoising process of the text-image diffusion model. Since the target noise image contains image information related to the prompt text, it is only necessary to generate the target image corresponding to the prompt text through a low-step denoising reasoning. At the same time, when reasoning about the prompt text of the newly added application scenario, there is no need to retrain the text-image diffusion model. It is only necessary to collect the image dataset of the newly added application scenario and retrieve the target original image related to the prompt text of the newly added application scenario from the newly added image dataset to construct the corresponding target noise image. The text-image diffusion model can then inject new knowledge based on the target noise image to infer the target image corresponding to the prompt text of the newly added application scenario, thereby accelerating the reasoning process of the text-image diffusion model.

[0075] This embodiment also provides an image generation device for implementing the above-mentioned embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0076] This embodiment provides an image generating device, such as Figure 3 Shown, including:

[0077] Data acquisition module 201, used to obtain prompt text;

[0078] An image retrieval module 202 is configured to retrieve at least one target original image related to the prompt text from a target image dataset comprising a plurality of original images;

[0079] The noise construction module 203 is used to perform noise processing on each target original image based on the prompt text and fuse the noise-processed images to obtain a target noise image;

[0080] The image generation module 204 is configured to perform denoising on the target noisy image based on the prompt text to obtain a target image corresponding to the prompt text.

[0081] In some optional embodiments, the image generating apparatus of the present disclosure further includes:

[0082] A scenario determination module is used to analyze the prompt text to determine the target application scenario corresponding to the prompt text;

[0083] The original image acquisition module is used to query a target image data set corresponding to a target application scenario in a preset image library, and the preset image library includes image data sets corresponding to multiple application scenarios.

[0084] In some optional embodiments, the image generating apparatus of the present disclosure further includes:

[0085] New image acquisition module, used to obtain image datasets for new application scenarios;

[0086] The image update module is used to update the preset image library based on the image dataset of the newly added application scenario.

[0087] In some optional implementations, the noise construction module 203 includes:

[0088] A noise processing unit is used to perform noise processing on each target original image based on the prompt text and the text-image diffusion model to obtain a noise image corresponding to each target original image;

[0089] The image fusion unit is used to fuse the noise images to obtain a target noise image.

[0090] In some optional implementations, the noise adding processing unit includes:

[0091] The noise processing subunit is used to input the prompt text and the target original image into the Wensheng graph diffusion model, and use the noise adding module of the Wensheng graph diffusion model to perform noise processing on the target original image to obtain the noise image corresponding to each target original image.

[0092] In some optional implementations, the image fusion unit includes:

[0093] A similarity acquisition subunit is used to obtain the similarity between the target original image and the prompt text;

[0094] The image fusion subunit is used to fuse the noise images based on similarity to obtain the target noise image.

[0095] In some optional implementations, the image fusion subunit is specifically configured to: use the similarity as the weight of the corresponding noise image, and perform weighted calculation on the noise image based on the weight to obtain the target noise image.

[0096] In some optional implementations, the image generation module 204 includes:

[0097] The image denoising unit is used to input the target noise image into the denoising module of the Wensheng graph diffusion model for denoising processing to obtain the target image corresponding to the prompt text.

[0098] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0099] The image generating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0100] The present disclosure also provides a computer device having the above Figure 3 The image generating device shown.

[0101] See also Figure 4 , Figure 4 This is a structural block diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 4 As shown, the computer device includes: one or more processors 301, memory 302, and the interface for connecting each component, including a high-speed interface and a low-speed interface. Each component utilizes different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instruction executed in the computer device, including the instruction stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, being coupled to the display device of the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides the necessary operation of part (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 301 is taken as an example.

[0102] Processor 301 may be a central processing unit, a network processor, or a combination thereof. Processor 301 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0103] The memory 302 stores instructions that can be executed by at least one processor 301, so as to enable the at least one processor 301 to execute the method shown in the above embodiment.

[0104] The memory 302 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 302 may optionally include a memory remotely located relative to the processor 301, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0105] The memory 302 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid state drive; the memory 302 may also include a combination of the above types of memory.

[0106] The computer device also includes an input device 303 and an output device 304. The processor 301, the memory 302, the input device 303 and the output device 304 can be connected via a bus or other means. Figure 4 The bus connection is taken as an example.

[0107] The input device 303 can receive input digital or character information and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 304 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0108] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0109] A portion of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes but is not limited to a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0110] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An image generation method, characterized in that: The method comprises: Get the prompt text; Retrieving at least one target original image related to the prompt text from a target image data set including a plurality of original images; performing noise processing on each of the target original images based on the prompt text and fusing the noise-processed images to obtain a target noise image; The target noise image is denoised based on the prompt text to obtain a target image corresponding to the prompt text.

2. The image generation method according to claim 1, wherein: The step of performing noise processing on each of the target original images based on the prompt text and fusing the noise processed images to obtain a target noise image includes: Based on the prompt text and the Wensheng graph diffusion model, each of the target original images is subjected to noise processing to obtain a noise image corresponding to each of the target original images; The noise images are fused to obtain the target noise image.

3. The image generation method according to claim 2, wherein: The step of performing noise processing on each of the target original images based on the prompt text and the Wensheng graph diffusion model to obtain a noise image corresponding to each of the target original images includes: The prompt text and the target original image are input into the Wensheng graph diffusion model, and the target original image is subjected to noise processing using the noise addition module of the Wensheng graph diffusion model to obtain noise images corresponding to the target original images.

4. The image generation method according to claim 2, wherein: The fusing of the noise images to obtain the target noise image includes: Obtaining the similarity between the target original image and the prompt text; The noise images are fused based on the similarity to obtain the target noise image.

5. The image generation method according to claim 4, characterized in that The fusing the noise images based on the similarity to obtain the target noise image includes: The similarity is used as the weight of the corresponding noise image, and weighted calculation is performed on the noise image based on the weight to obtain the target noise image.

6. The image generation method according to claim 3, wherein: The performing denoising on the target noisy image based on the prompt text to obtain a target image corresponding to the prompt text includes: The target noise image is input into the denoising module of the Wensheng graph diffusion model for denoising to obtain the target image corresponding to the prompt text.

7. The image generation method according to claim 1, wherein: The target image dataset is obtained in the following way: Analyze the prompt text to determine the target application scenario corresponding to the prompt text; The target image dataset corresponding to the target application scenario is searched in a preset image library, where the preset image library includes image datasets corresponding to multiple application scenarios.

8. The image generation method according to claim 7, wherein: The method further comprises: Obtain image datasets for new application scenarios; The preset image library is updated based on the image data set of the newly added application scenario.

9. An image generating device, characterized in that: The device comprises: Data acquisition module, used to obtain prompt text; An image retrieval module, configured to retrieve at least one target original image related to the prompt text from a target image data set comprising a plurality of original images; a noise construction module, configured to perform noise processing on each of the target original images based on the prompt text and fuse the noise-processed images to obtain a target noise image; An image generation module is used to perform denoising on the target noisy image based on the prompt text to obtain a target image corresponding to the prompt text.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the image generation method according to any one of claims 1 to 8 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image generation method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the image generating method according to any one of claims 1 to 8.