VideoControlNet: A Motion-Guided Video-to-Video Translation Framework by Using Diffusion Model with ControlNet

Zhihao Hu, Dong Xu

Introduction

Video generation is an essential task in computer vision. Most previous works (Wang et al., 2018, 2019) leverage the generative adversarial networks (GAN) (Goodfellow et al., 2020) for generating continuous and content-consistent videos. Recently, diffusion models (Ho et al., 2020; Rombach et al., 2022) have attracted increasing attention, which has shown strong generation capability over generative adversarial networks. More recently, the StableDiffusion model is released and achieves state-of-the-art generation performance, which is trained on the large-scale text-image dataset and thus can generate various types of images based on the given text prompt. Although image diffusion models have achieved promising results these days, recently released video diffusion models (Singer et al., 2022; Blattmann et al., 2023; Ho et al., 2022b) fail to generate continuous and content-consistent videos with high quality.

The main reason leading to the failure of video diffusion models is the uncontrollable diffusion process. Given the input text prompt, the diffusion process is uncontrollable and various types of images may be generated. Fortunately, ControlNet (Zhang and Agrawala, 2023) is recently proposed for controlling the generation process of diffusion model based on different conditions (e.g., canny map, depth map or segmentation map, etc.). Therefore, it is intuitive to generate the output video based on the condition from the given input video. However, when the output video is directly generated frame-by-frame, it is still hard to promise the content consistency of the neighbor frames. One possible explanation is that one condition still corresponds to various output content and thus also results in inconsistent content between the independently generated frames.

Inspired by the video coding process (Lu et al., 2019; Hu et al., 2021, 2022) that adopts the motion information for reducing temporal redundancy, we propose a new motion-guided video-to-video translation framework called VideoControlNet by using the diffusion model with ControlNet, in which the motion information is adopted for content-consistency and the diffusion-model-based inpainting is used for covering the residual information. Therefore, by using the video coding paradigm that uses motion information for reducing redundancy, our method prevents the regeneration of the redundant areas based on the motion information and thus we can keep better content consistency. Specifically, we set the first frame as the I-frame and divide the following frames into different groups of pictures (GoP), in which the last frame of different GoPs is set as the key frame (i.e., P-frame) and other frames are set as B-frames. We first generate the I-frame independently by directly using the diffusion model with ControlNet, in which the condition is extracted from the I-frame of the input video and thus the output I-frame has the same content structure as the input I-frame. Then we generate the rest P-frames by using our newly proposed motion-guided P-frame generation (MgPG) module, in which the motion information is used for motion compensation of the redundant areas and the diffusion-model-based inpainting is performed for the generation of the newly occurred areas. Finally, the B-frames are generated based on our motion-guided B-frame interpolation (MgBI) module. Our proposed framework follows the paradigm of the B-frame-based video decoding process and inherits the generation capability of the image diffusion model, which makes it able to generate high-quality videos with continuous and consistent content. Therefore, guided by the motion information of the input video, our framework can generate different videos with different styles or contents based on different given text prompts.

To demonstrate the effectiveness of our proposed framework, we perform experiments based on the current most well-known StableDiffusion model, which is trained on a large-scale text-image dataset and achieves state-of-the-art generation performance for image diffusion. The generation results of our VideoControlNet based on the StableDiffusion Model with ControlNet are provided in Figure 1. For example, for the first video of a woman walking in the forest, our method can generate the output video that has the same content as the input video and different styles (e.g., the soft-painting style of the artwork or the cyberpunk style of realistic photo). The results demonstrate that our method can keep the content consistent and generate various videos based on different text prompts, which inherit the spirit of the StableDiffusion Model and our VideoControlNet framework makes it able to extend the StableDiffusion model to the video diffusion model.

Our contributions are summarized as follows,

We proposed a new motion-guided video-to-video translation framework called VideoControlNet by using the diffusion model with ControlNet following the paradigm of video coding.

To generate the P-frames based on the given I-frame, we propose the motion-guided P-frame generation (MgPG) module, in which the motion information is extracted from the input video for keeping the content consistency, and the residual areas are generated by diffusion-model-based inpainting.

