1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-24 20:59:27 +03:00
Files
diffusers/docs/source/en/using-diffusers/dreambooth.md
Steven Liu 4295ee3ec5 [docs] Adapters (#14842)
* lora

* legacy adapters

* ip adapter

* controlnet

* feedback
2026-09-24 09:11:42 -07:00

1.7 KiB

DreamBooth

DreamBooth personalizes a pretrained model to a specific subject from a few images (for example, your cat) by fine-tuning the full weights and binding that subject to a unique identifier in the prompt (sks cat). You can then generate the subject in new settings, lighting, poses, and styles.

DreamBooth checkpoints are typically a few GBs because they contain the full model weights. Load them with [~DiffusionPipeline.from_pretrained] and include the unique identifier in the prompt to trigger generation.

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]

To train your own checkpoint, see Train DreamBooth.