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 mempersonalisasi model pretrained ke subjek tertentu dari beberapa gambar (misalnya, kucing Anda) dengan fine-tuning seluruh bobot dan mengaitkan subjek tersebut ke pengidentifikasi unik dalam prompt (sks cat). Anda kemudian dapat menghasilkan subjek tersebut dalam pengaturan, pencahayaan, pose, dan gaya baru.

Checkpoint DreamBooth biasanya berukuran beberapa GB karena berisi bobot model lengkap. Muat dengan from_pretrained() dan sertakan pengenal unik dalam prompt untuk memicu generasi.

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]

Untuk melatih checkpoint Anda sendiri, lihat Melatih DreamBooth.

Update on GitHub