import{s as L,n as S,o as X}from"../chunks/scheduler.8c3d61f6.js";import{S as D,i as Q,g as d,s as i,r as B,A as R,h,f as s,c as l,j as C,u as Z,x as v,k,y as A,a,v as x,d as E,t as U,w as V}from"../chunks/index.da70eac4.js";import{C as F}from"../chunks/CodeBlock.a9c4becf.js";import{H as Y,E as N}from"../chunks/getInferenceSnippets.86beaec3.js";function K(z){let n,y,g,J,r,b,m,H='<a href="https://huggingface.co/papers/2208.12242" rel="nofollow">DreamBooth</a> is a method for generating personalized images of a specific instance. It works by fine-tuning the model on 3-5 images of the subject (for example, a cat) that is associated with a unique identifier (<code>sks cat</code>). This allows you to use <code>sks cat</code> in your prompt to trigger the model to generate images of your cat in different settings, lighting, poses, and styles.',M,p,W="DreamBooth checkpoints are typically a few GBs in size because it contains the full model weights.",T,c,P='Load the DreamBooth checkpoint with <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a> and include the unique identifier in the prompt to activate its generation.',G,u,j,o,q='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/>',_,f,$,w,I;return r=new Y({props:{title:"DreamBooth",local:"dreambooth",headingTag:"h1"}}),u=new F({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc2QtZHJlYW1ib290aC1saWJyYXJ5JTJGaGVyZ2Utc3R5bGUlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBza3MlMjBoZXJnZV9zdHlsZSUyMGJyb3duJTIwYmVhciUyMGVhdGluZyUyMGElMjBzbGljZSUyMG9mJTIwcGl6emElMkMlMjBzdHVubmluZyUyMGNvbG9yJTIwc2NoZW1lJTJDJTIwbWFzdGVycGllY2UlMkMlMjBpbGx1c3RyYXRpb24lMjIlMEFwaXBlbGluZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",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>,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&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>]`,wrap:!1}}),f=new N({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/dreambooth.md"}}),{c(){n=d("meta"),y=i(),g=d("p"),J=i(),B(r.$$.fragment),b=i(),m=d("p"),m.innerHTML=H,M=i(),p=d("p"),p.textContent=W,T=i(),c=d("p"),c.innerHTML=P,G=i(),B(u.$$.fragment),j=i(),o=d("div"),o.innerHTML=q,_=i(),B(f.$$.fragment),$=i(),w=d("p"),this.h()},l(e){const t=R("svelte-u9bgzb",document.head);n=h(t,"META",{name:!0,content:!0}),t.forEach(s),y=l(e),g=h(e,"P",{}),C(g).forEach(s),J=l(e),Z(r.$$.fragment,e),b=l(e),m=h(e,"P",{"data-svelte-h":!0}),v(m)!=="svelte-1xkhepj"&&(m.innerHTML=H),M=l(e),p=h(e,"P",{"data-svelte-h":!0}),v(p)!=="svelte-1n5tgzo"&&(p.textContent=W),T=l(e),c=h(e,"P",{"data-svelte-h":!0}),v(c)!=="svelte-12z8xaw"&&(c.innerHTML=P),G=l(e),Z(u.$$.fragment,e),j=l(e),o=h(e,"DIV",{class:!0,"data-svelte-h":!0}),v(o)!=="svelte-1qqjocv"&&(o.innerHTML=q),_=l(e),Z(f.$$.fragment,e),$=l(e),w=h(e,"P",{}),C(w).forEach(s),this.h()},h(){k(n,"name","hf:doc:metadata"),k(n,"content",O),k(o,"class","flex justify-center")},m(e,t){A(document.head,n),a(e,y,t),a(e,g,t),a(e,J,t),x(r,e,t),a(e,b,t),a(e,m,t),a(e,M,t),a(e,p,t),a(e,T,t),a(e,c,t),a(e,G,t),x(u,e,t),a(e,j,t),a(e,o,t),a(e,_,t),x(f,e,t),a(e,$,t),a(e,w,t),I=!0},p:S,i(e){I||(E(r.$$.fragment,e),E(u.$$.fragment,e),E(f.$$.fragment,e),I=!0)},o(e){U(r.$$.fragment,e),U(u.$$.fragment,e),U(f.$$.fragment,e),I=!1},d(e){e&&(s(y),s(g),s(J),s(b),s(m),s(M),s(p),s(T),s(c),s(G),s(j),s(o),s(_),s($),s(w)),s(n),V(r,e),V(u,e),V(f,e)}}}const O='{"title":"DreamBooth","local":"dreambooth","sections":[],"depth":1}';function ee(z){return X(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ie extends D{constructor(n){super(),Q(this,n,ee,K,L,{})}}export{ie as component};