We also propose the motion-guided B-frame interpolation (MgBI) module for generating the rest B-frames based on the reference I/P-frame.

Experimental results demonstrate that our method inherits the generation capability of the pre-trained large diffusion model (i.e., StableDiffusion) and is able to translate the input video into diverse videos with different styles or contents.

Related Works

Image Generation. Diffusion models (Ho et al., 2020; Song et al., 2020b, a; Rombach et al., 2022) perturb data during the forward process and recover the data during the inversion process, which achieves the state-of-the-art image generation performance. Although the generation speed of the first few works (Ho et al., 2020; Song et al., 2020a) are extremely slow due to their large number of diffusion steps, some works (Lu et al., 2022a, b) study to accelerate the generation speed by introducing new sampling strategies. Recently, LatentDiffusion (Rombach et al., 2022) introduced VQ-VAE (Van Den Oord et al., 2017) to diffusion models and performs the time-consuming diffusion process in latent space, which is further extended to StableDiffusion by training on large-scale text-image dataset.

Control of Diffusion Model. Most recent state-of-the-art image diffusion models (Nichol et al., 2022; Kim et al., 2022; Avrahami et al., 2022) are guided by the control of the text information, which can be achieved by extracting CLIP features (Ramesh et al., 2022) from the text and then concatenate the CLIP feature during the diffusion steps or use cross-attention module. SDEdit (Meng et al., 2021) achieved controllable image editing by adding noise to the given stroke without extra training steps for diffusion models. EGSDE (Zhao et al., 2022) adopted the energy function to control the generation during the denoising process of a pre-trained SDE. Recently, ControlNet (Zhang and Agrawala, 2023) is proposed for adding extra conditions (e.g., canny map, depth map, segmentation map, etc.) to the pre-trained diffusion models, which makes it able to control the content structure of the generated results without sacrificing the generation ability.

Video Generation. With the success of text-to-image generation, a number of works (Ho et al., 2022b; Singer et al., 2022; Zhou et al., 2022; Ruan et al., 2022; Esser et al., 2023; Liu et al., 2023; Wu et al., 2022a; Ni et al., 2023; Blattmann et al., 2023) are proposed for generating videos based on image diffusion models. Some of these works (Ho et al., 2022b; Singer et al., 2022; Blattmann et al., 2023) achieved the video diffusion model by changing the 2D Unet from the image diffusion models to 3D Unet and then training the 3D Unet structure on video datasets. Imagen Video (Ho et al., 2022a) proposed a cascaded video generation framework by performing temporal super-resolutions and spatial super-resolutions on the initially generated low frame-rate and low-resolution videos. Tune-A-Video (Wu et al., 2022a) proposed a one-shot tuning strategy to enhance temporal consistency. MMDiffusion (Ruan et al., 2022) achieved simultaneous audio and video generation. (Ni et al., 2023) proposed the latent flow diffusion model to generate video from a single reference image, while they can only achieve low-resolution generation on specific datasets. VideoLDM (Blattmann et al., 2023) achieves the state-of-the-art text-to-video generation results by adding additional temporal layers to the pre-trained latent diffusion model (Rombach et al., 2022) and uses a cascaded framework for generating high-resolution and high frame-rate videos. However, the state-of-the-art methods do not leverage the motion information for preventing the regeneration of redundant areas, which still leads to content inconsistency.

2. Video-to-Video Translation

Image-to-image translation algorithms like pix2pix (Isola et al., 2017) are able to achieve video generation by processing the input video frame by frame, which cannot consider the temporal consistency of neighbor frames. Early video-to-video translation methods (Wang et al., 2018, 2019) are proposed based on the generative adversarial networks (GAN) (Goodfellow et al., 2020). However, such GAN-based networks can only synthesize videos based on specific training data. Recently, inspired by the strong generation capability of diffusion models, some methods also adopt diffusion models for video editing (Liu et al., 2023) and video-to-video translation (Esser et al., 2023). Gen-1 (Esser et al., 2023) proposed the structure-guided video generation algorithm by introducing the depth map as the condition, which needs to retrain the diffusion model on video data. Different from Gen-1, our framework is built upon the pre-trained large image diffusion model (i.e., StableDiffusion) and inherits the strong generation capability of StableDiffusion. Additionally, our framework follows the paradigm of the video coding (Lu et al., 2019; Hu et al., 2021; Hu and Xu, 2023) framework and prevents regeneration of the redundant areas by using motion information from the input video, which can better keep the content consistent.

