Video generation method and device, electronic equipment and storage medium
By encoding text descriptions and entity fusion, using the entity diffusion model to generate foreground and background images, combined with video diffusion model processing, the problem of limited video generation effects in multi-subject scenes is solved, and more realistic video generation is achieved.
Patent Information
- Application Number
- CN202410658879.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-06
AI Technical Summary
Existing video generation technology has limited effects when generating videos in multi-subject scenarios, making it difficult to accurately capture and present the relationships and dynamics between multiple subjects.
By encoding the text description, extract the features of foreground and background entity images, use the entity diffusion model to perform entity fusion, generate foreground and background images, and combine it with the video diffusion model to generate a video containing multi-entity information.
It improves the effect and performance of video generation in multi-subject scenarios, making the generated videos more realistic and natural, accurately reflecting text descriptions, and capturing the relationships and dynamics between multiple subjects.
Smart Images

Figure CN118608907A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer processing technology, and in particular to a video generation method, device, electronic device and storage medium. Background Art
[0002] Video generation is the process of processing text or input images through deep learning to obtain videos. The goal of video generation is to create natural and high-quality video content that accurately reflects human creativity and intentions. Video generation technology can identify and understand the subject objects in the video, and accurately track, segment and generate them. This mainly involves modeling and predicting the shape, movement, appearance and other features of the subject objects, thereby generating coherent and realistic video sequences. However, existing video generation technology mainly processes single-subject scenes, and still faces many challenges when dealing with the interaction of multiple subject objects and complex scene changes, resulting in the limited video generation capabilities of existing technologies in multi-subject scenes. Summary of the invention
[0003] In view of this, the present application provides a video generation method, device, electronic device and storage medium to solve the problem of limited video generation capability in the prior art in multi-subject scenarios.
[0004] In a first aspect of the present application, a video generation method is provided, including: encoding a text description to obtain text features, and generating foreground entity map features and background entity map features based on the text description; inputting the text features, foreground entity map features and noise maps into an entity diffusion model, diffusing the noise map to obtain a foreground map; the entity diffusion model is used to obtain a first fusion feature corresponding to the input feature, performing cross-attention calculations on the first fusion feature and each entity map feature respectively, obtaining an image cross-attention feature corresponding to each entity map feature, performing cross-attention calculations on the first fusion feature and the text feature to obtain a text cross-attention feature, performing self-attention calculations on each image cross-attention feature and the text cross-attention feature to obtain an entity fusion feature, and diffusing the noise map based on the entity fusion feature; inputting the text features, background entity map features and noise maps into the entity diffusion model, diffusing the noise map to obtain a background map; encoding the foreground map and the background map respectively to obtain foreground map features and background map features; inputting the foreground map features, the background map features, the text features and the video frame noise map into the video diffusion model, performing video diffusion processing on the video frame noise map, and obtaining an output video.
[0005] According to a second aspect of the present application, a video generation device is provided, including: a first encoding module, configured to encode a text description to obtain text features, and generate foreground entity image features and background entity image features based on the text description; a foreground image generation module, configured to input the text features, foreground entity image features and noise images into an entity diffusion model, diffuse the noise image and obtain a foreground image; the entity diffusion model is used to obtain a first fusion feature corresponding to the input feature, perform cross-attention calculation on the first fusion feature and each entity image feature respectively, obtain an image cross-attention feature corresponding to each entity image feature, perform cross-attention calculation on the first fusion feature and the text feature, and obtain a text image; Cross-attention features, self-attention calculation of each image cross-attention feature and text cross-attention feature to obtain entity fusion features, and diffusion processing of the noise map is performed based on the entity fusion features; the background image generation module is configured to input text features, background entity image features and noise map into the entity diffusion model, diffuse the noise map to obtain the background image; the second encoding module is configured to encode the foreground image and the background image respectively to obtain foreground image features and background image features; the video generation module is configured to input the foreground image features, background image features, text features and video frame noise map into the video diffusion model, perform video diffusion processing on the video frame noise map, and obtain the output video.
[0006] According to a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0007] According to a fourth aspect of the present application, a storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0008] At least one of the above technical solutions adopted in this application can achieve the following beneficial effects:
[0009] By acquiring the text description, the text description is expanded into texts of multiple scenes, and then each entity is extracted from the multiple scenes, the entity is encoded, and the foreground entity map features and the background entity map features are obtained; the entity diffusion model is used to perform entity diffusion on the foreground entity map features and the background entity map features respectively to obtain the foreground map and the background map, wherein the entity diffusion model mainly fuses each entity map feature with the text feature to obtain the foreground map and the background map that include both the information of each entity and the information corresponding to the text description; when fusing the entity map feature with the text feature, a first fusion feature can be obtained first, and the cross-attention of the first fusion feature and the entity map feature is calculated to obtain the image cross-attention feature; the cross-attention of the first fusion feature and the text feature is calculated to obtain the text cross-attention feature; the image cross-attention feature and the text cross-attention feature are self-attention calculated to obtain the entity fusion feature, and the entity fusion feature can be characterized by the entity information corresponding to the foreground or background. The information can also represent the text description, which helps the model to handle the multi-subject video generation process. After that, the noise map is diffused using the entity fusion feature to obtain the corresponding foreground and background maps. Further, a set of video frames can be output based on the foreground and background maps combined with the text description to obtain the output video. In this way, the scene can be expanded based on the text to obtain multi-entity information, providing rich and diverse content for video generation. The entity map features and text features are fused, and the obtained entity fusion features can better represent the entity information and text description of the corresponding foreground or background, so that the characteristics of each entity can be retained during video generation and the video can be more accurate and consistent with the input text description. Each subject is encoded, fused and diffused, and multi-subject interaction generation is performed using entity fusion features, which can better capture and present the relationship and dynamics between multiple subjects, making the video generation more realistic and natural, thereby improving the effect and performance of video generation technology in multi-subject scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 any creative work.
[0011] Figure 1 It is a flowchart of a video generation method provided in an embodiment of the present application;
[0012] Figure 2 It is a flowchart of another video generation method provided in an embodiment of the present application;
[0013] Figure 3It is a flowchart of another video generation method provided in an embodiment of the present application;
[0014] Figure 4 It is a flowchart of another video generation method provided in an embodiment of the present application;
[0015] Figure 5 It is a flowchart of another video generation method provided in an embodiment of the present application;
[0016] Figure 6 is a flowchart of another video generation method provided in an embodiment of the present application;
[0017] Figure 7 It is a flowchart of another video generation method provided in an embodiment of the present application;
[0018] Figure 8 is a structural schematic diagram of a video generating device provided in an embodiment of the present application;
[0019] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0021] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0022] In addition, it should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0023] A video generation method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 FIG. 1 is a flow chart of a video generation method provided in an embodiment of the present application. Figure 1 As shown, the video generation method includes:
[0025] S101, encoding the text description to obtain text features, and generating foreground entity graph features and background entity graph features based on the text description.
[0026] S102, input text features, foreground entity map features and noise map into the entity diffusion model, diffuse the noise map to obtain the foreground map, the entity diffusion model is used to obtain the first fusion feature corresponding to the input feature, cross-attention calculation is performed on the first fusion feature and each entity map feature respectively, to obtain the image cross-attention feature corresponding to each entity map feature, the first fusion feature is cross-attention calculated with the text feature to obtain the text cross-attention feature, the image cross-attention feature and the text cross-attention feature are self-attention calculated to obtain the entity fusion feature, and the noise map is diffused based on the entity fusion feature.
[0027] S103, inputting text features, background entity map features and the noise map into an entity diffusion model, diffusing the noise map to obtain a background map.
[0028] S104, encoding the foreground image and the background image respectively to obtain foreground image features and background image features.
[0029] S105, inputting the foreground image features, the background image features, the text features and the video frame noise map into a video diffusion model, performing video diffusion processing on the video frame noise map, and obtaining an output video.
[0030] Specifically, before video generation, a text description can be obtained through a large language model, and the text description can be diffused across scenes to obtain a multi-scene text description. The entity information of each entity can be extracted from the multi-scene text description. Multiple entities can be used for scene fusion, and the noise map can be diffused based on the fusion features of multiple entities to produce a foreground image and background image containing multiple entities. The foreground image and background image are then diffused to obtain an output video. The generated video can not only contain information of multiple entities but also achieve smooth switching of scenes.
[0031] Furthermore, before entity fusion, a corresponding image can be generated for each entity to obtain a set of foreground entity reference images and a set of background entity reference images. The foreground entity reference images and the background entity reference images are encoded respectively to obtain foreground entity image features and background entity image features. The foreground entity reference images and the background entity reference images can be encoded using the CLIP image encoder. Of course, the foreground entity reference image can be segmented before encoding it. For example, the foreground entity reference image is segmented using the SAM segmentation model, and the segmentation result is encoded to obtain the foreground entity image features. The background entity reference image does not need to be segmented and can be directly encoded using the CLIP image encoder.
[0032] In order to facilitate image-text fusion, the text description may also be encoded to obtain text features, for example, the text description may be encoded using a CLIP encoder to obtain text features.
[0033] Furthermore, the entity diffusion model can be used to diffuse entities to generate foreground images and background images. Specifically, the entity diffusion model is used to obtain a first fusion feature, and perform attention fusion on the first fusion feature with the input text feature and entity image feature to obtain text cross-attention features and image cross-attention features. Then, based on the text cross-attention features, image cross-attention features and the first fusion features, entity fusion features of all entities corresponding to the foreground image or background image are obtained. In this way, foreground images and background images can be generated through multi-entity fusion, which helps the video generation network training to obtain the images required for video generation.
[0034] Furthermore, the entity diffusion model may be composed of a plurality of image processing units arranged in sequence, and the input of the entity diffusion model may be iteratively processed using the plurality of image processing units.
[0035] It should also be noted that the first fusion feature can represent the initial feature used to combine the foreground entity map feature and the background entity map feature for cross-attention fusion. The initial feature may not contain weight information and specific feature information during the first diffusion iteration process, in order to make the calculation steps complete. Of course, the initial feature can be replaced by the result of the previous iteration during the intermediate diffusion iteration process. As an example, when the foreground entity map feature is processed using the entity diffusion model, the first foreground fusion feature corresponding to the foreground entity map feature can be obtained as the input of the entity diffusion model. The first foreground fusion feature corresponds to the first fusion feature. The first foreground fusion feature as the input of the entity diffusion model can also be represented as the input of the first image processing unit. At this time, the first foreground feature can represent a matrix with a weight of 1, without changing the text feature and the foreground entity map feature. Of course, the fusion feature corresponding to the first fusion feature of the subsequent image processing unit can be replaced by the output of the previous image processing unit. For example, the fusion feature input to the second image processing unit when processing the foreground entity map feature can be the second foreground fusion feature output by the first image processing unit, but this is not limited here.
[0036] After processing the foreground entity image features and the background entity image features in this way, a foreground image of multiple entities and a background image of multiple scenes are obtained. Video diffusion processing is then performed based on the foreground image and the background image, which can help the video generation network generate the final required video containing multiple entities and multiple scenes.
[0037] According to the method of the above embodiment, by fusing entity graph features with text features to obtain entity fusion features, the characteristics of each entity can be retained, making the video generation result more accurate and consistent with the text description. Multi-subject interactive generation can also be achieved to capture and present the relationship and dynamics between the subjects, making the generated video more realistic and natural, thereby improving the processing capability of video generation technology in multiple scenarios.
[0038] In some embodiments, the entity diffusion model includes a plurality of image processing units arranged in series, each image processing unit includes a multimodal fusion attention module and a first basic module, and the text features, foreground entity map features and noise maps are input into the entity diffusion model, and the noise map is diffused to obtain a foreground map, including: obtaining a first foreground fusion feature corresponding to the foreground entity map feature through the first multimodal fusion attention module, performing cross-attention calculation on the first foreground fusion feature and the text feature to obtain a first text cross-attention feature, performing cross-attention calculation on the first foreground fusion feature and each foreground entity map feature respectively to obtain a foreground cross-attention feature corresponding to each foreground entity map feature, performing self-attention calculation on the first text cross-attention feature and the foreground cross-attention feature to obtain a foreground entity fusion feature; performing diffusion processing on the noise map based on the foreground entity fusion feature through the first first basic module to obtain a first diffusion result, and inputting the first diffusion result as a second foreground fusion feature into the next image processing unit; and further performing diffusion processing on the noise map based on the second foreground fusion feature, the text feature and the foreground entity map feature through the next image processing unit until the foreground map is obtained.
[0039] Specifically, the noise image can be converted into a foreground image by using the foreground entity image features through a pre-built entity diffusion model, and each image processing unit in the entity diffusion model can include a multimodal attention fusion module and a first basic module.
[0040] As an example, an entity diffusion model based on a 2D-Unet structure can be constructed, which includes multiple image processing units 2D-Unet blocks arranged in sequence. Each image processing unit can include a multimodal fusion attention module and a 2D-Unet basic module, wherein the multimodal fusion attention module can be used to fuse the input text features and foreground entity image features, and the fused foreground entity fusion features are input into the 2D-Unet basic module of the same image processing unit. The noise map is diffused to obtain the output of the image processing unit, which can be further used as the foreground fusion features of the next unit.
[0041] Figure 2 is a flow chart of another video generation method provided in an embodiment of the present application, such as Figure 2As shown, the pre-obtained foreground entity reference image and text description can be encoded to obtain foreground entity image features and text features. Of course, the foreground entity reference image can also be segmented before encoding, and then the foreground entity image features, text features and the output of the previous 2D-Unet block (i.e., the first fusion feature) are input into the image processing unit, and the input is iteratively processed and diffused to obtain the fused entity image (i.e., foreground image). Each image processing unit includes a multimodal fusion processing module and a Unet basic module.
[0042] Further, Figure 3 This is a flow chart of another video generation method provided in an embodiment of the present application. Figure 3 The specific processing steps of the image processing unit in this embodiment are described.
[0043] First of all, we can understand that the diffusion model contains multiple image processing units arranged in sequence, and the foreground image can be obtained through multiple iterations. Take the first image processing unit as an example:
[0044] Based on multiple foreground entity reference images, foreground entity image features are obtained. After encoding the text description to obtain text features, a first foreground fusion feature (i.e., the output of the previous 2D-Unet block) can also be obtained for cross-attention calculation with the text features and foreground entity image features respectively. Similarly, the first foreground fusion feature does not change the foreground entity image features and text features. The first foreground fusion feature in the intermediate stage can be the output of the previous image processing unit.
[0045] Furthermore, the cross attention can be calculated for each foreground entity image feature and the first foreground fusion feature to obtain a foreground cross attention feature, the cross attention can be calculated for the text feature and the first foreground fusion feature to obtain a first text cross attention feature, and then the foreground cross attention feature and the first text cross attention feature are self-attentioned to obtain a foreground entity fusion feature, which represents the features of all foreground entities. The foreground entity fusion feature can then be input into the first basic module (i.e., the 2D-Unet basic module), and the foreground entity fusion feature is used to diffuse the noise map to obtain the first diffusion result (i.e., the first diffusion result), and the first diffusion result is further input into the next image processing unit to further diffuse the noise map in combination with the text feature and the foreground entity image feature until the foreground map is obtained. Among them, the noise map can be a Gaussian noise map, which can be obtained based on an existing image through Gaussian noise, or the noise map can be directly randomly generated, and there is no limitation here.
[0046] Furthermore, the 2D-Unet basic module may include an encoder (for downsampling), a decoder (for upsampling) and a jump connection, wherein the encoder may include a 3×3 convolution layer for extracting features, and optional batch normalization for normalizing the output of the convolution layer, and an activation function layer (such as a ReLU function), and a 2×2 maximum pooling layer for reducing the spatial resolution of the feature map. The features obtained by the encoder are then input into the decoder to restore the spatial resolution of the feature map through a 2×2 transposed convolution layer, and the output of the transposed convolution layer is then normalized. The normalized result is then processed using an activation function (such as a ReLU function) to obtain the decoder output feature, and the output of the encoder and the output of the decoder are spliced in the channel dimension using a jump connection. Finally, the spliced feature map is integrated through a 1×1 convolution layer to obtain the output of the 2D-Unet basic module and the diffusion result of the corresponding graphics processing unit (such as the first diffusion result) can be obtained.
[0047] In this way, a foreground image is obtained through multiple diffusion processes. The number of iterations is not limited. The model can be pre-trained to obtain the optimal number of iterations, or adaptive training can be performed to adjust the number of iterations according to different task complexities.
[0048] In other embodiments, the first text cross-attention feature and the foreground cross-attention feature are self-attentionally calculated to obtain a foreground entity fusion feature, including: adding each foreground cross-attention feature to obtain a first addition result; performing self-attention calculation on the first addition result to obtain a first self-attention feature; adding the first self-attention feature to the first text cross-attention feature to obtain a second addition result; performing self-attention calculation on the second addition result to obtain a second self-attention feature, and adding the second self-attention feature to the first foreground fusion feature to obtain a foreground entity fusion feature.
[0049] Specifically, in the process of obtaining the foreground entity fusion feature, each foreground cross-attention feature can also be added to obtain a first addition result, so that multiple foreground entity graph features can be integrated and fused. The feature information of different foreground entities can be accumulated through the addition operation, so that the model can simultaneously consider the importance and contribution of each foreground entity.
[0050] The first addition result is further subjected to self-attention calculation to obtain the first self-attention feature. In this way, the features can be weighted in the feature space through the self-attention mechanism, so that the model can pay more attention to important parts, enhance the correlation and internal structure between foreground entities, and enhance the model's ability to process multiple entities.
[0051] Furthermore, combining the first self-attention feature with the first text cross-attention feature can enhance the correlation between the text and foreground entity features, so that the model can better utilize the text description to guide the generation of the foreground image, making the generation results more accurate and consistent.
[0052] Afterwards, the second addition result is self-attentionally calculated and added to the first foreground fusion feature to obtain the foreground entity fusion feature, which can further fuse the text, foreground entity and the first foreground fusion feature to obtain a more expressive and consistent feature representation, namely the foreground entity fusion feature.
[0053] The foreground entity fusion feature can be further used to diffuse the noise map, which can help the model obtain a more accurate and detailed foreground map.
[0054] According to the method of the above embodiment, by inputting the first foreground fusion feature, the foreground entity map feature and the text feature into the entity diffusion model for processing, a foreground map containing all entities and conforming to the text description is obtained, and then a video is generated based on the foreground map to obtain a video output result with high-definition details.
[0055] In some embodiments, text features, background entity map features and noise maps are input into an entity diffusion model, and the noise map is diffused to obtain a background map, including: obtaining a first background fusion feature corresponding to the background entity map feature through a first multimodal fusion attention module, performing cross-attention calculation on the first background fusion feature and the text feature to obtain a second text cross-attention feature, performing cross-attention calculation on the first background fusion feature and each background entity map feature respectively to obtain a background cross-attention feature corresponding to each background entity map feature, performing self-attention calculation on the second text cross-attention feature and the background cross-attention feature to obtain a background entity fusion feature; performing diffusion processing on the noise map based on the background entity fusion feature through a first first basic module to obtain a second diffusion result, and inputting the diffusion result as a second background fusion feature into the next image processing unit; and further performing diffusion processing on the noise map based on the second background fusion feature, the text feature and the background entity map feature through the next image processing unit until the background map is obtained.
[0056] The entity diffusion model used to generate the background image is consistent with the entity diffusion model used to generate the foreground image, but the background image and the foreground image are operated independently, so the two have independent data. The generation process and details of the background image are not described here.
[0057] It should be understood that the first background fusion feature corresponds to the first foreground fusion feature, the first text cross-attention feature corresponds to the second text cross-attention feature, the background cross-attention feature corresponds to the foreground cross-attention feature, the second diffusion result corresponds to the first diffusion result, and the rest is the same and will not be repeated here.
[0058] In other embodiments, the second text cross-attention feature and the background cross-attention feature are self-attentionally calculated to obtain a background entity fusion feature, including: adding each background cross-attention feature to obtain a third addition result; performing self-attention calculation on the third addition result to obtain a third self-attention feature; adding the third self-attention feature and the second text cross-attention feature to obtain a fourth addition result; performing self-attention calculation on the fourth addition result to obtain a fourth self-attention feature, and adding the fourth self-attention feature and the first background fusion feature to obtain a background entity fusion feature.
[0059] Because the generation of background images and foreground images are both processed using the same entity diffusion model, the processing process of the multimodal fusion attention module is also consistent, that is, the process of obtaining background entity fusion features is consistent with the process of generating foreground entity fusion features, which will not be repeated here.
[0060] By processing the background image and the foreground image independently, the background and foreground in the generated video can be made more flexible and adjusted according to local features, which increases the adaptability and personalization of the model and helps the model avoid problems such as incompatible features or excessive mutual influence of features in complex scenes.
[0061] In some embodiments, the video diffusion model includes a plurality of video processing units arranged in sequence, each of which includes a video fusion attention module and a second basic module, and inputs foreground image features, background image features, text features, and a video frame noise map into the video diffusion model, performs video diffusion processing on the video frame noise map, and obtains an output video, including: obtaining a second fusion feature corresponding to the input feature of the video diffusion model, calculating the cross attention between the second fusion feature and the foreground image feature, the background image feature, and the text feature, respectively, to obtain a first cross attention feature, a second cross attention feature, and a third cross attention feature; and combining the first cross attention feature, the second cross attention feature, and the third cross attention feature. The cross-attention features are added to obtain a video cross-attention feature, self-attention calculation is performed on the video cross-attention feature to obtain a video self-attention feature, and time attention calculation is performed on the video self-attention feature to obtain a time attention feature; the time attention feature is added to the second fusion feature to obtain a video fusion feature output by the video fusion attention module; through the second basic module, the video frame noise map is subjected to video diffusion processing based on the video fusion feature to obtain a third fusion feature; the third fusion feature is input into the next video processing unit, and the video frame noise map is further subjected to video diffusion processing in combination with the foreground image feature, the background image feature and the text feature, until the output video is obtained.
[0062] Specifically, Figure 4 This is a flow chart of another video generation method provided in an embodiment of the present application. Figure 4 This embodiment is described.
[0063] A video diffusion model based on 3D-Unet block can be constructed, which includes multiple video processing units arranged in sequence, each video processing unit includes a video fusion attention module and a second basic module, and the second basic module represents a 3D-Unet basic module.
[0064] After encoding the fused entity image (i.e., foreground image) and the fused background image (i.e., background image) respectively, the video diffusion model constructed above can be used to diffuse the video frame noise image using the foreground image features and the background image features to obtain the output video. That is to say, after generating the foreground image and the background image, the second fusion feature (the output of the previous 3D-Unet block), the foreground image feature, the background image feature and the text feature can be fused through the video diffusion model. The effect of the second fusion feature is the same as that of the first fusion feature, which will not be repeated here. The video frame noise map can also be based on a Gaussian noise map of a video frame without limitation here.
[0065] Of course, before performing video diffusion, the foreground image and the background image can also be encoded to obtain the foreground image features and the background image features. For example, the foreground image and the background image can be encoded using the CLIP image encoder respectively. It should be noted that the text features cited here can be from the same source as the text features cited by the entity diffusion model and will not be explained here.
[0066] Figure 5 This is a flow chart of another video generation method provided in an embodiment of the present application. Figure 5 This embodiment is described.
[0067] First, in the video fusion attention module, the output of the previous 3D-Unet block (i.e., the second fusion feature) and the text feature can be cross-attended to obtain the first cross-attention feature; the second fusion feature and the foreground image feature can be cross-attended to obtain the second cross-attention feature; the second fusion feature and the background image feature can be cross-attended to obtain the third cross-attention feature. The first cross-attention feature, the second cross-attention feature, and the third cross-attention feature are further added together to obtain the video cross-attention feature, which can make the video generation network pay more attention to the correlation between different inputs, so as to capture the correlation between different elements in video generation, thereby increasing the fluency of the video.
[0068] Afterwards, the video cross-attention features can be subjected to self-attention calculation and temporal attention calculation in sequence. This can introduce self-attention mechanism and temporal attention mechanism, which helps to extract information between and within video frames, helps the network better understand the video content and structure, and can also generate video frames in timestamp order.
[0069] After obtaining the temporal attention feature, it is added to the second fusion feature to obtain the video fusion feature output by the video fusion attention module. The temporal attention feature and the second fusion feature can be further integrated, so that the network can better comprehensively consider the static and dynamic characteristics of the video content, and also improve the expression ability of the video features.
[0070] The third fusion feature is obtained by performing video diffusion on the video frame noise map through the 3D-Unet basic module (i.e., the second basic module), which can perform preliminary denoising on the video frame noise map, provide a basis for further diffusion, and help improve food quality.
[0071] In this way, the third fusion feature is input into the next video processing unit, and combined with the foreground image feature, background image feature and text feature, the video noise image is further subjected to video diffusion processing until the output video is obtained. In this way, the video can be processed iteratively, and higher-level features can be gradually extracted to improve the video quality.
[0072] According to the method of the above embodiment, the correlation information, dynamic information and static features of the video content can be better captured through the calculation of cross-attention, self-attention and temporal attention, as well as video fusion and diffusion processing, thereby improving the video quality and expression ability.
[0073] In some embodiments, foreground entity graph features and background entity graph features are generated based on text descriptions, including: performing scene expansion on the text description based on a first type of prompt template to obtain a multi-scene text description; performing entity information extraction on the multi-scene text description based on a second type of prompt template to obtain description information of multiple entities; inputting the description information into a text graph model for processing to obtain a foreground entity reference graph and a background entity reference graph corresponding to each entity; encoding each foreground entity reference graph and background entity reference graph to obtain a foreground entity graph feature and a background entity graph feature.
[0074] Figure 6 This is a flow chart of another video generation method provided in an embodiment of the present application. Figure 6 The embodiments of the present application are described.
[0075] Specifically, a video can be generated based on the text description, which includes using a large language model (LLM) to expand the text description to obtain a multi-scene text description, aiming to help the model integrate multiple scenes to achieve multi-scene switching, extracting entity information from the multi-scene text description, and obtaining description information of multiple entities. The description information of the multiple entities is then input into the text-based graph model for cross-modal processing to obtain a picture corresponding to each entity. Of course, when extracting entity information, the layer position of the corresponding entity can also be extracted, that is, whether it is a foreground entity or a background entity. Therefore, the information corresponding to each entity can also include the location attribute information of the entity, and there is no restriction on the version of the large language model.
[0076] Furthermore, the text description can be expanded through the first template, such as combining the text description (such as: a beautiful girl reading a book) with the first prompt template and inputting it into the LLM, and generating a multi-scene video script (i.e., a multi-scene text description) containing at least four scenes.
[0077] As an example, "Please imagine a multi-scene video and describe each scene, returning it in the following format. Please return at least 4 scenes.
[0078] [Scene 1:prompt:{},foreground:{},background:{},camera move];
[0079] [Scene 2:prompt:{},foreground:{},background:{},camera move]; ...
[0081] [Scene N:prompt:{},foreground:{},background:{},camera move].
[0082] The original text is: "A beautiful girl is reading a book" / / This is the "text description"
[0083] The LLM model can return the following multi-scenario text description examples:
[0084] "[Scene 1: prompt: {A beautiful girl reading a book}, foreground: {A young woman with delicate features, immersed in a novel}, background: {A quiet library with tall bookshelves and scattered reading lamps casting a warmglow}, camera move: {Slow zoom towards the girl, focusing on the subtle movements of her eyes and the turning pages}];
[0085] [Scene 2:prompt:{Lost in thought},foreground:{The girl pauses toponder apassage,her finger tracing the lines},background:{Through the librarywindow,atranquil garden with autumn leaves gently falling},camera move:{Camera pulls back to frame the girl in the window,juxtaposing her stillness with the dynamic garden scene}];
[0086] [Scene 3: prompt: {An interruption}, foreground: {A curious cat jumpson to the table, nudging the book with its nose}, background: {Stacks of books and an open laptop, a half-finished cup of tea releasing steam}, camera move: {Aquick pan to follow the cat's playful disruption, then a cut back to the girl's amused reaction}];
[0087] [Scene 4: prompt: {Resuming the journey}, foreground: {The girl smiles, pets the cat, and returns to reading}, background: {The shadows have lengthened, indicating the late afternoon; a clock ticks softly}, camera move: {Agentledolly shot moving in a half-circle around the girl, capturing the passage of time and the coziness of the setting}].
[0088] Furthermore, the multi-scene text description can be subjected to entity extraction to obtain description information of multiple entities, that is, the multi-scene text description can be combined with the second prompt template and input into the LLM model again for entity recognition, and the common entities in the video can be described in detail, including their categories (foreground or background), to obtain description information of multiple entities.
[0089] As an example, the second prompt template may be:
[0090] "Please identify the common entities in the above scenarios and return them in the following format, where category can only be foreground or background, and each category contains at least two entities:
[0091] [Entity 1:{}:prompt describe in details,category:{}];
[0092] [Entity 2:{}:prompt describe in details,category:{}]; ...
[0094] [Entity N:{}:prompt describe in details,category:{}].”
[0095] In this way, the LLM model can return the descriptive information of multiple entities:
[0096] “[Entity 1:{Girl}:A central figure in the narrative, she is depicted as deeply engrossed in her reading, showing various expressions like focus and contemplation, and interacting with her surroundings, category:{foreground}];
[0097] [Entity 2:{Book}:The object of the girl's attention, it is consistently present as she reads, pauses to think, and is later interrupted by the cat, category:{foreground}];
[0098] [Entity 3:{Library}:Described as a quiet space with tall bookshelves filled with books and reading lamps that cast a warm glow, this setting remains a constant backdrop across the scenes, category:{background}];
[0099] [Entity 4:{Window and Garden View}:The large window in the library offers a view of a tranquil garden,with details such as autumn leaves thatfall,providing aserene and dynamic backdrop,category:{background}];
[0100] [Entity 5:{Cat}:Introduced as a playful element that briefly disrupts the girl's reading,this character's interaction with the girl and the bookadds a moment of levity,category:{foreground}];
[0101] [Entity 6:{Clock and Shadows}:A clock,which can be heard ticking,and the lengthening shadows in the room serve as indicators of the passage of time throughout the scenes,category:{background}].
[0102] In this way, detailed descriptions of multiple entities can be obtained to help provide a richer information basis for video generation. Of course, after obtaining the entity information, entity pictures can be generated.
[0103] Figure 7 This is a flow chart of another video generation method provided in an embodiment of the present application. Figure 7 The entity image generation process is described.
[0104] The obtained multi-entity description information can be processed using a text graph model to obtain images corresponding to each entity. The text graph model can be Stable Diffusion XL. The multi-entity description information is input into the text graph model to generate a visual representation of the entity. For each identified entity, whether it is a foreground or background category, Stable Diffusion XL can create a reference image, so that a set of foreground entity reference images and a set of background entity reference images can be obtained in the end, providing rich visual materials for further video content generation. In this way, not only can images matching the text description be obtained, but also the generated video content can be visually consistent with the textual intent of the original text description.
[0105] Furthermore, the obtained entity graph may be encoded to obtain corresponding foreground entity graph encoding features and background entity graph encoding features, which will not be described here.
[0106] According to the method of the above embodiment, by performing scene expansion on the text description to obtain a multi-scene text description, the network can be helped to enrich the information of the text description, so that the generated foreground entities and background entities are more specific and accurate. Extracting the description information of the entity from the multi-scene text description can help the model extract and concentrate the text description and entity-related information to prepare for the generation of the entity reference graph. Using the text graph model to generate a reference graph corresponding to each entity can enrich the visual information of the entity. Encoding it can better represent the appearance and features of the entity, and provide useful input for entity fusion, thereby improving the understanding ability of subsequent image fusion and video generation, helping the network to generate multi-entity and multi-scene videos, and realizing the association of text images and the smoothness of video frame changes.
[0107] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0108] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0109] Figure 8 Schematic diagram of a video generation device provided in an embodiment of the present application. Figure 8 As shown, the video generating device comprises:
[0110] The first encoding module 801 is configured to encode the text description to obtain text features, and generate foreground entity graph features and background entity graph features based on the text description;
[0111] The foreground image generation module 802 is configured to input the text feature, the foreground entity image feature and the noise image into the entity diffusion model, diffuse the noise image, and obtain the foreground image; the entity diffusion model is used to obtain a first fusion feature corresponding to the input feature, perform cross-attention calculation on the first fusion feature and each entity image feature, obtain an image cross-attention feature corresponding to each entity image feature, perform cross-attention calculation on the first fusion feature and the text feature, obtain a text cross-attention feature, perform self-attention calculation on each image cross-attention feature and the text cross-attention feature, obtain an entity fusion feature, and perform diffusion processing on the noise image based on the entity fusion feature;
[0112] The background image generation module 803 is configured to input the text features, the background entity image features and the noise image into the entity diffusion model, diffuse the noise image, and obtain the background image;
[0113] The second encoding module 804 is configured to encode the foreground image and the background image respectively to obtain foreground image features and background image features;
[0114] The video generation module 805 is configured to input the foreground image features, the background image features, the text features and the video frame noise map into the video diffusion model, perform video diffusion processing on the video frame noise map, and obtain an output video.
[0115] In some embodiments, the foreground image generation module 802 is specifically used to obtain a first foreground fusion feature corresponding to the foreground entity image feature through a first multimodal fusion attention module, perform cross-attention calculation on the first foreground fusion feature and the text feature to obtain a first text cross-attention feature, perform cross-attention calculation on the first foreground fusion feature and each foreground entity image feature respectively to obtain a foreground cross-attention feature corresponding to each foreground entity image feature, perform self-attention calculation on the first text cross-attention feature and the foreground cross-attention feature to obtain a foreground entity fusion feature; perform diffusion processing on the noise image based on the foreground entity fusion feature through the first first basic module to obtain a first diffusion result, and input the first diffusion result as a second foreground fusion feature to the next image processing unit; and further perform diffusion processing on the noise image based on the second foreground fusion feature, the text feature and the foreground entity image feature through the next image processing unit until a foreground image is obtained.
[0116] In some embodiments, the foreground image generation module 802 is specifically used to add each foreground cross-attention feature to obtain a first addition result; perform self-attention calculation on the first addition result to obtain a first self-attention feature; add the first self-attention feature and the first text cross-attention feature to obtain a second addition result; perform self-attention calculation on the second addition result to obtain a second self-attention feature, and add the second self-attention feature to the first foreground fusion feature to obtain a foreground entity fusion feature.
[0117] In some embodiments, the background image generation module 803 is specifically used to obtain a first background fusion feature corresponding to the background entity image feature through the first multimodal fusion attention module, perform cross-attention calculation on the first background fusion feature and the text feature to obtain a second text cross-attention feature, perform cross-attention calculation on the first background fusion feature and each background entity image feature respectively to obtain a background cross-attention feature corresponding to each background entity image feature, perform self-attention calculation on the second text cross-attention feature and the background cross-attention feature to obtain a background entity fusion feature; through the first first basic module, perform diffusion processing on the noise image based on the background entity fusion feature to obtain a second diffusion result, and input the diffusion result as the second background fusion feature to the next image processing unit; through the next image processing unit, further perform diffusion processing on the noise image based on the second background fusion feature, the text feature and the background entity image feature until the background image is obtained.
[0118] In some embodiments, the background image generation module 803 is specifically used to add each background cross-attention feature to obtain a third addition result; perform self-attention calculation on the third addition result to obtain a third self-attention feature; add the third self-attention feature and the second text cross-attention feature to obtain a fourth addition result; perform self-attention calculation on the fourth addition result to obtain a fourth self-attention feature, and add the fourth self-attention feature and the first background fusion feature to obtain a background entity fusion feature.
[0119] In some embodiments, the video generation module 805 is specifically used to obtain a second fusion feature corresponding to the input feature of the video diffusion model, calculate the cross-attention between the second fusion feature and the foreground image feature, the background image feature and the text feature, and obtain the first cross-attention feature, the second cross-attention feature and the third cross-attention feature; add the first cross-attention feature, the second cross-attention feature and the third cross-attention feature to obtain a video cross-attention feature, perform self-attention calculation on the video cross-attention feature to obtain a video self-attention feature, and perform time attention calculation on the video self-attention feature to obtain a time attention feature; add the time attention feature to the second fusion feature to obtain a video fusion feature output by the video fusion attention module; through the second basic module, perform video diffusion processing on the video frame noise map based on the video fusion feature to obtain a third fusion feature; input the third fusion feature into the next video processing unit, combine the foreground image feature, the background image feature and the text feature, and further perform video diffusion processing on the video frame noise map until the output video is obtained.
[0120] In some embodiments, the first encoding module 801 is specifically used to perform scene expansion on the text description based on the first type of prompt template to obtain a multi-scene text description; extract entity information from the multi-scene text description based on the second type of prompt template to obtain description information of multiple entities; input the description information into the text graph model for processing to obtain a foreground entity reference image and a background entity reference image corresponding to each entity; encode each foreground entity reference image and background entity reference image to obtain a foreground entity image feature and a background entity image feature.
[0121] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0122] Fig. 9 Schematic diagram of an electronic device 9 provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 9 of this embodiment includes: a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program 903, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 901 executes the computer program 903, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0123] The electronic device 9 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 9 may include, but is not limited to, a processor 901 and a memory 902. Those skilled in the art will appreciate that Fig. 9The electronic device 9 is merely an example and does not limit the electronic device 9 , and may include more or less components than those shown in the figure, or different components.
[0124] The processor 901 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.
[0125] The memory 902 may be an internal storage unit of the electronic device 9, for example, a hard disk or memory of the electronic device 9. The memory 902 may also be an external storage device of the electronic device 9, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 9. The memory 902 may also include both an internal storage unit of the electronic device 9 and an external storage device. The memory 902 is used to store computer programs and other programs and data required by the electronic device.
[0126] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0127] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0128] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A video generation method, characterized in that: include: Encoding the text description to obtain text features, and generating foreground entity graph features and background entity graph features based on the text description; The text feature, the foreground entity image feature and the noise image are input into the entity diffusion model, and the noise image is diffused to obtain the foreground image; the entity diffusion model is used to obtain a first fusion feature corresponding to the input feature, and the first fusion feature is respectively cross-attention calculated with each entity image feature to obtain an image cross-attention feature corresponding to each entity image feature, and the first fusion feature is cross-attention calculated with the text feature to obtain a text cross-attention feature, and the image cross-attention feature and the text cross-attention feature are self-attention calculated to obtain an entity fusion feature, and the noise image is diffused based on the entity fusion feature; Inputting the text features, the background entity map features and the noise map into the entity diffusion model, diffusing the noise map to obtain a background map; Encoding the foreground image and the background image respectively to obtain foreground image features and background image features; The foreground image features, the background image features, the text features and the video frame noise map are input into a video diffusion model, and video diffusion processing is performed on the video frame noise map to obtain an output video.
2. The method according to claim 1, characterized in that The entity diffusion model includes a plurality of image processing units arranged in series, each of the image processing units includes a multimodal fusion attention module and a first basic module, the text features, the foreground entity image features and the noise map are input into the entity diffusion model, the noise map is diffused, and a foreground map is obtained, including: Obtaining a first foreground fusion feature corresponding to the foreground entity graph feature through the first multimodal fusion attention module, performing cross-attention calculation on the first foreground fusion feature and the text feature to obtain a first text cross-attention feature, performing cross-attention calculation on the first foreground fusion feature and each foreground entity graph feature to obtain a foreground cross-attention feature corresponding to each foreground entity graph feature, performing self-attention calculation on the first text cross-attention feature and the foreground cross-attention feature to obtain a foreground entity fusion feature; Through the first of the first basic modules, the noise image is diffused based on the foreground entity fusion feature to obtain a first diffusion result, and the first diffusion result is input as a second foreground fusion feature to the next image processing unit; The noise image is further diffused by the next image processing unit based on the second foreground fusion feature, the text feature and the foreground entity image feature until the foreground image is obtained.
3. The method according to claim 2, characterized in that The step of performing self-attention calculation on the first text cross-attention feature and the foreground cross-attention feature to obtain a foreground entity fusion feature includes: Adding each of the foreground cross-attention features to obtain a first addition result; Performing self-attention calculation on the first addition result to obtain a first self-attention feature; Adding the first self-attention feature to the first text cross-attention feature to obtain a second addition result; Perform self-attention calculation on the second addition result to obtain a second self-attention feature, and add the second self-attention feature to the first foreground fusion feature to obtain the foreground entity fusion feature.
4. The method according to claim 3, characterized in that The step of inputting the text features, the background entity map features and the noise map into the entity diffusion model and diffusing the noise map to obtain the background map comprises: Obtain a first background fusion feature corresponding to the background entity graph feature through the first multimodal fusion attention module, perform cross-attention calculation on the first background fusion feature and the text feature to obtain a second text cross-attention feature, perform cross-attention calculation on the first background fusion feature and each of the background entity graph features to obtain a background cross-attention feature corresponding to each of the background entity graph features, perform self-attention calculation on the second text cross-attention feature and the background cross-attention feature to obtain a background entity fusion feature; Through the first of the first basic modules, the noise image is diffused based on the background entity fusion feature to obtain a second diffusion result, and the diffusion result is input into the next image processing unit as a second background fusion feature; The noise image is further diffused by the next image processing unit based on the second background fusion feature, the text feature and the background entity image feature until the background image is obtained.
5. The method according to claim 4, characterized in that The step of performing self-attention calculation on the second text cross-attention feature and the background cross-attention feature to obtain a background entity fusion feature includes: Adding each of the background cross-attention features to obtain a third addition result; Performing self-attention calculation on the third addition result to obtain a third self-attention feature; Adding the third self-attention feature to the second text cross-attention feature to obtain a fourth addition result; Perform self-attention calculation on the fourth addition result to obtain a fourth self-attention feature, and add the fourth self-attention feature and the first background fusion feature to obtain the background entity fusion feature.
6. The method according to claim 1, characterized in that The video diffusion model includes a plurality of video processing units arranged in sequence, each of the video processing units includes a video fusion attention module and a second basic module, the foreground image feature, the background image feature, the text feature and the video frame noise map are input into the video diffusion model, the video frame noise map is subjected to video diffusion processing, and an output video is obtained, including: Acquire a second fusion feature corresponding to the input feature of the video diffusion model, calculate the cross attention between the second fusion feature and the foreground image feature, the background image feature and the text feature, respectively, to obtain a first cross attention feature, a second cross attention feature and a third cross attention feature; Adding the first cross-attention feature, the second cross-attention feature, and the third cross-attention feature to obtain a video cross-attention feature, performing self-attention calculation on the video cross-attention feature to obtain a video self-attention feature, and performing time attention calculation on the video self-attention feature to obtain a time attention feature; Adding the temporal attention feature to the second fusion feature to obtain a video fusion feature output by the video fusion attention module; By means of the second basic module, the video frame noise map is subjected to video diffusion processing based on the video fusion feature to obtain a third fusion feature; The third fusion feature is input into the next video processing unit, and combined with the foreground image feature, the background image feature and the text feature, the video frame noise image is further subjected to video diffusion processing until the output video is obtained.
7. The method according to claim 1, characterized in that The generating of foreground entity graph features and background entity graph features based on the text description includes: Expanding the text description by scene based on the first type of prompt template to obtain a multi-scene text description; Extracting entity information from the multi-scene text description based on the second type of prompt template to obtain description information of multiple entities; Inputting the description information into a Wensheng graph model for processing to obtain a foreground entity reference graph and a background entity reference graph corresponding to each entity; Each of the foreground entity reference images and the background entity reference images are encoded respectively to obtain the foreground entity image features and the background entity image features.
8. A video generating device, characterized in that: include: A first encoding module is configured to encode the text description to obtain text features, and generate foreground entity graph features and background entity graph features based on the text description; The foreground image generation module is configured to input the text feature, the foreground entity image feature and the noise image into the entity diffusion model, diffuse the noise image, and obtain the foreground image; the entity diffusion model is used to obtain a first fusion feature corresponding to the input feature, perform cross-attention calculation on the first fusion feature and each entity image feature respectively, obtain an image cross-attention feature corresponding to each entity image feature, perform cross-attention calculation on the first fusion feature and the text feature, obtain a text cross-attention feature, perform self-attention calculation on the image cross-attention feature and the text cross-attention feature, obtain an entity fusion feature, and perform diffusion processing on the noise image based on the entity fusion feature; A background image generation module is configured to input the text features, the background entity image features and the noise image into the entity diffusion model, diffuse the noise image, and obtain a background image; A second encoding module is configured to encode the foreground image and the background image respectively to obtain a foreground image feature and a background image feature; The video generation module is configured to input the foreground image features, the background image features, the text features and the video frame noise map into a video diffusion model, perform video diffusion processing on the video frame noise map, and obtain an output video.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Video generation method and device, electronic equipment and storage medium
CN119629432A
Text-guided zero-sample transparent layer and layered image generation method
CN120070638A
Data processing method, device and system and computer readable storage medium
CN120449947A
Video prediction method and system based on dynamic diffusion model
CN121661573A
AIGC character generation consistency control method based on mud kneading entity constraint
CN121837470A
