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.43.0).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

DreamBooth

يُخصّص DreamBooth نموذجًا مُدرَّبًا مسبقًا لموضوع محدد انطلاقًا من عدد قليل من الصور (مثلًا، قطتك) من خلال ضبط دقيق للأوزان الكاملة وربط ذلك الموضوع بمعرّف فريد في الأمر النصي (sks cat). يمكنك بعد ذلك توليد ذلك الموضوع في إعدادات وإضاءة ووضعية وأنماط جديدة.

عادةً ما تكون نقاط التفتيش الخاصة بـ DreamBooth بضعة غيغابايتات لأنها تحتوي على أوزان النموذج الكاملة. حمّلها باستخدام from_pretrained() وشمل المعرّف الفريد في الموجه (prompt) لتفعيل التوليد.

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