3. Optical Flow Estimation

Our proposed VideoControlNet relies on the pre-trained optical flow estimation network for modulating the motion of the video. Therefore, it is necessary to select an effective optical flow estimation network for motion estimation. SpyNet (Ranjan and Black, 2017) is widely used in learning-based video coding frameworks like DVC (Lu et al., 2019). Although such optical flow estimation networks can achieve promising results on specific datasets, they are not general for estimating the optical flow on different types of videos. Recently, FlowFormer (Huang et al., 2022) is proposed and some models are trained on all the existing optical flow datasets, which is more general. To this end, we directly use the FlowFormer as our optical flow network. In the future, our method can be further enhanced by using more effective optical flow estimation networks.

Method

In this work, we propose a new video-to-video translation framework called VideoControlNet to translate the input video to the output video based on the given prompt. The problem formulation and the overall pipeline are provided as follows.

Problem Formulation. Given the input video X={X0,X1,...,Xn}X=\{X_{0},X_{1},...,X_{n}\}, in which XiX_{i} denotes the input frame at the timestep ii. We denote the first input frame X0X_{0} as the I frame. Then we divide the rest frames into different groups of pictures (GoP), in which we set the GoP size as gg. We also set the last frame of each GoP as P-frame, and the other frames are denoted as B-frames. Our goal is to generate output video X^={X^0,X^1,...,Xn^}\hat{X}=\{\hat{X}_{0},\hat{X}_{1},...,\hat{X_{n}}\} based on the given text prompt. The corresponding frames of the output video are also called I-frames, P-frames and B-frames.

Generation of I-frame. The generation process of the I-frame is provided in Figure 2(a). We first generate the I-frame X^0\hat{X}_{0} by directly performing the pre-trained StableDiffusion model with ControlNet, in which the condition X0cX_{0}^{c} (e.g., canny map or depth map) is extracted from the input I-frame X0X_{0}. As the ControlNet is able to control the content structure based on the given condition X0cX_{0}^{c}, The generated I frame X^0\hat{X}_{0} has the same content structure as the input frame X0X_{0}.

Generation of the first GoP. As shown in Figure 2(b), taking the output I-frame X^0\hat{X}_{0} as the reference frame, we generate the output P-frame X^g\hat{X}_{g} by using our newly proposed motion-guided P-frame generation (MgPG) module based on the optical flow information extracted from the optical flow net (Huang et al., 2022) and the condition image XgcX_{g}^{c}. After that, our motion-guided B-frame Interpolation (MgBI) module takes the output I-frame X^0\hat{X}_{0} and the output P-frame X^g\hat{X}_{g} as the reference frames and generates the output B frames in this GoP.

Generation of the rest GoPs. The generation processes of the rest GoPs are similar to the generation process of the first GoP, in which the only difference is that we use the output P-frame in the previous GoP to replace the output I-frame as the reference frame for the MgPG module and MgBI module.

2. Motion-guided P-frame Generation

As the generation process of the diffusion model is unstable, which leads to content inconsistency when generating the output video frame-by-frame. Therefore, we propose the motion-guided P-frame generation (MgPG) method, which leverages the motion information from the input video to keep content consistent by preventing the regeneration of the redundant areas. Additionally, for the areas that do not appear in the previous frames (e.g., the occurrence of the occlusion areas), we propose the inpainting mask generation module to generate the inpainting mask and then perform inpainting based on StableDiffusion with ControlNet.

