RectifID: Personalizing Rectified Flow with Anchored Classifier Guidance

Zhicheng Sun, Zhenhao Yang, Yang Jin, Haozhe Chi, Kun Xu, Liwei Chen, Hao Jiang, Yang Song, Kun Gai, Yadong Mu

Abstract

Personalizing text-to-image (T2I) models to generate specific identities typically requires either computationally intensive subject-specific fine-tuning or large-scale pre-training of specialized adapters. We present RectifID, a training-free framework that enables high-fidelity personalization using off-the-shelf discriminators. By reformulating classifier guidance as a fixed-point problem anchored to a reference trajectory within the Rectified Flow framework, RectifID allows standard "clean-image" discriminators to steer the generation process. Our method achieves state-of-the-art identity preservation across faces and objects without the need for domain-specific training.

Introduction

The ability to generate images of specific people or objects—known as personalization—is a significant frontier in generative AI. Current approaches generally fall into two categories: fine-tuning methods like DreamBooth, which are slow and resource-heavy, and adapter-based methods like IP-Adapter, which require massive datasets and often struggle to generalize beyond their training domain (e.g., from faces to household objects).

RectifID introduces a third paradigm: training-free classifier guidance. While traditional classifier guidance requires "noise-aware" models trained on degraded images, RectifID leverages the mathematical properties of Rectified Flow to utilize standard, high-quality discriminators (such as ArcFace or DINOv2) to guide the generation process toward a target identity.

Methodology

Rectified Flow and the Fixed-Point Problem

Rectified Flow models learn to transport probability distributions along straight-line trajectories. RectifID exploits this linearity. The authors demonstrate that because the trajectories are ideally straight, the guidance problem can be reformulated as a fixed-point iteration. This mathematical shortcut allows the system to estimate the necessary guidance by looking at the "clean" endpoints of the generation path, bypassing the requirement for classifiers to understand intermediate noisy states.

Anchored Guidance

To ensure stability, RectifID introduces Anchored Guidance. Pure gradient descent on initial noise is often unstable and can lead to image artifacts. By anchoring the guided trajectory to a reference (unguided) trajectory, the model ensures that the generated image retains the layout and composition of the original prompt while successfully adopting the target identity. This anchoring provides a convergence guarantee, preventing the iterative solver from diverging.

Plug-and-Play Architecture

Because RectifID is training-free, it is highly modular. Users can swap discriminators depending on the task:

  • Faces: ArcFace is used for high-precision facial recognition.
  • General Objects: DINOv2 provides robust feature matching for diverse subjects.
  • Spatial Control: Object detectors like OWL-ViT are integrated to focus guidance on specific regions, enabling the personalization of multiple subjects within a single frame through bipartite matching.

Experimental Results

Performance Benchmarks

RectifID was evaluated against several state-of-the-art baselines, including Textual Inversion, DreamBooth, IP-Adapter, and InstantID, using the CelebA-HQ and DreamBooth datasets.

  • Identity Fidelity: In face-centric evaluations, RectifID (using a Stable Diffusion 1.5 base) achieved an identity similarity score of 0.5930. This outperformed more complex SDXL-based models such as InstantID (0.5806) and PhotoMaker (0.2271).
  • Efficiency: While slower than one-shot adapters, RectifID is significantly faster than fine-tuning. Inference takes between 9 and 46 seconds on an NVIDIA A800 GPU, making it a viable option for interactive applications.
  • Versatility: The method successfully handles non-human subjects, such as pets and inanimate objects (e.g., teapots, vases), where many face-specific models fail.

Discussion and Limitations

RectifID's primary strength lies in its "straightness shortcut," which simplifies the complex math of diffusion guidance into a manageable optimization problem. However, the method is not without limitations:

  1. Structural Complexity: The system occasionally struggles with objects exhibiting extreme structural variations (e.g., specific plush toys) where simple feature-similarity losses are insufficient.
  2. Computational Overhead: The iterative nature of the backpropagation through the discriminator makes it slower than feed-forward adapter methods.
  3. Discriminator Quality: The effectiveness of the personalization is inherently capped by the performance of the chosen off-the-shelf discriminator.

Conclusion

RectifID demonstrates that high-fidelity personalization does not strictly require expensive training or massive datasets. By leveraging the geometric properties of Rectified Flow and anchoring guidance to stable trajectories, RectifID provides a flexible, training-free solution for identity-consistent image generation across a wide array of domains.

Summary updated

BibTeX
@inproceedings{sun2024rectifid,
  author = {Zhicheng Sun and Zhenhao Yang and Yang Jin and Haozhe Chi and Kun Xu and Liwei Chen and Hao Jiang and Yang Song and Kun Gai and Yadong Mu},
  title = {{RectifID: Personalizing Rectified Flow with Anchored Classifier Guidance}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=KKrj1vCQaG},
}
Figure