Buckets:
| import{s as ft,n as ut,o as pt}from"../chunks/scheduler.182ea377.js";import{S as mt,i as ct,g as l,s as a,r as z,A as ht,h as o,f as i,c as s,j as lt,u as A,x as r,k as ot,y as gt,a as n,v as E,d as G,t as D,w as Y}from"../chunks/index.abf12888.js";import{C as rt}from"../chunks/CodeBlock.57fe6e13.js";import{H as dt}from"../chunks/Heading.16916d63.js";function bt(O){let d,M,T,k,f,L,u,V='🤗 Diffusers provides a collection of training scripts for you to train your own diffusion models. You can find all of our training scripts in <a href="https://github.com/huggingface/diffusers/tree/main/examples" rel="nofollow">diffusers/examples</a>.',H,p,N="Each training script is:",B,m,Q="<li><strong>Self-contained</strong>: the training script does not depend on any local files, and all packages required to run the script are installed from the <code>requirements.txt</code> file.</li> <li><strong>Easy-to-tweak</strong>: the training scripts are an example of how to train a diffusion model for a specific task and won’t work out-of-the-box for every training scenario. You’ll likely need to adapt the training script for your specific use-case. To help you with that, we’ve fully exposed the data preprocessing code and the training loop so you can modify it for your own use.</li> <li><strong>Beginner-friendly</strong>: the training scripts are designed to be beginner-friendly and easy to understand, rather than including the latest state-of-the-art methods to get the best and most competitive results. Any training methods we consider too complex are purposefully left out.</li> <li><strong>Single-purpose</strong>: each training script is expressly designed for only one task to keep it readable and understandable.</li>",I,c,K="Our current collection of training scripts include:",P,h,tt='<thead><tr><th>Training</th> <th>SDXL-support</th> <th>LoRA-support</th> <th>Flax-support</th></tr></thead> <tbody><tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/unconditional_image_generation" rel="nofollow">unconditional image generation</a> <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/text_to_image" rel="nofollow">text-to-image</a></td> <td>👍</td> <td>👍</td> <td>👍</td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/textual_inversion" rel="nofollow">textual inversion</a> <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_textual_inversion_training.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a></td> <td></td> <td></td> <td>👍</td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/dreambooth" rel="nofollow">DreamBooth</a> <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_dreambooth_training.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a></td> <td>👍</td> <td>👍</td> <td>👍</td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/controlnet" rel="nofollow">ControlNet</a></td> <td>👍</td> <td></td> <td>👍</td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/instruct_pix2pix" rel="nofollow">InstructPix2Pix</a></td> <td>👍</td> <td></td> <td></td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/custom_diffusion" rel="nofollow">Custom Diffusion</a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/t2i_adapter" rel="nofollow">T2I-Adapters</a></td> <td>👍</td> <td></td> <td></td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/kandinsky2_2/text_to_image" rel="nofollow">Kandinsky 2.2</a></td> <td></td> <td>👍</td> <td></td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/tree/main/examples/wuerstchen/text_to_image" rel="nofollow">Wuerstchen</a></td> <td></td> <td>👍</td> <td></td></tr></tbody>',R,g,et='These examples are <strong>actively</strong> maintained, so please feel free to open an issue if they aren’t working as expected. If you feel like another training example should be included, you’re more than welcome to start a <a href="https://github.com/huggingface/diffusers/issues/new?assignees=&labels=&template=feature_request.md&title=" rel="nofollow">Feature Request</a> to discuss your feature idea with us and whether it meets our criteria of being self-contained, easy-to-tweak, beginner-friendly, and single-purpose.',U,b,j,x,it="Make sure you can successfully run the latest versions of the example scripts by installing the library from source in a new virtual environment:",J,w,Z,y,nt='Then navigate to the folder of the training script (for example, <a href="https://github.com/huggingface/diffusers/tree/main/examples/dreambooth" rel="nofollow">DreamBooth</a>) and install the <code>requirements.txt</code> file. Some training scripts have a specific requirement file for SDXL, LoRA or Flax. If you’re using one of these scripts, make sure you install its corresponding requirements file.',F,v,q,_,at="To speedup training and reduce memory-usage, we recommend:",S,$,st='<li>using PyTorch 2.0 or higher to automatically use <a href="../optimization/torch2.0#scaled-dot-product-attention">scaled dot product attention</a> during training (you don’t need to make any changes to the training code)</li> <li>installing <a href="../optimization/xformers">xFormers</a> to enable memory-efficient attention</li>',W,C,X;return f=new dt({props:{title:"Overview",local:"overview",headingTag:"h1"}}),b=new dt({props:{title:"Install",local:"install",headingTag:"h2"}}),w=new rt({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmRpZmZ1c2VycyUwQWNkJTIwZGlmZnVzZXJzJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/diffusers | |
| <span class="hljs-built_in">cd</span> diffusers | |
| pip install .`,wrap:!1}}),v=new rt({props:{code:"Y2QlMjBleGFtcGxlcyUyRmRyZWFtYm9vdGglMEFwaXAlMjBpbnN0YWxsJTIwLXIlMjByZXF1aXJlbWVudHMudHh0JTBBJTIzJTIwdG8lMjB0cmFpbiUyMFNEWEwlMjB3aXRoJTIwRHJlYW1Cb290aCUwQXBpcCUyMGluc3RhbGwlMjAtciUyMHJlcXVpcmVtZW50c19zZHhsLnR4dA==",highlighted:`<span class="hljs-built_in">cd</span> examples/dreambooth | |
| pip install -r requirements.txt | |
| <span class="hljs-comment"># to train SDXL with DreamBooth</span> | |
| pip install -r requirements_sdxl.txt`,wrap:!1}}),{c(){d=l("meta"),M=a(),T=l("p"),k=a(),z(f.$$.fragment),L=a(),u=l("p"),u.innerHTML=V,H=a(),p=l("p"),p.textContent=N,B=a(),m=l("ul"),m.innerHTML=Q,I=a(),c=l("p"),c.textContent=K,P=a(),h=l("table"),h.innerHTML=tt,R=a(),g=l("p"),g.innerHTML=et,U=a(),z(b.$$.fragment),j=a(),x=l("p"),x.textContent=it,J=a(),z(w.$$.fragment),Z=a(),y=l("p"),y.innerHTML=nt,F=a(),z(v.$$.fragment),q=a(),_=l("p"),_.textContent=at,S=a(),$=l("ul"),$.innerHTML=st,W=a(),C=l("p"),this.h()},l(t){const e=ht("svelte-u9bgzb",document.head);d=o(e,"META",{name:!0,content:!0}),e.forEach(i),M=s(t),T=o(t,"P",{}),lt(T).forEach(i),k=s(t),A(f.$$.fragment,t),L=s(t),u=o(t,"P",{"data-svelte-h":!0}),r(u)!=="svelte-odg5wz"&&(u.innerHTML=V),H=s(t),p=o(t,"P",{"data-svelte-h":!0}),r(p)!=="svelte-1l5xx5e"&&(p.textContent=N),B=s(t),m=o(t,"UL",{"data-svelte-h":!0}),r(m)!=="svelte-17s4x4c"&&(m.innerHTML=Q),I=s(t),c=o(t,"P",{"data-svelte-h":!0}),r(c)!=="svelte-1yvg5e"&&(c.textContent=K),P=s(t),h=o(t,"TABLE",{"data-svelte-h":!0}),r(h)!=="svelte-cok55p"&&(h.innerHTML=tt),R=s(t),g=o(t,"P",{"data-svelte-h":!0}),r(g)!=="svelte-n03e9a"&&(g.innerHTML=et),U=s(t),A(b.$$.fragment,t),j=s(t),x=o(t,"P",{"data-svelte-h":!0}),r(x)!=="svelte-1uukpq2"&&(x.textContent=it),J=s(t),A(w.$$.fragment,t),Z=s(t),y=o(t,"P",{"data-svelte-h":!0}),r(y)!=="svelte-gld5li"&&(y.innerHTML=nt),F=s(t),A(v.$$.fragment,t),q=s(t),_=o(t,"P",{"data-svelte-h":!0}),r(_)!=="svelte-1fce6dt"&&(_.textContent=at),S=s(t),$=o(t,"UL",{"data-svelte-h":!0}),r($)!=="svelte-aa6btk"&&($.innerHTML=st),W=s(t),C=o(t,"P",{}),lt(C).forEach(i),this.h()},h(){ot(d,"name","hf:doc:metadata"),ot(d,"content",xt)},m(t,e){gt(document.head,d),n(t,M,e),n(t,T,e),n(t,k,e),E(f,t,e),n(t,L,e),n(t,u,e),n(t,H,e),n(t,p,e),n(t,B,e),n(t,m,e),n(t,I,e),n(t,c,e),n(t,P,e),n(t,h,e),n(t,R,e),n(t,g,e),n(t,U,e),E(b,t,e),n(t,j,e),n(t,x,e),n(t,J,e),E(w,t,e),n(t,Z,e),n(t,y,e),n(t,F,e),E(v,t,e),n(t,q,e),n(t,_,e),n(t,S,e),n(t,$,e),n(t,W,e),n(t,C,e),X=!0},p:ut,i(t){X||(G(f.$$.fragment,t),G(b.$$.fragment,t),G(w.$$.fragment,t),G(v.$$.fragment,t),X=!0)},o(t){D(f.$$.fragment,t),D(b.$$.fragment,t),D(w.$$.fragment,t),D(v.$$.fragment,t),X=!1},d(t){t&&(i(M),i(T),i(k),i(L),i(u),i(H),i(p),i(B),i(m),i(I),i(c),i(P),i(h),i(R),i(g),i(U),i(j),i(x),i(J),i(Z),i(y),i(F),i(q),i(_),i(S),i($),i(W),i(C)),i(d),Y(f,t),Y(b,t),Y(w,t),Y(v,t)}}}const xt='{"title":"Overview","local":"overview","sections":[{"title":"Install","local":"install","sections":[],"depth":2}],"depth":1}';function wt(O){return pt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Tt extends mt{constructor(d){super(),ct(this,d,wt,bt,ft,{})}}export{Tt as component}; | |
Xet Storage Details
- Size:
- 9.49 kB
- Xet hash:
- 2922508ac9997e6606ce3d8b6c38be6d674945f55361a39e1312bdc088a5170a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.