Diffusers documentation
DreamBooth
快速入门
推理
优化与扩展
模块化 Diffusers
训练与微调
资源
贡献
API
DreamBooth
DreamBooth 通过微调完整权重,将预训练模型个性化到特定主体(例如你的猫),并在提示词中将该主体绑定到一个唯一标识符(sks cat)。之后,你可以在新的场景、光照、姿势和风格中生成该主体。
DreamBooth 检查点通常有几 GB 大,因为它们包含完整的模型权重。请使用 from_pretrained() 加载它们,并在提示词中包含唯一标识符以触发生成。
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。
Update on GitHub