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.42.1).
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