Diffusers documentation
DreamBooth
はじめに
推論
最適化とスケーリング
モジュール型 Diffusers
学習とファインチューニング
リソース
コントリビュート
API
You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v0.43.0).
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