HyperStyle3D: Text-Guided 3D Portrait Stylization via Hypernetworks

Zhuo Chen, Xudong Xu, Yichao Yan, Ye Pan, Wenhan Zhu, Wayne Wu, Bo Dai, Xiaokang Yang

TL;DR

HyperStyle3D introduces a zero-shot framework for 3D portrait stylization that transforms faces based on simple text prompts (e.g., "Pixar," "Bearded," "Fat"). By using a hypernetwork to predict weight offsets for a pre-trained 3D-aware GAN, the model achieves high-quality style transfer, shape deformation, and attribute editing in a single forward pass while maintaining perfect 3D consistency.

What Problem Does This Paper Address?

Portrait stylization—turning a real photo into a caricature, a painting, or an elf—is popular in gaming and the metaverse. While 2D methods (like StyleGAN-based editing) are highly advanced, they lack 3D consistency; if you rotate the stylized face, the features often "pop" or shift unnaturally.

Existing 3D stylization methods face three major hurdles:

  1. Data Scarcity: High-quality 3D stylized data is incredibly expensive and rare.
  2. Efficiency: Many current methods require time-consuming per-style optimization or fine-tuning.
  3. Entanglement: It is difficult to change a character's style (texture/color) without accidentally distorting their shape, or vice versa. Most models struggle with "overlying" manipulations—for example, making a character both "Pixar-style" and "Fat" simultaneously.

Methods

The authors propose HyperStyle3D, which builds upon a pre-trained 3D-aware GAN called StyleSDF. Instead of manipulating latent codes (which can be messy and instance-specific), they manipulate the parameter space of the generator itself.

The Hyper-Module

The core innovation is a Hypernetwork—a secondary network that takes a text prompt as input and predicts the "offsets" (changes) needed for the weights of the primary generator.

To solve the entanglement problem, they split the hypernetwork into three distinct levels:

  • Coarse Layers ($H_c$): Responsible for fundamental shape (e.g., "Fat," "Long face").
  • Medium Layers ($H_m$): Responsible for facial attributes (e.g., "Bearded," "Young").
  • Fine Layers ($H_f$): Responsible for general style and texture (e.g., "Pixar," "Painting").

Training with CLIP

The model is trained "zero-shot," meaning it never sees a 3D stylized face during training. Instead, it uses the CLIP (Contrastive Language-Image Pre-training) model to ensure the rendered 2D images match the target text description. They use a directional CLIP loss to guide the weight updates. To keep the person's identity recognizable, they incorporate an ID Loss (via ArcFace) and a Region Loss to ensure that editing one part of the face (like adding a beard) doesn't change unrelated parts (like the eyes).

Datasets

  • FFHQ: The primary dataset used for pre-training the base StyleSDF model on photorealistic faces.
  • Text Prompts: Evaluation is performed across diverse domains including "Painting," "Elf," "Disney Princess," "Ukiyo-e," "Pixar," "Renaissance," and "Botero."

Key Insights and Ideas

  • Parameter Space > Latent Space: The authors argue that the generator's weights contain more "essential and disentangled facial semantics" than the latent space ($W/W+$). By shifting weights, they find a more stable path for global stylization.
  • The 3/3/3 Split: Through ablation studies, they discovered that StyleSDF’s nine linear layers can be perfectly balanced into three groups of three. This specific architectural split allows for "overlying" edits—you can apply a shape change, an attribute change, and a style change simultaneously without the model getting "confused."
  • Hypernetworks for Generalization: Unlike methods that fine-tune a model for one specific style, the hypernetwork learns a general mapping from text-space to weight-space, allowing a single model to handle infinite styles.

Key Results

  • Qualitative Superiority: HyperStyle3D recovers significantly more facial detail and achieves better style realism than baselines that combine 2D style transfer with 3D GAN inversion.
  • 3D Consistency: Quantitative tests show that the depth error remains low (~1.52), meaning the 3D structure is preserved even under heavy stylization.
  • User Study: In a study with 20 participants, HyperStyle3D scored 4.0/5.0 in style realism, significantly outperforming the baseline score of 2.8.
  • Identity Preservation: Interestingly, the model sometimes achieved higher ID similarity scores after stylization because the exaggerated features made the facial identity more distinct to the recognition software.

Limitations and Future Work

While the paper demonstrates impressive results, some limitations are inherent:

  • Base Model Dependency: The quality is capped by the underlying 3D-aware GAN (StyleSDF). If the base model has artifacts in certain poses, the stylized version will too.
  • Extreme Deformations: While it handles "fat" or "long" faces well, extreme geometric caricatures that break the standard face topology might still be a challenge.
  • Future Directions: The authors suggest that this hypernetwork approach could be extended to other 3D representations beyond SDFs, such as Tri-planes or pure NeRF architectures.

Summary updated

Abstract

Portrait stylization is a long-standing task enabling extensive applications. Although 2D-based methods have made great progress in recent years, real-world applications such as metaverse and games often demand 3D content. On the other hand, the requirement of 3D data, which is costly to acquire, significantly impedes the development of 3D portrait stylization methods. In this paper, inspired by the success of 3D-aware GANs that bridge 2D and 3D domains with 3D fields as the intermediate representation for rendering 2D images, we propose a novel method, dubbed HyperStyle3D, based on 3D-aware GANs for 3D portrait stylization. At the core of our method is a hyper-network learned to manipulate the parameters of the generator in a single forward pass. It not only offers a strong capacity to handle multiple styles with a single model, but also enables flexible fine-grained stylization that affects only texture, shape, or local part of the portrait. While the use of 3D-aware GANs bypasses the requirement of 3D data, we further alleviate the necessity of style images with the CLIP model being the stylization guidance. We conduct an extensive set of experiments across the style, attribute, and shape, and meanwhile, measure the 3D consistency. These experiments demonstrate the superior capability of our HyperStyle3D model in rendering 3D-consistent images in diverse styles, deforming the face shape, and editing various attributes.
BibTeX
@article{chen2024hyperstyle,
  author = {Zhuo Chen and Xudong Xu and Yichao Yan and Ye Pan and Wenhan Zhu and Wayne Wu and Bo Dai and Xiaokang Yang},
  title = {{HyperStyle3D: Text-Guided 3D Portrait Stylization via Hypernetworks}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2024},
  doi = {10.1109/tcsvt.2024.3407135},
}

Loading related content...

Figure