Skip to content

Commit 79cff8f

Browse files
committed
refactor adapter docs
1 parent 4b868f1 commit 79cff8f

File tree

5 files changed

+76
-772
lines changed

5 files changed

+76
-772
lines changed

docs/source/en/_toctree.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
title: AutoPipeline
1818
- local: tutorials/basic_training
1919
title: Train a diffusion model
20-
- local: tutorials/using_peft_for_inference
21-
title: Load LoRAs for inference
2220
- local: tutorials/fast_diffusion
2321
title: Accelerate inference of text-to-image diffusion models
2422
- local: tutorials/inference_with_big_models
@@ -33,11 +31,19 @@
3331
title: Load schedulers and models
3432
- local: using-diffusers/other-formats
3533
title: Model files and layouts
36-
- local: using-diffusers/loading_adapters
37-
title: Load adapters
3834
- local: using-diffusers/push_to_hub
3935
title: Push files to the Hub
4036
title: Load pipelines and adapters
37+
- sections:
38+
- local: using-diffusers/using_peft_for_inference
39+
title: LoRA
40+
- local: using-diffusers/ip_adapter
41+
title: IP-Adapter
42+
- local: using-diffusers/dreambooth
43+
title: DreamBooth
44+
- local: using-diffusers/textual_inversion_inference
45+
title: Textual inversion
46+
title: Adapters
4147
- sections:
4248
- local: using-diffusers/unconditional_image_generation
4349
title: Unconditional image generation
@@ -97,8 +103,6 @@
97103
title: SDXL Turbo
98104
- local: using-diffusers/kandinsky
99105
title: Kandinsky
100-
- local: using-diffusers/ip_adapter
101-
title: IP-Adapter
102106
- local: using-diffusers/omnigen
103107
title: OmniGen
104108
- local: using-diffusers/pag
@@ -109,8 +113,6 @@
109113
title: T2I-Adapter
110114
- local: using-diffusers/inference_with_lcm
111115
title: Latent Consistency Model
112-
- local: using-diffusers/textual_inversion_inference
113-
title: Textual inversion
114116
- local: using-diffusers/shap-e
115117
title: Shap-E
116118
- local: using-diffusers/diffedit
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--Copyright 2025 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
-->
12+
13+
# DreamBooth
14+
15+
[DreamBooth](https://huggingface.co/papers/2208.12242) is a method for generating personalized images of a specific instance. It works by fine-tuning the model on 3-5 images of the subject (for example, a cat) that is associated with a unique identifier (`sks cat`). This allows you to use `sks cat` in your prompt to trigger the model to generate images of your cat in different settings, lighting, poses, and styles.
16+
17+
DreamBooth checkpoints are typically a few GBs in size because it contains the full model weights.
18+
19+
Load the DreamBooth checkpoint with [`~DiffusionPipeline.from_pretrained`] and include the unique identifier in the prompt to activate its generation.
20+
21+
```py
22+
import torch
23+
from diffusers import AutoPipelineForText2Image
24+
25+
pipeline = AutoPipelineForText2Image.from_pretrained(
26+
"sd-dreambooth-library/herge-style",
27+
torch_dtype=torch.float16
28+
).to("cuda")
29+
prompt = "A cute sks herge_style brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration"
30+
pipeline(prompt).images[0]
31+
```
32+
33+
<div class="flex justify-center">
34+
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png" />
35+
</div>

0 commit comments

Comments
 (0)