As shown in Figure 3, to generate the output P-frame X^i\hat{X}_{i} in the P-frame generation block, we first take the previously generated I/P-frame X^i−g\hat{X}_{i-g} as the reference frame and perform the backward warping operation based on the motion information (i.e., optical flow) Mi−g→iM_{i-g\rightarrow i} to generate the warped frame Xˉi\bar{X}_{i}. It is observed that the warped frame Xˉi\bar{X}_{i} is not perfect due to the occurrence of the occlusion areas (e.g., at the left side of the woman and the right border in the warped frame Xˉi\bar{X}_{i} in Figure 3). In the video coding task, the residual information will be added in such areas, while it is hard to generate the residual information for our generated P frame. Fortunately, the diffusion model can achieve image inpainting based on the given inpainting mask. Therefore, the key point is to generate the inpainting mask IiI_{i}.

in which OnesOnes denotes the map with values of all ones. In the generated occlusion map OiO_{i}, areas with zeros denote they do not occur in the reference frame, which should be inpaint. After that, we generate the inpainting mask IiI_{i} by considering both residual information RiR_{i} and the occlusion map OiO_{i}, which is formulated as follows,

in which Ii,kI_{i,k}, Oi,kO_{i,k}, Ri,kR_{i,k} denotes their corresponding values at the spatial location kk. α\alpha and thresholdthreshold are hyper-parameters. The areas with value zeros in IiI_{i} will be inpaint in the diffusion model.

Finally, guided by the inpainting mask IiI_{i}, we inpaint the newly occurred areas in the warped frame Xˉi\bar{X}_{i} by using StableDiffusion with ControlNet and generate the output P-frame X^i\hat{X}_{i}.

3. Motion-guided B-frame Interpolation

Based on the generated output I-frame and P-frames, we generate the rest B-frames by using our motion-guided B-frame interpolation (MgBI) module. In the video coding task, the B-frame always needs less residual information than the P-frames. Therefore, in our MgBI method, we directly interpolate the B-frames based on the reference I/P frames and the motion information extracted from the input frames without using the time-consuming diffusion model.

The detailed generation process is shown in Figure 4. When generating the output frame X^j\hat{X}_{j}, we first take the two nearest I/P frames X^i−g\hat{X}_{i-g} and X^i\hat{X}_{i} as the reference frames. Then we generate the corresponding motion information Mi−g→jM_{i-g\rightarrow j} and Mi→jM_{i\rightarrow j} by using the optical flow net (Huang et al., 2022). After that, we perform the backward warping operation to generate the warped frames Xˉjfront\bar{X}_{j}^{front} and Xˉjback\bar{X}_{j}^{back}, in which some areas in the warped frames are inaccurate due to the occlusion areas. Considering the occlusion areas from one reference frame always occur in another reference frame, we simply generate the match score of each warped frame to produce the final output frame X^j\hat{X}_{j}.

The match score generation process is similar to the inpainting mask generation process that also uses both residual information and forward warping operation to generate the inpainting mask. Take the match score calculation process of the warped frame Xˉjfront\bar{X}_{j}^{front} as an example, we first perform the backward warping operation based on the input frame Xi−gX_{i-g} and therefore the residual RjfrontR_{j}^{front} can be calculated. Similar to Eq. 1, we use the motion information Mi−g→jM_{i-g\rightarrow j} to perform the forward warping operation based on the map with values of ones and thus we generate the occlusion map OjfrontO_{j}^{front}. The residual map RjbackR_{j}^{back} and the occlusion map OjbackO_{j}^{back} are also generated in the same process. Then the intermediate score Sˉjfront\bar{S}_{j}^{front} and Sˉjback\bar{S}_{j}^{back} are calculated as follows,

And we use the softmax operation with temperature to generate the final match score SjfrontS_{j}^{front},

and the match score SjbackS_{j}^{back} can be calculated by Sjback=1−SjfrontS_{j}^{back}=1-S_{j}^{front}, in which the temperature τ\tau is the hyper-parameter.

Finally, the output B-frame X^j\hat{X}_{j} is calculated by adding up the weighted warped frame, which is also formulated as follows

