# DreamBooth

[DreamBooth](https://huggingface.co/papers/2208.12242) 通过微调完整权重，将预训练模型个性化到特定主体（例如你的猫），并在提示词中将该主体绑定到一个唯一标识符（`sks cat`）。之后，你可以在新的场景、光照、姿势和风格中生成该主体。

DreamBooth 检查点通常有几 GB 大，因为它们包含完整的模型权重。请使用 [from_pretrained()](/docs/diffusers/v0.43.0/zh/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained) 加载它们，并在提示词中包含唯一标识符以触发生成。

```py
import torch
from diffusers import AutoPipelineForText2Image

pipeline = AutoPipelineForText2Image.from_pretrained(
    "sd-dreambooth-library/herge-style",
    dtype=torch.float16
).to("cuda")  # or "mps", "xpu", "cpu"
prompt = "A cute sks herge_style brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration"
pipeline(prompt).images[0]
```

    

要训练自己的检查点，请参阅 [训练 DreamBooth](../training/dreambooth)。

