Buckets:

download
raw
3.26 kB
import"../chunks/DsnmJJEf.js";import{i as m,h,C as u,H as f,a as g,E as M,s as w}from"../chunks/Bqo1LwON.js";import{p as J,o as y,s as e,f as b,a as l,b as j,d as r,n as T}from"../chunks/DK803DsY.js";const I='{"title":"DreamBooth","local":"dreambooth","sections":[],"depth":1}';var W=r('<meta name="hf:doc:metadata"/>'),B=r('<p></p> <!> <!> <p><a href="https://huggingface.co/papers/2208.12242" rel="nofollow">DreamBooth</a> personalizes a pretrained model to a specific subject from a few images (for example, your cat) by fine-tuning the full weights and binding that subject to a unique identifier in the prompt (<code>sks cat</code>). You can then generate the subject in new settings, lighting, poses, and styles.</p> <p>DreamBooth checkpoints are typically a few GBs because they contain the full model weights. Load them with <a href="/docs/diffusers/pr_15151/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a> and include the unique identifier in the prompt to trigger generation.</p> <!> <div class="flex justify-center"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/></div> <p>To train your own checkpoint, see <a href="../training/dreambooth">Train DreamBooth</a>.</p> <!> <p></p>',1);function G(p,c){J(c,!1),y(()=>{new URLSearchParams(window.location.search).get("fw")}),m();var a=B();h("cbmpdp",n=>{var i=W();w(i,"content",I),l(n,i)});var t=e(b(a),2);u(t,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var s=e(t,2);f(s,{title:"DreamBooth",local:"dreambooth",headingTag:"h1"});var o=e(s,6);g(o,{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc2QtZHJlYW1ib290aC1saWJyYXJ5JTJGaGVyZ2Utc3R5bGUlMjIlMkMlMEElMjAlMjAlMjAlMjBkdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTIwJTIwJTIzJTIwb3IlMjAlMjJtcHMlMjIlMkMlMjAlMjJ4cHUlMjIlMkMlMjAlMjJjcHUlMjIlMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwY3V0ZSUyMHNrcyUyMGhlcmdlX3N0eWxlJTIwYnJvd24lMjBiZWFyJTIwZWF0aW5nJTIwYSUyMHNsaWNlJTIwb2YlMjBwaXp6YSUyQyUyMHN0dW5uaW5nJTIwY29sb3IlMjBzY2hlbWUlMkMlMjBtYXN0ZXJwaWVjZSUyQyUyMGlsbHVzdHJhdGlvbiUyMiUwQXBpcGVsaW5lKHByb21wdCkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
pipeline = AutoPipelineForText2Image.from_pretrained(
<span class="hljs-string">&quot;sd-dreambooth-library/herge-style&quot;</span>,
dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>) <span class="hljs-comment"># or &quot;mps&quot;, &quot;xpu&quot;, &quot;cpu&quot;</span>
prompt = <span class="hljs-string">&quot;A cute sks herge_style brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>
pipeline(prompt).images[<span class="hljs-number">0</span>]`,lang:"py",wrap:!1});var d=e(o,6);M(d,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/dreambooth.md"}),T(2),l(p,a),j()}export{G as component};

Xet Storage Details

Size:
3.26 kB
·
Xet hash:
4238f91392d309ba29a2addeeda5577e829837957fbad93e0767e574cfcccb13

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.