FineStyle: Fine-grained Controllable Style Personalization for Text-to-image Models

Gong Zhang, Kihyuk Sohn, Meera Hahn, Humphrey Shi, Irfan EssaNeurIPS 2024

Modern text-to-image (T2I) models possess remarkable generative capabilities, but coaxing them to perfectly mimic a specific, niche visual style often requires fine-tuning. While recent "few-shot" or "one-shot" personalization methods allow users to teach a model a new style using just a single reference image, they frequently suffer from a critical flaw: content leakage.

FineStyle introduces a novel few-shot fine-tuning method designed to solve this entanglement problem. By breaking down a single reference image into smaller, concept-specific masks and precisely tweaking the model's cross-attention layers, FineStyle achieves highly precise, fine-grained control over generated artworks without accidentally copying unwanted subjects from the reference.

The Problem: Content Leakage in Style Transfer

Because traditional few-shot models only have one image to learn from, they struggle to disentangle the style of the image from its subject matter. For example, if provided with a reference image of a watercolor painting of a boat on a lake, and then prompted to generate a "watercolor Japanese temple," the model might inexplicably generate boats and water in the background. The model incorrectly learns that "boats" are a fundamental part of the "watercolor" style. FineStyle aims to decouple these elements, allowing for granular control over style without leaking unwanted concepts.

FineStyle's Technical Innovations

Building on top of Muse, a masked generative image transformer, the authors introduce two primary technical innovations to eliminate content leakage:

1. Concept-Oriented Data Scaling

Instead of training the model on the whole reference image at once, FineStyle systematically breaks the image down. If the reference image is a "woman working on a laptop in a flat cartoon style," the system creates sub-prompts like "laptop in flat cartoon style" and "woman in flat cartoon style."

Using the model's own cross-attention maps, FineStyle isolates (masks) just the laptop or just the woman. This artificially multiplies the training data derived from a single image, forcing the model to learn exactly which visual regions correspond to which semantic words, thereby teaching it compositionality and disentanglement.

2. Cross-Attention KV Adapters

To fine-tune the model efficiently, the authors utilize Parameter-Efficient Fine-Tuning (PEFT). However, instead of adding adapter layers to intermediate hidden features—which tends to cause the model to memorize spatial layouts and exacerbate content leakage—they apply adapters specifically to the Key (K) and Value (V) weight matrices inside the cross-attention layers. Because cross-attention is the exact mechanism where text prompts interact with visual features, modifying these specific weights yields vastly superior fine-grained control.

Demonstrating Fine-Grained Control

FineStyle allows for incredibly granular editing that previous models struggle to achieve. Users can take a specific aesthetic and prompt the model to change background colors, alter contexts, or add and remove specific elements without breaking the core style.

The model successfully disentangles the subject from its environment, allowing the generation of new contexts (e.g., grass vs. bricks) in a highly specific child's drawing style.
FineStyle allows users to easily change specific attributes like background color while perfectly preserving the reference style's flat, illustrative aesthetic.

Performance and Evaluation

To evaluate FineStyle, the authors utilized an evaluation set originally curated by StyleDrop (consisting of 24 diverse styles) and tested the model against a filtered version of the Parti prompts dataset.

  • Quantitative Superiority: FineStyle achieved a higher Text-to-Image alignment CLIP score (0.314) compared to the state-of-the-art StyleDrop (0.297). This demonstrates that FineStyle is significantly better at drawing what the prompt actually asks for, rather than leaking reference content.
  • Human Preference: In side-by-side comparisons, human raters overwhelmingly preferred FineStyle. It won 67.1% of the time for Text Alignment (vs. 10.8% for StyleDrop) and 65.2% of the time for Structure/Common Sense (vs. 23.6% for StyleDrop).

Limitations and Future Work

While FineStyle represents a significant leap forward, it does come with a prompt engineering overhead. The method relies on having a highly detailed, comprehensive caption for the reference image that breaks down its subjects, background, and style. While Vision LLMs (like Gemini) can help automate this pipeline, it remains an extra step compared to zero-text inversion methods.

Furthermore, while FineStyle handles properties like color, texture, and foreground objects exceptionally well, it may not yet be able to manage every possible complex style composition defined by a text prompt outside of its evaluation set. Extending the scope of this controllability, alongside developing robust detection frameworks to mitigate the risks of generating sensitive or copyrighted content, remains an important area for future research.

Summary updated

BibTeX
@inproceedings{zhang2024finestyle,
  author = {Gong Zhang and Kihyuk Sohn and Meera Hahn and Humphrey Shi and Irfan Essa},
  title = {{FineStyle: Fine-grained Controllable Style Personalization for Text-to-image Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=1SmXUGzrH8},
}
Figure