Therefore, our motion-guided B-frame generation module is able to generate the B-frames efficiently and effectively without using the time-consuming StableDiffusion.

Experiments

Datasets. Due to the strong generation capability of the large StableDiffusion Model, our VideoControlNet is also general and can be applied to any type of input video. Therefore, we evaluate our method on various video datasets including the video coding datasets HEVC dataset (Sullivan et al., 2012), UVG dataset (Mercat et al., 2020), and MCL-JCV datasets (Wang et al., 2016). Following the previous video translation works (Bar-Tal et al., 2022), we evaluate our VideoControlNet framework on the DAVIS dataset (Pont-Tuset et al., 2017), which also contains various types of videos.

Implementation Details. In this work, we use the pre-trained StableDiffusion model (Rombach et al., 2022) in version 1.5 with the ControlNet (Zhang and Agrawala, 2023) for I-frame generation and our motion-guided P-frame generation (MgPG) module. Specifically, we use the released models from the official GitHub repository of ControlNet, in which we use the depth map and canny map condition model. We use the DDIM Sampler (Song et al., 2020a) as the sampling strategy and sample 20 steps for both I-frame generation and the inpainting process of P-frames. For optical flow estimation, we adopt the pre-trained model from the official GitHub repository of Flowformer (Huang et al., 2022).

In our experiments, we set the GoP size gg as 10. The weights of α\alpha and β\beta are set as 5 and 10, respectively. The thresholdthreshold for generating the inpainting mask is simply set as 0.5. We set the temperature τ\tau as 20. In our inpainting mask generation module, we further apply the Gaussian Blur operation to expand the inpainting area of the occupancy map and use the min-pooling operation to generate the inpainting mask in latent space. All of our experimental results are generated on the machine with Tesla V100 GPU with 16GB GPU memory. We resize the input videos to 960×540960\times 540 for evaluation.

2. Quantitative Results

User Study. We conduct a user study to evaluate the generation quality of our method, the SOTA diffusion-based video-to-video translation method Text2Video-Zero (Khachatryan et al., 2023) and the SOTA video style transfer method CCPL (Wu et al., 2022b). Considering the previous non-diffusion-based video generation methods cannot support text-based instruction, we evaluate the SOTA video style transfer method CCPL (Wu et al., 2022b) by using the most relevant image of the text prompt as the style image.

We selected 100 video-prompt pairs for evaluation and use the official code and the default parameters for each method, in which the videos are from the DAVIS dataset (Pont-Tuset et al., 2017). For each user, 30 video-prompt combinations are randomly selected. Finally, we collected 720 votes from 24 users. The preference percentages of Text2Video-Zero (Khachatryan et al., 2023), CCPL (Wu et al., 2022b) and our VideoControlNet are provided in Table 1. Our VideoControlNet outperforms previous methods Text2Video-Zero (Khachatryan et al., 2023) and CCPL (Wu et al., 2022b) by a large margin and achieves 74.7% user preference. It is observed that the generated videos of Text2Video-Zero lack temporal consistency. Although CCPL sometimes achieves comparable results on specific prompts, most generated videos are much worse than the results of our VideoControlNet.

Objective Metrics. We further provide the quantitative results on the DAVIS dataset (Pont-Tuset et al., 2017) in Table 2, in which the video names (e.g., bus, dogs-jump, hike, paragliding-launch) are used as the text prompts. We use the objective metrics including Fréchet Video Distance (FVD) (Unterthiner et al., 2018), Inception Score (IS), Fréchet Inception Distance (FID) (Heusel et al., 2017), average CLIP (Radford et al., 2021) similarity between video frames and text (CLIPSIM), LPIPS (Zhang et al., 2018) and the L2 distance between the optical flow (Ranjan and Black, 2017) of the input video and the generated video (Optical Flow Error).

