Buckets:
| import"../chunks/DsnmJJEf.js";import{i as m,h,C as u,H as f,a as g,E as y,s as w}from"../chunks/CmJXCtRL.js";import{p as J,o as b,s as e,f as M,a as l,b as T,d as r,n as G}from"../chunks/DK803DsY.js";const I='{"title":"DreamBooth","local":"dreambooth","sections":[],"depth":1}';var j=r('<meta name="hf:doc:metadata"/>'),B=r('<p></p> <!> <!> <p><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.</p> <p>DreamBooth checkpoints are typically a few GBs in size because it contains the full model weights.</p> <p>Load the DreamBooth checkpoint with <a href="/docs/diffusers/pr_14313/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a> and include the unique identifier in the prompt to activate its generation.</p> <!> <div class="flex justify-center"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/></div> <!> <p></p>',1);function V(p,c){J(c,!1),b(()=>{new URLSearchParams(window.location.search).get("fw")}),m();var a=B();h("cbmpdp",i=>{var n=j();w(n,"content",I),l(i,n)});var t=e(M(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,8);g(o,{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc2QtZHJlYW1ib290aC1saWJyYXJ5JTJGaGVyZ2Utc3R5bGUlMjIlMkMlMEElMjAlMjAlMjAlMjBkdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBza3MlMjBoZXJnZV9zdHlsZSUyMGJyb3duJTIwYmVhciUyMGVhdGluZyUyMGElMjBzbGljZSUyMG9mJTIwcGl6emElMkMlMjBzdHVubmluZyUyMGNvbG9yJTIwc2NoZW1lJTJDJTIwbWFzdGVycGllY2UlMkMlMjBpbGx1c3RyYXRpb24lMjIlMEFwaXBlbGluZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",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">"sd-dreambooth-library/herge-style"</span>, | |
| dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| prompt = <span class="hljs-string">"A cute sks herge_style brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration"</span> | |
| pipeline(prompt).images[<span class="hljs-number">0</span>]`,lang:"py",wrap:!1});var d=e(o,4);y(d,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/dreambooth.md"}),G(2),l(p,a),T()}export{V as component}; | |
Xet Storage Details
- Size:
- 3.13 kB
- Xet hash:
- 270f9daa8ef1b5edf93b2050838c20878fca22d06e9098cbea287c61eff2800c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.