Abstract
MagicNaming introduces a novel approach for generating consistent fictional identities in text-to-image (T2I) diffusion models without extensive fine-tuning. By identifying a dedicated "Name Space" ($\mathcal{N}$ Space) within text embeddings, the authors train an image-to-name encoder that maps facial features to unique name embeddings. This allows for seamless identity preservation across diverse prompts, scenes, and styles, treating generic individuals with the same consistency as well-known celebrities.
Introduction
Large-scale diffusion models like SDXL are remarkably proficient at generating celebrities because they have "memorized" their names and facial features during training. However, generating a consistent non-famous character—such as a protagonist for a graphic novel—remains a significant challenge. Current solutions typically involve slow fine-tuning (e.g., LoRA, DreamBooth) which can "break" model flexibility, or image-based conditioning (e.g., IP-Adapter) which often struggles to maintain identity in complex scenes or wide shots. MagicNaming proposes a third way: making the model treat a generic person exactly like it treats a celebrity by finding the internal representation of a "name."
Methodology: The $\mathcal{N}$ Space
The core innovation of MagicNaming is the discovery that identity information is localized within specific parts of the text embedding architecture. The researchers identified that the first 8 dimensions of a text embedding—the "name" positions—are primarily responsible for identity, a region they term the $\mathcal{N}$ Space.
The framework consists of three main components:
- Image-to-Name Encoder ($E_{image}$): A specialized encoder trained on a combination of CLIP-L and CLIP-G architectures. It maps a reference face to the exact 8x2048 embedding representing that person's "name" in the model's internal language.
- Name Prepending (NP): Instead of using placeholders, the predicted name embedding is prepended to the text sequence, avoiding confusion regarding identity localization.
- Identity-Aware Guidance: A modified Classifier-Free Guidance uses the mean of celebrity name embeddings as a baseline to effectively "push" generation toward the target identity.
To train this system, the authors curated LaionCele, a dataset of 42,000 celebrities and 810,000 images, using the T2I model's own text encoder to generate ground-truth embeddings for supervision.
Key Results and Insights
MagicNaming demonstrates superior performance in maintaining identity across radical changes in scene, action, and style. Unlike LoRAs, which often bias models toward close-up headshots, MagicNaming preserves the base model's ability to handle complex lighting and diverse artistic styles.
Quantitative evaluations show that MagicNaming achieves a higher ID Consistency (0.5624) and CLIP-TI score (38.24) compared to industry standards like IP-Adapter and PhotoMaker. It particularly excels in "Action Control" (e.g., "a woman riding a horse"), where competitors often fail to render the full scene while maintaining the face. Furthermore, because the $\mathcal{N}$ Space is continuous, users can mathematically blend name embeddings to create entirely new, consistent fictional characters.
Limitations and Future Work
While MagicNaming offers a powerful zero-shot solution, it is currently tied to the SDXL architecture and requires new encoders for different models like Flux or SD3. Additionally, the quality of the $\mathcal{N}$ Space is dependent on the diversity of the LaionCele training data. Future work may explore finding a middle ground between the general intelligence of this method and the high facial similarity sometimes achieved by specialized fine-tuning.
Summary updated