Considering the video style transfer method CCPL (Wu et al., 2022b) directly takes the video as input while our method and Text2Video-Zero (Khachatryan et al., 2023) only take the conditions (e.g., depth map, edge map) of the input video as input, we only compare our method with the SOTA video-to-video translation method Text2Video-Zero (Khachatryan et al., 2023). We also report the running speed of both methods when generating the video with 40 frames and with the resolution of 960×540960\times 540. It is observed that our method outperforms the SOTA diffusion-based method Text2Video-Zero (Khachatryan et al., 2023) in terms of all metrics including FVD, IS, FID, CLIPSIM, LPIPS and Optical Flow Error on the DAVIS dataset with faster inference speed, which demonstrate the effectiveness of our method.

3. Qualitative Results

We take the Text2LIVE (Bar-Tal et al., 2022) method as the baseline method to demonstrate the effectiveness of our proposed VideoControlNet. Text2Live (Bar-Tal et al., 2022) is recently proposed for text-guided video editing that adopts layered neural atlases (Kasten et al., 2021), which needs to fine-tune on each video and runs extremely slow. We use their official code and the provided configuration to generate the video.

The experimental results are provided in Figure 5, in which simple prompts below the input video are used for both Text2LIVE and our VideoControlNet. It is observed that the generated video of our method has better visual quality than the generation results from Text2LIVE due to the strong generation quality of StableDiffusion. For example, in the snow scene, the road of our generated video is more realistic than the output of Text2LIVE. We also observe that the Text2LIVE method achieves good temporal smoothness due to its reliance on Layered Neural Atlases (Kasten et al., 2021). However, the generation quality of Text2Live outputs varies a lot on different types of videos. For example, in the nighttime scene, the road is illuminated without street lights. Moreover, the inference speed of Text2Live is extremely slow and it even requires more than 10 hours for editing a single video, while our method generates the video at about 3.4 seconds per frame. Finally, it is shown that the generated content of our method is consistent with the input video, which makes it able to use the corresponding optical flow to generate the output video by using our proposed VideoControlNet. The experimental results demonstrate that our method achieves better generation quality than the previous methods and can also keep the content consistent.

4. Model Analysis

Results when using Different Conditions. In this work, we use the canny maps and depth maps as the condition information for the ControlNet (Ni et al., 2023) to generate the output video that has the same content as the input video. In Figure 6, we provide the generated results when using different conditions. It is observed that when using the depth map as the condition of ControlNet, the generated results are more spatial and three-dimensional. For example, the generated fishes conditioned on the depth map are more three-dimensional than the results conditioned on the canny map. When using the canny map as the condition of ControlNet, the generated results contain more details (e.g., the bear fur). Therefore, we can condition the canny map for more detailed 2D image generation and use the depth map for generating 3D results.

Generation of the Inpainting Mask. Our inpainting masks are generated based on both occlusion maps and residual maps for generating the newly occurred areas for the current frame. To better illustrate our inpainting mask generation process, we visualize the residual map, the occlusion map and our final inpainting mask IiI_{i} in Figure 7. It is observed that most occlusion areas can be found in our occlusion map (e.g., the left side of the woman), which is generated by using the forward warping operation based on the reverse optical flow. However, the motion information between the neighbor P frames may be very large and thus the optical flow estimation network may not generate accurate motion information. To this end, we additionally use the residual map for detecting the occlusion areas. Additionally, the residual map shown in Figure 7 is very sparse. Therefore, it is also not reliable if we only use the residual map to generate the inpainting mask. To this end, we use both the residual map and the occlusion map for generating the inpainting mask. As shown in Figure 7(f), the occlusion areas are well masked by the inpainting mask, which demonstrates the effectiveness of our inpainting mask generation module.

Running Speed. The detailed running time of different modules is provided in Table 3. We evaluate our inference speed on the machine with a single Tesla V100 GPU. The input videos are resized to the resolution of 960×540960\times 540. The GoP size gg is set as 10 and we use 20 diffusion steps. It is observed that the StableDiffusion model with ControlNet needs 13.7s for generating the I-frame or inpainting the occlusion areas of P-frames. The inpainting mask generation module costs 0.97s, in which the main part of the time is spent on the optical flow estimation network (Huang et al., 2022). Due to the fast speed of our motion-guided B-frame interpolation which costs 1.9s per frame, our average generation speed is about 3.4s per frame when generating 4 GoP of images with g=10g=10. Therefore, our proposed VideoControlNet framework is even faster than generating the output video frame-by-frame by using StableDiffusion Model with ControlNet, which requires 13.7s per frame.

