# FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention

FastComposer: 국소 어텐션을 활용한 튜닝 없는 다중 주체 이미지 생성

Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · arXiv · 2023년 5월 17일

- **연구 문제** 기존 개인화 생성은 피사체마다 fine-tuning이 필요하고 여러 피사체에서 정체성이 섞입니다.
- **연구 방법** FastComposer는 피사체 이미지 임베딩으로 텍스트 조건을 증강하고, 학습 중 cross-attention 맵을 마스크로 감독하며, 추론 초기에는 텍스트만 사용합니다.
- **주요 결과** 단일 피사체 비교에서 FastComposer는 Identity preservation 51.41%를, 다중 피사체 비교에서 43.11%를 보고합니다. 절제 실험에서 localization 손실을 제외하면 정체성 보존이 37.66%로 낮아집니다.

## 다중 피사체 개인화 생성의 두 가지 어려움

기존 피사체 기반 텍스트-이미지 생성은 새 피사체마다 확산 모델을 미세조정해야 하므로 연산 비용과 하드웨어 요구가 큽니다. 또한 여러 피사체를 한 장면에 넣으면 서로의 정체성이 섞이는 identity blending 문제가 나타납니다. 원문은 이 두 문제를 해결하려는 목표를 제시합니다.

![Figure 2: Two challenges faced by existing subject-driven image generation methods. Firstly, current methods blend the distinct characteristics of different su…](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493/figures/figure-1847d09b59a157bf5b7dddd0527e97e3.png?thumb=512)

**Figure 2** : Two challenges faced by existing subject-driven image generation methods. Firstly, current methods blend the distinct characteristics of different subjects ( identity blending), shown by the right ﬁgure where Newton resembles Einstein. Cross-attention localization (Sec 4.2) solves this problem. Secondly, they suffer from subject overﬁtting, where they overﬁt the input image and ignore the text instruction. Delayed subject conditioning (Sec 4.3) addresses this issue.

