Diffusers documentation

DreamBooth

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.42.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

DreamBooth

DreamBooth personaliza um modelo pré-treinado para um sujeito específico a partir de algumas imagens (por exemplo, seu gato) ajustando todos os pesos e vinculando esse sujeito a um identificador único no prompt (sks cat). Em seguida, você pode gerar o sujeito em novos cenários, iluminação, poses e estilos.

Os checkpoints do DreamBooth geralmente têm alguns GBs, pois contêm os pesos completos do modelo. Carregue-os com from_pretrained() e inclua o identificador único no prompt para acionar a geração.

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]

Para treinar seu próprio checkpoint, consulte Treinar DreamBooth.

Update on GitHub