Discussion of Applications. Our VideoControlNet achieves video-to-video translation by using motion information, in which the content of the input video should be consistent with the output video. Therefore, the most straightforward application is the video style transfer, which can achieve various styles based on different given prompts. Additionally, our method can also achieve video editing with the extra mask of the object to be edited. In conclusion, our method can be regarded as a video version of the ControlNet, that is able to control the content and motion information based on the given input video and prompts. Unfortunately, due to the detailed motion information, the condition should be more strong that can control the details of the output photo. Therefore, the segmentation map or human pose can not be used as the condition of our VideoControlNet. More results are provided in our appendix.

Conclusion

In this work, we propose a new video-to-video translation framework called VideoControlNet based on the StableDiffusion model with ControlNet, in which the motion information is adopted for better content consistency. We first generate the I-frame and then divide the rest frames into different groups of pictures (GoP), in which the last frame of each GoP is set as the P-frame and others are B-frames. For the P-frame generation, we propose the motion-guided P-frame generation (MgPG) module to prevent the regeneration of the occlusion areas and only inpaint the occlusion areas. For the B-frame generation, we propose the motion-guided B-frame interpolation (MgBI) module to directly interpolate the B-frames by using the two nearest I/P frames as the reference frame. The experimental results demonstrate that our VideoControlNet framework achieves impressive video generation results with high-quality content and good content consistency with the motion information from the input video. In our future work, we will study adding more learnable networks for better content consistency.

References

Appendix A Video Examples

In our main paper, we provide some examples of the generated videos in Figure 1, in which only a few images in the video are shown. To further demonstrate the effectiveness of our proposed VideoControlNet, we provide the video examples in our project page. It is observed that our generated videos have the same motion and content as the input video and our VideoControlNet can generate various types of videos based on any type of input video and prompts.

Appendix B Illustration of Occlusion Map Generation

In our inpainting mask generation module, a OnesOnes map is forward warped based on the optical flow Mi→i−gM_{i\rightarrow i-g} for generating the occlusion map OiO_{i}. Backward warping is the widely used operation for motion compensation and the optical flows are always generated for backward warping. However, we cannot figure out the locations that are newly occurred in the current frame by using the backward warping operation. Therefore, we use the forward warping operation to figure out the newly occurred areas. As shown in Figure 9, the background is moving towards the left side and the woman has only little movement. Therefore, by using the forward warping based on the OnesOnes map, the values on the left side of the woman move to the left, and the values inside the woman still stay inside, which makes it easy to find out the occlusion areas at the left side of the woman. By using both the occlusion map and the residual map, we can find out the areas to be inpainted.

Appendix C Applications

As discussed in our main paper, our VideoControlNet framework is able to achieve applications like style transfer and video editing. Therefore, we provide more visualization results in the supplementary materials.

As shown in Figure 8, we provide the style transfer results of our proposed VideoControlNet. The first row contains the input video and the other rows are the generated results of different styles, in which the styles are controlled by the prompts. It is observed that our VideoControlNet framework is able to translate the input video into different styles including the oil painting style, cartoon style, Chinese painting style and watercolor style, which further demonstrate the effectiveness of our method. We also provide more video style transfer results in our project.

C.2. Video Editing

The video editing results are provided in Figure 10. Given the input video and the masks that needed to be edited, our VideoControlNet can generate the output video that edits the content based on the given masks and prompts. For example, for the output video in the last row of Figure 10, we masked the man that is hiking and the corresponding prompt is “a robot is hiking”. Therefore, our method can generate a robot that is hiking. Note that our masks are generated by using the official code of “Segment Anything” (Kirillov et al., 2023). We also provide more video editing results in our project.