[원문](https://arxiv.org/abs/2305.10431v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

원문은 피사체 하나를 fine-tuning으로 학습하는 최적화 기반 방법들이 여러 피사체를 합칠 때 같은 사람을 두 번 생성하거나 정체성을 섞는다고 설명합니다. 따라서 이 연구는 튜닝 없이 참조 이미지를 입력받아 여러 피사체를 생성하는 문제를 다룹니다.

## 피사체 임베딩으로 텍스트 조건 증강

FastComposer는 Stable Diffusion을 백본으로 사용하고, 텍스트 프롬프트의 단어 임베딩 중 피사체에 대응하는 위치를 이미지 인코더가 만든 피사체 특징으로 보강합니다. 원문 식 (2)는 대응하지 않는 토큰은 그대로 두고, 피사체에 대응하는 토큰은 단어 임베딩과 시각 특징을 이어 붙인 뒤 MLP에 통과시킨 값으로 바꾸는 방식입니다.

![Figure 3: Training and inference pipeline of FastComposer. Given a text description and images of multiple sub- jects, FastComposer uses an image encoder to ex…](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493/figures/figure-7be4523b1f0e48b6ed6865bf4bd893e2.png?thumb=512)

**Figure 3** : Training and inference pipeline of FastComposer. Given a text description and images of multiple sub- jects, FastComposer uses an image encoder to extract the features of the subjects and augments the corresponding text tokens. The diffusion model is trained to generate multi-subject images with augmented conditioning. We use cross-attention localization (Sec. 4.2) to boost multi-subject generation quality, and delayed subject conditioning to avoid subject overﬁtting (Sec. 4.3).

[원문](https://arxiv.org/abs/2305.10431v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

이 과정에서 CLIP 텍스트 인코더와 이미지 인코더가 사용되며, 학습 시에는 이미지 인코더, MLP, U-Net을 denoising 손실로 함께 학습합니다. 추론 시에는 피사체 이미지만 입력받아 추가 fine-tuning 없이 증강된 조건을 적용합니다.

## cross-attention 맵의 세그멘테이션 감독

원문은 기존 cross-attention 맵이 여러 피사체 토큰을 같은 생성 인물에 동시에 연결하여 정체성 혼합이 생긴다고 해석합니다. 이 해석은 저자들의 가설이며, 그림 4는 정규화하지 않은 모델에서 두 피사체 토큰이 같은 인물에 영향을 주는 관찰을 보여 줍니다.

![Figure 4: In the absence of cross-attention regularization (top), the diffusion model attends to multiple subjects’ input tokens and merge their identity. By a…](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493/figures/figure-1aa217c60a35b63196a9c806d076e0fa.png?thumb=512)

**Figure 4** : In the absence of cross-attention regularization (top), the diffusion model attends to multiple subjects’ input tokens and merge their identity. By applying cross-attention regularization (bottom), the diffusion model learns to focus on only one reference token while generating a subject. This ensures that the features of multiple subjects in the generated image are more separated.

[원문](https://arxiv.org/abs/2305.10431v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

FastComposer는 학습 중 참조 피사체의 세그멘테이션 마스크 M\_j와 피사체 토큰의 cross-attention 맵 A\_ij를 맞춥니다. 손실은 마스크 밖 평균과 마스크 안 평균의 차이를 이용하는 balanced L1 형태이며, 전체 목적식 L = L\_noise + λL\_loc에서 λ는 0.001로 설정됩니다. 이 감독은 학습 중에만 사용되고 추론 시에는 사용되지 않습니다.

## 지연 피사체 조건화

원문은 추론에서 증강된 텍스트 표현을 처음부터 사용하면 레이아웃이 형성되는 초기 디노이징 단계부터 참조 이미지에 치우쳐 텍스트 지시를 무시하는 과적합이 생긴다고 설명합니다. 이에 따라 디노이징 초기에는 텍스트만 쓰는 c로 레이아웃을 만들고, 시간 조건 비율 α 이후에는 피사체 증강 조건 c′을 사용합니다.

원문 식 (5)는 t \> αT인 구간에서는 원래 텍스트 임베딩 c, 그 외 구간에서는 c′을 사용하는 시간 의존 노이즈 예측입니다. 원문은 α가 0.6에서 0.8 사이일 때 프롬프트 일치와 정체성 보존의 균형이 좋다고 보고합니다.

![Figure 5: Effects of using different ratios of timesteps for subject conditioning. A ratio between 0.6 to 0.8 yields good results and achieve a balance between…](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493/figures/figure-f0d15d76bc76bbd520c0541962cfbe95.png?thumb=512)

**Figure 5** : Effects of using different ratios of timesteps for subject conditioning. A ratio between 0.6 to 0.8 yields good results and achieve a balance between prompt consistency and identity preservation.

[원문](https://arxiv.org/abs/2305.10431v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## 단일 피사체 생성 비교

단일 피사체 평가는 Celeb-A에서 가져온 15명의 피사체와 피사체당 30개의 텍스트 프롬프트로 구성됩니다. 기준선인 Textual-Inversion, DreamBooth, Custom Diffusion은 피사체당 5장의 이미지로 미세조정되었고, FastComposer는 피사체당 무작위로 선택한 참조 이미지 1장을 사용했습니다.

![Figure 6: Comparison of different methods on single subject image generation. For text-only methods (i.e., StableDiffusion and Midjourney), we use scientists’…](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493/figures/figure-b7307d128d81580882dafedbb7dae14e.png?thumb=512)

**Figure 6** : Comparison of different methods on single subject image generation. For text-only methods (i.e., StableDiffusion and Midjourney), we use scientists’ names in the text prompt.

[원문](https://arxiv.org/abs/2305.10431v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

이 설정에서 FastComposer는 Identity preservation 51.41%, Prompt consistency 24.30%, 총 시간 2 s, 피크 메모리 6 GB를 보고합니다. 원문은 이 결과가 최적화 기반 기준선 대비 300×-1200× 속도 향상과 2.8× 메모리 절감을 뜻한다고 보고합니다.

## 다중 피사체 생성과 절제 실험

다중 피사체 평가는 15명의 피사체에서 만든 105개 쌍 조합을 사용하며 조합마다 21개의 프롬프트를 할당합니다. 이 비교에서 FastComposer는 Identity preservation 43.11%, Prompt consistency 24.25%, 총 시간 2 s를 보고합니다. 원문은 Textual-Inversion과 Custom Diffusion이 정체성 보존에서 낮다고 보고하며, 이는 같은 표에 제시된 기준선 값과 비교한 결과입니다.

![Figure 1: Comparison with baselines for multi-subject image generation. We use scientists’ names in the text prompt for text-only methods (SD, MJ). Text-only m…](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493/figures/figure-5812f4621e32740f7e8cd5b1793ee373.png?thumb=512)

**Figure 1** : Comparison with baselines for multi-subject image generation. We use scientists’ names in the text prompt for text-only methods (SD, MJ). Text-only methods only perform well when subjects are present in the training dataset but struggle to maintain the identity otherwise. Fine-tuning-based methods blend the identity of different persons (TI rows 1 and 2, CD rows 1, 2, 4), deviate from the text instruction and only generate a single subject (TI row 4), or generate images that do not resemble any speciﬁc reference (CD row 3).

[원문](https://arxiv.org/abs/2305.10431v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

절제 실험은 cross-attention localization 손실을 제외한 같은 설정의 모델과 비교합니다. 제외한 모델은 Identity Pres. 37.66%, Prompt Cons. 25.03%이고, 손실을 포함한 모델은 43.11%와 24.25%입니다. 이는 이 손실이 정체성 보존을 높이면서 프롬프트 일치는 약간 낮춘 결과로 읽힙니다.

![Table 3: Ablation studies on the cross-attention localization supervision. We compare with the model trained in the same setting without cross-attention locali…](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493/figures/figure-6efa1634e685b25d0975ca42063b5489.png?thumb=512)

**Table 3** : Ablation studies on the cross-attention localization supervision. We compare with the model trained in the same setting without cross-attention localization.

[원문](https://arxiv.org/abs/2305.10431v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han · FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

## 데이터와 적용 범위의 한계

원문은 학습 데이터 FFHQ가 작고 주로 인간 얼굴 헤드샷으로 구성되어 있으며, 인원 분포가 긴 꼬리를 가져 세 명을 넘는 피사체 생성에 한계가 있다고 설명합니다. 또한 동물 같은 다른 범주의 다중 피사체 데이터가 부족하여 연구가 주로 사람 중심이라고 밝힙니다.

따라서 이 결과는 인간 얼굴 중심 데이터와 Stable Diffusion 기반 설정에서 얻은 것입니다. 원문은 모델이 기반 모델과 데이터의 편향도 이어받는다고 밝힙니다.

## 논문 정보

- **저자**: Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 5월 17일
- **등록일**: 2026년 11월 6일
- **수정일**: 2023년 5월 21일
- **버전**: v2
- **arXiv**: 2305.10431
- **분류**: cs.CV
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2305.10431v2) · [원문 PDF ↗](https://arxiv.org/pdf/2305.10431v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Diffusion models excel at text-to-image generation, especially in subject-driven generation for personalized images. However, existing methods are inefficient due to the subject-specific fine-tuning, which is computationally intensive and hampers efficient deployment. Moreover, existing methods struggle with multi-subject generation as they often blend features among subjects. We present FastComposer which enables efficient, personalized, multi-subject text-to-image generation without fine-tuning. FastComposer uses subject embeddings extracted by an image encoder to augment the generic text conditioning in diffusion models, enabling personalized image generation based on subject images and textual instructions with only forward passes. To address the identity blending problem in the multi-subject generation, FastComposer proposes cross-attention localization supervision during training, enforcing the attention of reference subjects localized to the correct regions in the target images. Naively conditioning on subject embeddings results in subject overfitting. FastComposer proposes delayed subject conditioning in the denoising step to maintain both identity and editability in subject-driven image generation. FastComposer generates images of multiple unseen individuals with different styles, actions, and contexts. It achieves 300$\\times$-2500$\\times$ speedup compared to fine-tuning-based methods and requires zero extra storage for new subjects. FastComposer paves the way for efficient, personalized, and high-quality multi-subject image creation. Code, model, and dataset are available at https://github.com/mit-han-lab/fastcomposer.

## 원문 인용

Guangxuan Xiao, Tianwei Yin, William T. Freeman, Frédo Durand, Song Han (2023). FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention. arXiv:2305.10431v2. https://arxiv.org/abs/2305.10431v2

**BibTeX**

```
@misc{xiao2023fastcomposer,
  title = {{FastComposer: Tuning-Free Multi-Subject Image Generation with Localized Attention}},
  author = {Guangxuan Xiao and Tianwei Yin and William T. Freeman and Frédo Durand and Song Han},
  year = {2023},
  eprint = {2305.10431},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.10431v2}
}
```

## 이 논문의 용어

- [U-Net](https://refivu.com/terms/f49a93d54ad5-u-net)
- [CLIP](https://refivu.com/terms/b5b5b48d5f4e-clip)
- [MTCNN](https://refivu.com/terms/d2e74557ef38-mtcnn)
- [DreamBooth](https://refivu.com/terms/0469e4e7700d-dreambooth)
- [FaceNet](https://refivu.com/terms/bbc4f927d331-facenet)
- [balanced L1 loss](https://refivu.com/terms/b5acbf241583-balanced-l1-loss)
- [cross-attention mechanism](https://refivu.com/terms/958dddc88dce-cross-attention-mechanism)
- [denoising loss](https://refivu.com/terms/8064ca918408-denoising-loss)

## 다른 논문 해설

- [Invertible Diffusion Models for Compressed Sensing](https://refivu.com/papers/6aec800a-0663-470f-a512-df85b2b5c826-invertible-diffusion-models-for-compressed-sensing.md)
- [Adversarial Machine Learning in Wireless Communications using RF Data: A Review](https://refivu.com/papers/f8f95bf7-a7a5-4372-9c0f-207defdcf874-adversarial-machine-learning-in-wireless-communications.md)
- [An Introduction to Deep Generative Modeling](https://refivu.com/papers/02e18aa5-91fb-46d1-afb1-87e9dbd71146-an-introduction-to-deep-generative-modeling.md)
- [Fast-GANFIT: Generative Adversarial Network for High Fidelity 3D Face Reconstruction](https://refivu.com/papers/f7e4dd6d-1545-4e0e-bedc-1b05afe076ef-fast-ganfit-generative-adversarial-network-for-high-fidelity.md)
- [FestDPO: Few-step Generator Alignment with Direct Preference Optimization](https://refivu.com/papers/2e7e630c-0a58-4fa7-a806-4a0818d68d2d-festdpo-few-step-generator-alignment-with-direct-preference.md)
- [SIPO: Stabilized and Improved Preference Optimization for Aligning Diffusion Models](https://refivu.com/papers/43fc00cb-3411-4415-9937-21d491129d4f-sipo-stabilized-and-improved-preference-optimization-for.md)
- [Survey on reinforcement learning for language processing](https://refivu.com/papers/21719d98-3b47-479f-8d30-6d7d6092738b-survey-on-reinforcement-learning-for-language-processing.md)
- [Interpretable and Explainable Machine Learning for Materials Science and Chemistry](https://refivu.com/papers/77f32892-bb87-467e-b149-940994557a38-interpretable-and-explainable-machine-learning-for-materials.md)
- [Direction of Arrival Estimation Using Microphone Array Processing for Moving Humanoid Robots](https://refivu.com/papers/db619add-e076-45d5-be10-ab46fe8f2061-direction-of-arrival-estimation-using-microphone-array.md)
- [Clustering Algorithms: A Comparative Approach](https://refivu.com/papers/49073458-c398-4adb-b4eb-f71401de6b77-clustering-algorithms-a-comparative-approach.md)
- [Supervised machine learning based multi-task artificial intelligence classification of retinopathies](https://refivu.com/papers/048e9106-d566-400b-b9be-3b44bf441ef4-supervised-machine-learning-based-multi-task-artificial.md)
- [Neural Networks for Modeling and Control of Particle Accelerators](https://refivu.com/papers/1aeabac7-e3d5-4f7b-ac66-947590e3a0a8-neural-networks-for-modeling-and-control-of-particle.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/da96ee97-6c27-4d11-88b7-679762995493-fastcomposer-tuning-free-multi-subject-image-generation-with)
