SVP: Style-Enhanced Vivid Portrait Talking Head Diffusion Model
Weipeng Tan Chuming Lin Chengming Xu Xiaozhong Ji Junwei Zhu Chengjie Wang Yanwei Fu


[
    
    [
    [
    September 5, 2024
=====================



	type=figure
	
    < g r a p h i c s >
 
	

	figureIn talking head generation, given a audio and the reference image, both the GAN-based method SadTalker and the diffusion-based method V-Express have generated monotonous portrait videos, in which the primary movement is observed in the lips. In contrast, our approach is capable of generating diverse and vivid portrait videos based on varying intrinsic styles.
	
    

]

 
[1]Equal contributions. This work was done when Weipeng Tan was an intern at Tencent Youtu Lab.




§ ABSTRACT 
Talking Head Generation (THG), typically driven by audio, is an important and challenging task with broad application prospects in various fields such as digital humans, film production, and virtual reality. While diffusion model-based THG methods present high quality and stable content generation, they often overlook the intrinsic style which encompasses personalized features such as speaking habits and facial expressions of a video. As consequence, the generated video content lacks diversity and vividness, thus being limited in real life scenarios. To address these issues, we propose a novel framework named Style-Enhanced Vivid Portrait () which fully leverages style-related information in THG. Specifically, we first introduce the novel probabilistic style prior learning to model the intrinsic style as a Gaussian distribution using facial expressions and audio embedding. The distribution is learned through the `bespoked' contrastive objective,  effectively capturing the dynamic style information in each video. Then we finetune a pretrained Stable Diffusion (SD) model  to inject the learned intrinsic style as a controlling signal via cross attention. 


Experiments show that our model generates diverse, vivid, and high-quality videos with flexible control over intrinsic styles, outperforming existing state-of-the-art methods.





    


§ INTRODUCTION





Recent advancements in generative models have shed light on generating high-quality and realistic videos under various controlling conditions such as texts <cit.>, images <cit.>, videos <cit.>, etc. Among all the different subtasks of video generation, Talking Head Generation (THG), as a human-centric task which aims to generate videos of talking heads guided by conditions such as speech and images, has emerged as a significant problem due to its wide application in scenarios such as digital humans, film production, virtual reality. In spite of its importance, this is one of the most challenging tasks in video generation, resulted from its low tolerance to artifacts in general and its demand of high fidelity in lip shapes, facial expressions, and head motions. 






Following the commonly used generative models, the GAN-based THG methods <cit.> have achieved remarkable results in generating high-resolution videos through adversarial training between generators and discriminators, particularly in terms of visual quality and lip-sync accuracy. 

Diffusion model-based THG methods <cit.>, on the other hand, excel in generating high-quality and high-resolution images and videos, and it outperforms GANs in terms of the stability and consistency of the generated content, thus becoming the mainstream methods for THG. 


These methods largely facilitate THG by strengthening the explicit controlling conditions such as facial keypoints and head motion sequences. However, they generally ignore the important fact of talking head videos. Essentially, when different people present speeches in real-life cases, they could have significant differences in habits and emotions under various circumstances. Such a fact in turn leads to different attributes in the corresponding talking head videos, including the visemes and expressions. Consequently, these habits and emotions are embedded as the intrinsic style in talking head videos. This intrinsic style, while being highly related to whether a video is realistic, can hardly be inferred from conditions such as facial keypoints which are widely adopted by the previous methods. As a result, when there is a large gap in the intrinsic style between the reference face and the speaker of the style reference video, the previous methods struggle to reproduce the real situation accurately. 


To this end, we propose a novel framework named , which can effectively extract intrinsic style features with the assistance of audio information through a self-supervised method, and apply them to the generation of talking head videos in a manner suitable for diffusion models. This approach not only improves the overall quality of the generated videos, ensuring better synchronization and control but also accurately transfers facial expressions and individualized details to new faces.


Specifically, our  focuses on two main problems, i.e. extracting intrinsic style embeddings from style reference videos and controlling diffusion models with such embeddings. For intrinsic style extraction, a naive solution would be following StyleTalk <cit.>, which maps 3D Morphable Model (3DMM) <cit.> expression coefficients of the style reference video to style-related features. However, since attributes like visemes and expressions vary along the video frames, the deterministic embedding would suffer from insufficient capacity to model the latent manifold of intrinsic styles. Moreover, as one of the main parts of the video, the use of corresponding audio, which contains abundant information regarding the intrinsic styles, was not explored in StyleTalk, leading to unrepresentative style embeddings.

To solve these problems, we propose the novel Probabilistic Style Prior Learning as an alternative based on the transformer backbone. Concretely, the audio and visual information of each video interacts with each other in the transformer style encoder, which models the intrinsic style of this video as a Gaussian distribution with predicted mean and standard deviation. Through contrastive learning, the extracted features exhibit significant clustering across different identities and emotions, not only helping the model better understand the video content but also providing an effective way to capture and express the intrinsic style of individuals. After achieving the intrinsic style, it is integrated into the denoising process of target videos via additional cross attention, along with other conditions including the simplified facial keypoints for head movements and audio for lip shapes and movements around the mouth. Thanks to the design of the probabilistic style prior, we can resample from the predicted distributions to provide enough variation for the style-related information, thus resulting in the strong generalization ability of the trained model. 













To validate the effectiveness of our proposed method, we conduct extensive experiments and comparisons on the MEAD and HDTF datasets. Our method significantly outperforms other competitors across multiple metrics, including FVD, FID, PSNR, and SSIM. In addition to quantitative evaluation, we also perform comprehensive qualitative assessments. The results indicate that our method can generate highly natural and expressive talking videos, and can produce different emotions or even multiple changes in expressions within the same video according to user needs, achieving satisfactory visual effects.



Overall, our contributions are summarized as follows:



  * We are the first to propose an audio-driven talking head generation framework based on a diffusion model that considers intrinsic style.  can generate realistic talking head videos with different intrinsic styles from the style reference videos. 


  * We propose an intrinsic style extractor that captures and expresses the intrinsic style of individuals through a self-supervised approach. We also incorporate audio information as an auxiliary into the intrinsic style extractor, leveraging subtle variations and emotional information to enhance the intrinsic style features. This allows the model to more accurately reflect the emotions and habits of speakers.


  * We design a resampling method suitable for diffusion models, enhancing the stability and generalization.







§ RELATED WORK





  
GAN-Based Talking Head Generation.
There has been significant research on GAN-based methods for person-generic audio-driven talking head generation. Early methods <cit.> achieved lip synchronization by establishing a discriminator that correlates audio with lip movements. Other approaches <cit.> generated portrait videos by mapping audio to key facial information, such as landmarks, key points, or 3D Morphable Model (3DMM) <cit.> coefficients, before rendering the final frame. However, due to the limitations of GANs in terms of generative capacity, the results produced by these methods often suffer from artifacts like pseudo-textures or restricted motion ranges.



  
Diffusion Model-Based Talking Head Generation.
Recently, there has been a surge of research  <cit.> utilizing diffusion models to achieve high-quality portrait videos. Among these, X-Portrait <cit.> and MegActor <cit.> rely on the pose and expression from the source video to generate the target video, which limits their ability to produce videos based solely on audio. DiffTalk <cit.> was the first to modify lip movements using audio in conjunction with diffusion models, but it does not extend to driving other head parts. EMO <cit.> was the first to leverage LDM <cit.> and audio features to achieve overall motion in portraits. V-Express <cit.> controls the overall motion amplitude by adjusting audio attention weights, while Hallo <cit.> designed a hierarchical module to regulate the motion amplitude of different regions. In summary, current audio-driven diffusion model approaches have not taken into account that each portrait should exhibit a corresponding style while speaking, which is essential for generating higher-quality portrait videos.



  
Stylized Talking Head Generation.
Previous research has explored several GAN-based methods  <cit.> for extracting style information to apply in talking head generation.  <cit.> and  <cit.> directly inject labels into the network to drive the corresponding emotions.  <cit.> and  <cit.> map the facial expressions of each frame in the source video to each frame in the target video.  <cit.> and  <cit.> employ 3D Morphable Models (3DMM) to extract facial information and construct style codes that drive the desired styles. Building on these approaches, our framework is the first to propose the extraction of intrinsic style priors by integrating audio and 3D facial information. Additionally, we design a probabilistic learning to enhance style control within diffusion models.


§ METHOD





  
Problem Formulation.
The goal of THG is to generate a talking head video under the control of a reference image, audio, Head-Kps image sequence, and intrinsic style prior. Among these conditions, the reference image controls the background and facial identity. The audio guides the lip movements. Each Head-Kps image controls the head pose for each generated frame. The Head-Kps images are synthesized by mapping 8 facial keypoints (i.e., left and right edges, the pupils of both eyes, and the bridge of the nose) onto a black background. In addition, we propose the probabilistic style prior learning to extract the style prior from a style reference video, which is used to determine facial emotion and speaking habits.





  
Preliminaries.
In , we employ a Latent Diffusion Model (LDM) <cit.> to generate video frames. The LDM uses a diffusion and denoising process in the latent space via a Variational Autoencoder (VAE). It maps the input image x to the latent space, encoding the image as z=E(x), which helps maintain visual quality while reducing computational cost. During the diffusion process, Gaussian noise ϵ∼𝒩(0,𝐈) is gradually introduced into the latent z, degrading it into complete noise z∼𝒩(0,𝐈) after T steps. In the reverse denoising process, the target latent z is iteratively denoised from the sampled Gaussian noise using the diffusion model and then decoded by the VAE decoder D into the output image x=D(z). During training, given the latent z_0 =E(x_0 ) and condition c, the denoising loss is:

    ℒ_denoising=𝔼_𝐳_t,ϵ,𝐜,tϵ_θ(𝐳_t,𝐜,t)-ϵ_t^2.

Among them, z_t = √(α_t)z_0 + √(1-α_t)ϵ_t  represents the noisy latent variables at timestep t∈[1,T], and ϵ_t  is the added noise. ϵ_θ is the noise predicted by the UNet model, modified using an attention mechanism with parameters θ. This model employs a cross-attention mechanism to fuse the condition cc with the latent features z_t , thereby guiding the image generation.
 uses Stable Diffusion v1.5 (SDv1.5), a text-to-image Latent Diffusion Model (LDM), as the backbone. SDv1.5 is implemented based on U-Net <cit.>, with each Transformer <cit.> block containing both self-attention and cross-attention layers. 




  
Overview.
As depicted in Figure <ref>, Our  consists of two important designs, namely Probabilistic Style Prior Learning and Style-Driven Diffusion Process. In Probabilistic Style Prior Learning, we propose the style extractor takes the 3DMM expression parameters and audio features as inputs to generate the style prior, which is represented as a Gaussian distribution. In the Style-Driven Diffusion Process, the reference image, Head-Kps sequences, audio features, and the style prior are input as control conditions into the Denoising UNet through Head-Kps Guider and attention layers. Finally, the vivid portrait frames are generated by the VAE decoder after the iteration of the denoising process.



 §.§ Probabilistic Style Prior Learning 

In order to learn representative intrinsic style indicators from style reference videos, we propose the novel probabilistic style prior learning. Built upon the transformer-based style encoder as in StyleTalk <cit.>, we adopt a novel framework to make better usage of the style-related information contained in each video. Concretely, for a video clip, we first transform it into its corresponding frame-level audio parameters α∈ℝ^N×1920 via Whisper-Tiny <cit.> and sequential expression parameters β∈ℝ^N× 64 via the 3DMM encoder, where N denotes number of frames. These two modalities are then processed with a dual-branch transformer model as shown in Figure <ref>, which outputs their counterparts ŝ^α, ŝ^β∈ℝ^N× d_s, where d_s denotes feature channels. After achieving features for each modality, we interact with them with cross attention, leading to a style-related embedding ŝ aware of both audio and visual information. 

With ŝ, we can then model the intrinsic style prior for each video as a Gaussian distribution. Specifically, an attention-based aggregation strategy is employed on ŝ as follows:

    μ_s    = softmax(W_sŝ)·ŝ^T,
    σ_s    = softmax(W_s ŝ)·(ŝ^T-μ_s)^2,
    
        s    = μ_s + σ_s ·ϵ,   ϵ∼𝒩(0, 𝐈),

where W_s∈ℝ^1× d_s is a trainable parameter, μ_s, σ_s denotes the mean and variance of the learned style prior s.


Compared with the naive style encoder used in StyleTalk <cit.>, our proposed model mainly enjoys the following merits: (1) As mentioned in Sec. 1, the audio information is vital for extracting intrinsic style, while StyleTalk cannot handle such a modality. Moreover, audio typically contains primarily information about the spoken content, thus making it non-trivial to extract information that is complimentary to the visual information contained in video frames. In comparison with StyleTalk, we design a specific structure to handle these complex data, considering both visual and audio information, leading to stronger style embedding. (2) Since the emotion of speakers would change as the video frames go on, it is sufficient to represent the intrinsic style with a deterministic feature, i.e. the same way as in StyleTalk. Our method, on the other hand, learns a better sequential embedding, which helps us model the style prior as a Gaussian distribution that is more representative.













 §.§ Style-Driven Diffusion Process

After learning the intrinsic style prior from style reference videos, we can then control the talking head generation process with such a condition. Specifically, we build a talking head generation model based on previous methods such as V-Express <cit.>. These methods apply various techniques to pretrained Stable Diffusion (SD) for better quality, including ReferenceNet for referencing an image, Audio Projection for embedding audio information, and temporal attention layer to enhance temporal coherence. In addition to these existing methods, we further propose two novel modules named HEAD-Kps Guider and Style Projection as follows that can better facilitate the input data.



  
HEAD-Kps Guider. Each HEAD-Kps image spatially corresponds to the respective target frame. To fully utilize this, we use the HEAD-Kps Guider to encode the HEAD-Kps images. The Head-Kps images are constructed using landmarks from the upper half of the face, consisting of 8 keypoints. The HEAD-Kps Guider is a lightweight convolutional model that encodes each HEAD-Kps image into HEAD-Kps features, which match the shape of the latent. Subsequently, before being input into the denoising U-Net, the multi-frame latent features are directly added to the corresponding encoded HEAD-Kps features.



  
Style Projection. To utilize the intrinsic style prior calculated in Sec. 3.1 to guide the denoising process, we first resample a style prior s from the learned Gaussian distribution. Then s is injected into the diffusion UNet through an additional style attention layer along with the specific cross attention layers for audio and temporal information.





 §.§ Training Strategies



  
Training of Intrinsic Style Extractor. Essentially, codes with similar intrinsic styles should cluster together in the style space. Therefore we apply contrastive learning to the style priors by constructing positive pairs (s, s^p) with the same identity and emotion, and negative pairs  (s, s^n) with different identities or emotions. Then, the InfoNCE loss <cit.> with similarity metric ζ is enhanced between positive and negative sample pairs:

    ω(s̃)    = exp(ζ(s, s̃) / τ), 
    ℒ_con   = -log(ω(s^p)/ω(s^p)+∑_s^n∈𝒮^nω(s^n)),





where τ denotes a temperature parameter, 𝒮^n denotes all negative samples for s, and the similarity ζ(s_i, s_j)=1/s_i,s_j_2+1∈ (0,1] is an improved version obtained as the inverse of the ℒ_2 distance between sample pairs. We additionally add a fixed constant to stabilize the numerical range of the similarity and make the training process more stable.

In the training of the intrinsic style extractor, we directly train all parameters of this lightweight model. Meanwhile, we use a random dropout trick when inputting the 3DMM expression coefficients β and audio features α by setting some of the input 3DMM expression coefficients β or audio features α to zero. This allows the model to obtain the style prior through a single modality.



  
Finetuning Diffusion Model.
The training of the diffusion model adopts a three-stage progressive training method to gradually improve the model's generative capability and stability, with the noise prediction loss as in Eq. <ref> employed in each stage. (1) First, we train the model for single-frame image generation, where the diffusion UNet, ReferenceNet, and Head-Kps guider are involved in the training. In this stage, the diffusion UNet takes a single frame as input, the ReferenceNet processes different frames randomly selected from the same video clip, and the Head-Kps guider incorporates the encoded Head-Kps features into the latent space. Both the diffusion UNet and ReferenceNet initialize their weights from the original SD. (2) Second, we train the model for continuous multi-frame image generation, which includes the temporal module and the audio layer. In this stage, f consecutive frames are sampled from a video clip and the parameters of ReferenceNet and Head-Kps guider are frozen. The temporal module initializes its weights from AnimateDiff <cit.>. (3) After that the final stage is for transferring intrinsic style. In this stage, all other modules of the model are frozen, and only the style attention module is trained. This allows the model to generate corresponding facial expressions and details based on the intrinsic style input during the portrait image generation process.






§ EXPERIMENTS
































 §.§ Experiments Setting


 is implemented using PyTorch <cit.> and optimized with Adam <cit.>.
The intrinsic style encoder is trained on the MEAD <cit.> and HDTF <cit.> datasets. 


During training, we consider samples with the same identity and emotion in MEAD as positive samples, and segments from the same video in HDTF as positive samples. Additionally, we will randomly dropout expression coefficients or audios, but they will not be zeroed out simultaneously.

The denoising UNet is trained on the MEAD, HDTF, and other videos from Internet. The facial regions in these videos are cropped and resized to 512×512. The total training dataset comprises approximately 300 hours of video.

In the multi-frame training stage, the number of consecutive frames f is set to 8.

In the training of style projection, to enhance the generalization ability, we adopt different emotions for the same identity on the MEAD dataset (e.g. generating a sad video clip from a happy reference image). 


For training and testing set splitting, we select 10 identities out of 46 for testing on MEAD. As for HDTF, we randomly select 25 videos for testing. Precautions are taken to ensure that there is no overlap of character identities between the training and testing sets. During inference, to ensure fairness, we utilize EulerDiscreteScheduler as diffusion sampler with the denoising steps set as 25 for all diffusion-based methods.




 §.§ Quantitative Comparison

We compare our method with several previous works, including SadTalker <cit.>, AniPortrait <cit.>, V-Express <cit.>, and Hallo <cit.>.

To demonstrate the superiority of the proposed method, we evaluate the model using several quantitative metrics. We utilize the Fréchet Inception Distance (FID) <cit.> to assess the quality of the generated frames, and further employe the Fréchet Video Distance (FVD) <cit.> for video-level evaluation. To evaluate the quality of the generated talking head videos, Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index Measure (SSIM) are adopted. To evaluate lip-sync accuracy, we use the Mouth Landmark Distance (M-LMD) <cit.>. For assessing the accuracy of the generated facial expressions, we use the Full-Face Landmark Distance (F-LMD). 

As shown in Table <ref>, in the video reconstruction experiments, our method achieves the best performance across all the metrics on both MEAD and HDTF datasets. We have a significant advantage in evaluating the quality of video and single-frame images, as evidenced by the lower FVD and FID scores. The SSIM and PSNR scores indicate that the quality of the videos reconstructed by our method is significantly better than that of other methods. The M-LMD scores demonstrate that our method achieves more accurate lip-sync, while the F-LMD scores reflect that our method better restores facial expressions through intrinsic style. These results indicate that using intrinsic style can significantly enhance the quality of video generation.

To demonstrate the intrinsic style transfer capability of our method, we conducted expression transfer experiments in addition to video reconstruction experiments. This experiment can only be performed on the MEAD dataset, which contains multiple emotions for a single identity. Specifically, we used the neutral expression faces from the dataset as references and used videos with distinct expressions (such as happy, sad, and angry) to drive the generation. In such an experimental setup, methods that rely solely on audio for driving expressions struggle to effectively convey the corresponding emotions.

In this scenario, our method still maintains its superiority. As shown in Table <ref>, although the results of all methods deteriorate compared to the reconstruction experiments,  still leads in all metrics.



 §.§ Qualitative Comparison



In Figure <ref>, we present a comparison of the visual effects between ours and other methods. The first two rows show the comparison of reconstruction results, while the last two rows show the comparison of intrinsic style transfer results. In the reconstruction experiments, our method achieves accurate synchronization of head movements, lip shapes, and even eye blinking, while effectively preserving the identity of the speaker. In the intrinsic style transfer experiments, when there are significant differences in expressions between the reference face and the real video, our method effectively transfers the expressions and details of the face in the style reference video, while maintaining consistency in other conditions.



 §.§ Ablation Study



  
Probabilistic Style Prior Learning.
In diffusion models, if we do not employ a probabilistic learning and instead use a deterministic style prior for training, it may lead to overfitting of the training results.

Figure <ref> shows the results of different intrinsic style acquisition methods. Using a deterministic intrinsic style causes the model to transfer (eye reflections/facial contours) from the style reference video to the new face, leading to issues with identity deviation. By employing the probabilistic learning and resampling method, the intrinsic style prior obtained by the model from the same training video varies each time, thereby preventing the transfer of incorrect content to the generated video.





  
Intrinsic Style Extractor with Audio Information.
Table <ref> provides a quantitative evaluation of the clustering strength of intrinsic style after incorporating audio features. We define clustering strength d_cls as the ratio between inter-cluster distance d_inter and intra-cluster distance d_intra:

    d_cls = d_inter/d_intra.
A larger value indicates a better clustering performance. We used different emotions of a single identity as categories to calculate the clustering strength of the intrinsic style obtained under three conditions: using only expression coefficients, using only audio features, and using both features together. The results indicate that expression coefficients play a crucial role in the extraction of intrinsic style and audio features can indeed serve as an auxiliary to enhance the clustering strength of intrinsic style, while using audio features alone is insufficient to obtain effective intrinsic style.




  
What Can We Learn from Style Prior?
We use t-distributed Stochastic Neighbor Embedding (t-SNE) <cit.> to project the intrinsic style priors into a two-dimensional space. Figure <ref> shows the intrinsic style priors of a speaker from the MEAD dataset. Each code is color-coded according to its corresponding emotion and intensity. The style priors with the same emotion first cluster together. Within each cluster, the style priors with the same intensity are closer to each other, and there are noticeable transitions between intrinsic style priors of different intensities. These observations indicate that our model can learn a continuous distribution of intrinsic styles. As shown in Figure  <ref>, when performing linear interpolation between two intrinsic style priors extracted from the test set, the facial expressions and details in the generated video transition smoothly.


§ CONCLUSION

We propose  as the first talking head video generation method capable of achieving intrinsic style transfer. Through the design and training of the intrinsic style extractor, we obtain intrinsic style priors which can sufficiently represent the emotions and habits of the style reference videos. By sampling from the style prior and progressive training, we successfully transfer intrinsic styles to unseen faces. Experimental results show that  not only transfers intrinsic styles but also improves the overall quality of the generated videos, providing new insights for more advanced and comprehensive talking head video generation.


























