import{S as Nn,i as Rn,s as Gn,e as a,k as f,w as Wt,t as n,M as qn,c as r,d as t,m as h,a as l,x as Ut,h as s,b as i,N as Fr,G as e,g as u,y as Bt,L as Cn,q as Ft,o as jt,B as zt,v as Pn}from"../../chunks/vendor-hf-doc-builder.js";import{I as jr}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as Sn}from"../../chunks/CodeBlock-hf-doc-builder.js";function Ln(zr){let S,Jt,N,q,Le,X,_o,Me,Eo,Yt,C,bo,He,xo,wo,Kt,b,We,To,ko,Ue,$o,Ao,Be,Io,Oo,Z,Do,Qt,y,So,Fe,No,Ro,je,Go,qo,ze,Co,Po,Je,Lo,Mo,Vt,x,p,Ye,Ho,Wo,Ke,Uo,Bo,Qe,Fo,jo,Ve,zo,Jo,ee,Yo,Ko,Xe,Qo,Vo,te,Xo,Zo,ea,ce,Ze,ta,oa,aa,P,et,ra,la,tt,na,sa,ia,L,ot,fa,ha,at,da,ua,Xt,m,ca,rt,pa,ma,lt,ga,va,nt,ya,_a,st,Ea,ba,oe,xa,wa,ae,Ta,ka,Zt,pe,$a,eo,_,it,me,Aa,Ia,ft,ge,Oa,Da,ht,ve,Sa,Na,dt,ye,Ra,Ga,ut,_e,qa,to,M,Ca,Ee,Pa,La,oo,H,ct,w,pt,Ma,Ha,mt,Wa,Ua,be,Ba,Fa,xe,ja,za,T,k,gt,we,vt,Ja,Ya,yt,Ka,Qa,Te,Va,Xa,ke,re,$e,Jr,Za,$,_t,Ae,Et,er,tr,bt,or,ar,Ie,rr,lr,xt,nr,A,wt,Oe,Tt,sr,ir,kt,fr,hr,De,dr,ur,Se,le,Ne,Yr,cr,I,$t,Re,At,pr,mr,It,gr,vr,Ge,yr,_r,qe,ne,Ce,Kr,ao,R,W,Ot,se,Er,Dt,br,ro,c,xr,St,wr,Tr,Nt,kr,$r,Rt,Ar,Ir,ie,Or,Dr,Gt,Sr,Nr,fe,Rr,Gr,qt,qr,Cr,lo,G,U,Ct,he,Pr,Pt,Lr,no,B,Mr,Lt,Hr,Wr,so,de,io,Pe,Ur,fo,ue,ho;return X=new jr({}),se=new jr({}),he=new jr({}),de=new Sn({props:{code:`git clone https://github.com/huggingface/diffusers
cd diffusers
pip install .`,highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/diffusers
<span class="hljs-built_in">cd</span> diffusers
pip install .`}}),ue=new Sn({props:{code:"pip install -r requirements.txt",highlighted:"pip install -r requirements.txt"}}),{c(){S=a("meta"),Jt=f(),N=a("h1"),q=a("a"),Le=a("span"),Wt(X.$$.fragment),_o=f(),Me=a("span"),Eo=n("\u{1F9E8} Diffusers Training Examples"),Yt=f(),C=a("p"),bo=n("Diffusers training examples are a collection of scripts to demonstrate how to effectively use the "),He=a("code"),xo=n("diffusers"),wo=n(` library
for a variety of use cases.`),Kt=f(),b=a("p"),We=a("strong"),To=n("Note"),ko=n(": If you are looking for "),Ue=a("strong"),$o=n("official"),Ao=n(" examples on how to use "),Be=a("code"),Io=n("diffusers"),Oo=n(` for inference,
please have a look at `),Z=a("a"),Do=n("src/diffusers/pipelines"),Qt=f(),y=a("p"),So=n("Our examples aspire to be "),Fe=a("strong"),No=n("self-contained"),Ro=n(", "),je=a("strong"),Go=n("easy-to-tweak"),qo=n(", "),ze=a("strong"),Co=n("beginner-friendly"),Po=n(" and for "),Je=a("strong"),Lo=n("one-purpose-only"),Mo=n(`.
More specifically, this means:`),Vt=f(),x=a("ul"),p=a("li"),Ye=a("strong"),Ho=n("Self-contained"),Wo=n(": An example script shall only depend on \u201Cpip-install-able\u201D Python packages that can be found in a "),Ke=a("code"),Uo=n("requirements.txt"),Bo=n(" file. Example scripts shall "),Qe=a("strong"),Fo=n("not"),jo=n(" depend on any local files. This means that one can simply download an example script, "),Ve=a("em"),zo=n("e.g."),Jo=f(),ee=a("a"),Yo=n("train_unconditional.py"),Ko=n(", install the required dependencies, "),Xe=a("em"),Qo=n("e.g."),Vo=f(),te=a("a"),Xo=n("requirements.txt"),Zo=n(" and execute the example script."),ea=f(),ce=a("li"),Ze=a("strong"),ta=n("Easy-to-tweak"),oa=n(": While we strive to present as many use cases as possible, the example scripts are just that - examples. It is expected that they won\u2019t work out-of-the box on your specific problem and that you will be required to change a few lines of code to adapt them to your needs. To help you with that, most of the examples fully expose the preprocessing of the data and the training loop to allow you to tweak and edit them as required."),aa=f(),P=a("li"),et=a("strong"),ra=n("Beginner-friendly"),la=n(": We do not aim for providing state-of-the-art training scripts for the newest models, but rather examples that can be used as a way to better understand diffusion models and how to use them with the "),tt=a("code"),na=n("diffusers"),sa=n(" library. We often purposefully leave out certain state-of-the-art methods if we consider them too complex for beginners."),ia=f(),L=a("li"),ot=a("strong"),fa=n("One-purpose-only"),ha=n(`: Examples should show one task and one task only. Even if a task is from a modeling
point of view very similar, `),at=a("em"),da=n("e.g."),ua=n(" image super-resolution and image modification tend to use the same model and training method, we want examples to showcase only one task to keep them as readable and easy-to-understand as possible."),Xt=f(),m=a("p"),ca=n("We provide "),rt=a("strong"),pa=n("official"),ma=n(` examples that cover the most popular tasks of diffusion models.
`),lt=a("em"),ga=n("Official"),va=n(" examples are "),nt=a("strong"),ya=n("actively"),_a=n(" maintained by the "),st=a("code"),Ea=n("diffusers"),ba=n(` maintainers and we try to rigorously follow our example philosophy as defined above.
If you feel like another important example should exist, we are more than happy to welcome a `),oe=a("a"),xa=n("Feature Request"),wa=n(" or directly a "),ae=a("a"),Ta=n("Pull Request"),ka=n(" from you!"),Zt=f(),pe=a("p"),$a=n("Training examples show how to pretrain or fine-tune diffusion models for a variety of tasks. Currently we support:"),eo=f(),_=a("ul"),it=a("li"),me=a("a"),Aa=n("Unconditional Training"),Ia=f(),ft=a("li"),ge=a("a"),Oa=n("Text-to-Image Training"),Da=f(),ht=a("li"),ve=a("a"),Sa=n("Text Inversion"),Na=f(),dt=a("li"),ye=a("a"),Ra=n("Dreambooth"),Ga=f(),ut=a("li"),_e=a("a"),qa=n("LoRA Support"),to=f(),M=a("p"),Ca=n("If possible, please "),Ee=a("a"),Pa=n("install xFormers"),La=n(" for memory efficient attention. This could help make your training faster and less memory intensive."),oo=f(),H=a("table"),ct=a("thead"),w=a("tr"),pt=a("th"),Ma=n("Task"),Ha=f(),mt=a("th"),Wa=n("\u{1F917} Accelerate"),Ua=f(),be=a("th"),Ba=n("\u{1F917} Datasets"),Fa=f(),xe=a("th"),ja=n("Colab"),za=f(),T=a("tbody"),k=a("tr"),gt=a("td"),we=a("a"),vt=a("strong"),Ja=n("Unconditional Image Generation"),Ya=f(),yt=a("td"),Ka=n("\u2705"),Qa=f(),Te=a("td"),Va=n("\u2705"),Xa=f(),ke=a("td"),re=a("a"),$e=a("img"),Za=f(),$=a("tr"),_t=a("td"),Ae=a("a"),Et=a("strong"),er=n("Text-to-Image fine-tuning"),tr=f(),bt=a("td"),or=n("\u2705"),ar=f(),Ie=a("td"),rr=n("\u2705"),lr=f(),xt=a("td"),nr=f(),A=a("tr"),wt=a("td"),Oe=a("a"),Tt=a("strong"),sr=n("Textual Inversion"),ir=f(),kt=a("td"),fr=n("\u2705"),hr=f(),De=a("td"),dr=n("-"),ur=f(),Se=a("td"),le=a("a"),Ne=a("img"),cr=f(),I=a("tr"),$t=a("td"),Re=a("a"),At=a("strong"),pr=n("Dreambooth"),mr=f(),It=a("td"),gr=n("\u2705"),vr=f(),Ge=a("td"),yr=n("-"),_r=f(),qe=a("td"),ne=a("a"),Ce=a("img"),ao=f(),R=a("h2"),W=a("a"),Ot=a("span"),Wt(se.$$.fragment),Er=f(),Dt=a("span"),br=n("Community"),ro=f(),c=a("p"),xr=n("In addition, we provide "),St=a("strong"),wr=n("community"),Tr=n(` examples, which are examples added and maintained by our community.
Community examples can consist of both `),Nt=a("em"),kr=n("training"),$r=n(" examples or "),Rt=a("em"),Ar=n("inference"),Ir=n(` pipelines.
For such examples, we are more lenient regarding the philosophy defined above and also cannot guarantee to provide maintenance for every issue.
Examples that are useful for the community, but are either not yet deemed popular or not yet following our above philosophy should go into the `),ie=a("a"),Or=n("community examples"),Dr=n(` folder. The community folder therefore includes training examples and inference pipelines.
`),Gt=a("strong"),Sr=n("Note"),Nr=n(": Community examples can be a "),fe=a("a"),Rr=n("great first contribution"),Gr=n(" to show to the community how you like to use "),qt=a("code"),qr=n("diffusers"),Cr=n(" \u{1FA84}."),lo=f(),G=a("h2"),U=a("a"),Ct=a("span"),Wt(he.$$.fragment),Pr=f(),Pt=a("span"),Lr=n("Important note"),no=f(),B=a("p"),Mr=n("To make sure you can successfully run the latest versions of the example scripts, you have to "),Lt=a("strong"),Hr=n("install the library from source"),Wr=n(" and install some example-specific requirements. To do this, execute the following steps in a new virtual environment:"),so=f(),Wt(de.$$.fragment),io=f(),Pe=a("p"),Ur=n("Then cd in the example folder of your choice and run"),fo=f(),Wt(ue.$$.fragment),this.h()},l(o){const d=qn('[data-svelte="svelte-1phssyn"]',document.head);S=r(d,"META",{name:!0,content:!0}),d.forEach(t),Jt=h(o),N=r(o,"H1",{class:!0});var uo=l(N);q=r(uo,"A",{id:!0,class:!0,href:!0});var Qr=l(q);Le=r(Qr,"SPAN",{});var Vr=l(Le);Ut(X.$$.fragment,Vr),Vr.forEach(t),Qr.forEach(t),_o=h(uo),Me=r(uo,"SPAN",{});var Xr=l(Me);Eo=s(Xr,"\u{1F9E8} Diffusers Training Examples"),Xr.forEach(t),uo.forEach(t),Yt=h(o),C=r(o,"P",{});var co=l(C);bo=s(co,"Diffusers training examples are a collection of scripts to demonstrate how to effectively use the "),He=r(co,"CODE",{});var Zr=l(He);xo=s(Zr,"diffusers"),Zr.forEach(t),wo=s(co,` library
for a variety of use cases.`),co.forEach(t),Kt=h(o),b=r(o,"P",{});var F=l(b);We=r(F,"STRONG",{});var el=l(We);To=s(el,"Note"),el.forEach(t),ko=s(F,": If you are looking for "),Ue=r(F,"STRONG",{});var tl=l(Ue);$o=s(tl,"official"),tl.forEach(t),Ao=s(F," examples on how to use "),Be=r(F,"CODE",{});var ol=l(Be);Io=s(ol,"diffusers"),ol.forEach(t),Oo=s(F,` for inference,
please have a look at `),Z=r(F,"A",{href:!0,rel:!0});var al=l(Z);Do=s(al,"src/diffusers/pipelines"),al.forEach(t),F.forEach(t),Qt=h(o),y=r(o,"P",{});var O=l(y);So=s(O,"Our examples aspire to be "),Fe=r(O,"STRONG",{});var rl=l(Fe);No=s(rl,"self-contained"),rl.forEach(t),Ro=s(O,", "),je=r(O,"STRONG",{});var ll=l(je);Go=s(ll,"easy-to-tweak"),ll.forEach(t),qo=s(O,", "),ze=r(O,"STRONG",{});var nl=l(ze);Co=s(nl,"beginner-friendly"),nl.forEach(t),Po=s(O," and for "),Je=r(O,"STRONG",{});var sl=l(Je);Lo=s(sl,"one-purpose-only"),sl.forEach(t),Mo=s(O,`.
More specifically, this means:`),O.forEach(t),Vt=h(o),x=r(o,"UL",{});var j=l(x);p=r(j,"LI",{});var v=l(p);Ye=r(v,"STRONG",{});var il=l(Ye);Ho=s(il,"Self-contained"),il.forEach(t),Wo=s(v,": An example script shall only depend on \u201Cpip-install-able\u201D Python packages that can be found in a "),Ke=r(v,"CODE",{});var fl=l(Ke);Uo=s(fl,"requirements.txt"),fl.forEach(t),Bo=s(v," file. Example scripts shall "),Qe=r(v,"STRONG",{});var hl=l(Qe);Fo=s(hl,"not"),hl.forEach(t),jo=s(v," depend on any local files. This means that one can simply download an example script, "),Ve=r(v,"EM",{});var dl=l(Ve);zo=s(dl,"e.g."),dl.forEach(t),Jo=h(v),ee=r(v,"A",{href:!0,rel:!0});var ul=l(ee);Yo=s(ul,"train_unconditional.py"),ul.forEach(t),Ko=s(v,", install the required dependencies, "),Xe=r(v,"EM",{});var cl=l(Xe);Qo=s(cl,"e.g."),cl.forEach(t),Vo=h(v),te=r(v,"A",{href:!0,rel:!0});var pl=l(te);Xo=s(pl,"requirements.txt"),pl.forEach(t),Zo=s(v," and execute the example script."),v.forEach(t),ea=h(j),ce=r(j,"LI",{});var Br=l(ce);Ze=r(Br,"STRONG",{});var ml=l(Ze);ta=s(ml,"Easy-to-tweak"),ml.forEach(t),oa=s(Br,": While we strive to present as many use cases as possible, the example scripts are just that - examples. It is expected that they won\u2019t work out-of-the box on your specific problem and that you will be required to change a few lines of code to adapt them to your needs. To help you with that, most of the examples fully expose the preprocessing of the data and the training loop to allow you to tweak and edit them as required."),Br.forEach(t),aa=h(j),P=r(j,"LI",{});var Mt=l(P);et=r(Mt,"STRONG",{});var gl=l(et);ra=s(gl,"Beginner-friendly"),gl.forEach(t),la=s(Mt,": We do not aim for providing state-of-the-art training scripts for the newest models, but rather examples that can be used as a way to better understand diffusion models and how to use them with the "),tt=r(Mt,"CODE",{});var vl=l(tt);na=s(vl,"diffusers"),vl.forEach(t),sa=s(Mt," library. We often purposefully leave out certain state-of-the-art methods if we consider them too complex for beginners."),Mt.forEach(t),ia=h(j),L=r(j,"LI",{});var Ht=l(L);ot=r(Ht,"STRONG",{});var yl=l(ot);fa=s(yl,"One-purpose-only"),yl.forEach(t),ha=s(Ht,`: Examples should show one task and one task only. Even if a task is from a modeling
point of view very similar, `),at=r(Ht,"EM",{});var _l=l(at);da=s(_l,"e.g."),_l.forEach(t),ua=s(Ht," image super-resolution and image modification tend to use the same model and training method, we want examples to showcase only one task to keep them as readable and easy-to-understand as possible."),Ht.forEach(t),j.forEach(t),Xt=h(o),m=r(o,"P",{});var E=l(m);ca=s(E,"We provide "),rt=r(E,"STRONG",{});var El=l(rt);pa=s(El,"official"),El.forEach(t),ma=s(E,` examples that cover the most popular tasks of diffusion models.
`),lt=r(E,"EM",{});var bl=l(lt);ga=s(bl,"Official"),bl.forEach(t),va=s(E," examples are "),nt=r(E,"STRONG",{});var xl=l(nt);ya=s(xl,"actively"),xl.forEach(t),_a=s(E," maintained by the "),st=r(E,"CODE",{});var wl=l(st);Ea=s(wl,"diffusers"),wl.forEach(t),ba=s(E,` maintainers and we try to rigorously follow our example philosophy as defined above.
If you feel like another important example should exist, we are more than happy to welcome a `),oe=r(E,"A",{href:!0,rel:!0});var Tl=l(oe);xa=s(Tl,"Feature Request"),Tl.forEach(t),wa=s(E," or directly a "),ae=r(E,"A",{href:!0,rel:!0});var kl=l(ae);Ta=s(kl,"Pull Request"),kl.forEach(t),ka=s(E," from you!"),E.forEach(t),Zt=h(o),pe=r(o,"P",{});var $l=l(pe);$a=s($l,"Training examples show how to pretrain or fine-tune diffusion models for a variety of tasks. Currently we support:"),$l.forEach(t),eo=h(o),_=r(o,"UL",{});var D=l(_);it=r(D,"LI",{});var Al=l(it);me=r(Al,"A",{href:!0});var Il=l(me);Aa=s(Il,"Unconditional Training"),Il.forEach(t),Al.forEach(t),Ia=h(D),ft=r(D,"LI",{});var Ol=l(ft);ge=r(Ol,"A",{href:!0});var Dl=l(ge);Oa=s(Dl,"Text-to-Image Training"),Dl.forEach(t),Ol.forEach(t),Da=h(D),ht=r(D,"LI",{});var Sl=l(ht);ve=r(Sl,"A",{href:!0});var Nl=l(ve);Sa=s(Nl,"Text Inversion"),Nl.forEach(t),Sl.forEach(t),Na=h(D),dt=r(D,"LI",{});var Rl=l(dt);ye=r(Rl,"A",{href:!0});var Gl=l(ye);Ra=s(Gl,"Dreambooth"),Gl.forEach(t),Rl.forEach(t),Ga=h(D),ut=r(D,"LI",{});var ql=l(ut);_e=r(ql,"A",{href:!0});var Cl=l(_e);qa=s(Cl,"LoRA Support"),Cl.forEach(t),ql.forEach(t),D.forEach(t),to=h(o),M=r(o,"P",{});var po=l(M);Ca=s(po,"If possible, please "),Ee=r(po,"A",{href:!0});var Pl=l(Ee);Pa=s(Pl,"install xFormers"),Pl.forEach(t),La=s(po," for memory efficient attention. This could help make your training faster and less memory intensive."),po.forEach(t),oo=h(o),H=r(o,"TABLE",{});var mo=l(H);ct=r(mo,"THEAD",{});var Ll=l(ct);w=r(Ll,"TR",{});var z=l(w);pt=r(z,"TH",{});var Ml=l(pt);Ma=s(Ml,"Task"),Ml.forEach(t),Ha=h(z),mt=r(z,"TH",{});var Hl=l(mt);Wa=s(Hl,"\u{1F917} Accelerate"),Hl.forEach(t),Ua=h(z),be=r(z,"TH",{align:!0});var Wl=l(be);Ba=s(Wl,"\u{1F917} Datasets"),Wl.forEach(t),Fa=h(z),xe=r(z,"TH",{align:!0});var Ul=l(xe);ja=s(Ul,"Colab"),Ul.forEach(t),z.forEach(t),Ll.forEach(t),za=h(mo),T=r(mo,"TBODY",{});var J=l(T);k=r(J,"TR",{});var Y=l(k);gt=r(Y,"TD",{});var Bl=l(gt);we=r(Bl,"A",{href:!0});var Fl=l(we);vt=r(Fl,"STRONG",{});var jl=l(vt);Ja=s(jl,"Unconditional Image Generation"),jl.forEach(t),Fl.forEach(t),Bl.forEach(t),Ya=h(Y),yt=r(Y,"TD",{});var zl=l(yt);Ka=s(zl,"\u2705"),zl.forEach(t),Qa=h(Y),Te=r(Y,"TD",{align:!0});var Jl=l(Te);Va=s(Jl,"\u2705"),Jl.forEach(t),Xa=h(Y),ke=r(Y,"TD",{align:!0});var Yl=l(ke);re=r(Yl,"A",{href:!0,rel:!0});var Kl=l(re);$e=r(Kl,"IMG",{src:!0,alt:!0}),Kl.forEach(t),Yl.forEach(t),Y.forEach(t),Za=h(J),$=r(J,"TR",{});var K=l($);_t=r(K,"TD",{});var Ql=l(_t);Ae=r(Ql,"A",{href:!0});var Vl=l(Ae);Et=r(Vl,"STRONG",{});var Xl=l(Et);er=s(Xl,"Text-to-Image fine-tuning"),Xl.forEach(t),Vl.forEach(t),Ql.forEach(t),tr=h(K),bt=r(K,"TD",{});var Zl=l(bt);or=s(Zl,"\u2705"),Zl.forEach(t),ar=h(K),Ie=r(K,"TD",{align:!0});var en=l(Ie);rr=s(en,"\u2705"),en.forEach(t),lr=h(K),xt=r(K,"TD",{align:!0}),l(xt).forEach(t),K.forEach(t),nr=h(J),A=r(J,"TR",{});var Q=l(A);wt=r(Q,"TD",{});var tn=l(wt);Oe=r(tn,"A",{href:!0});var on=l(Oe);Tt=r(on,"STRONG",{});var an=l(Tt);sr=s(an,"Textual Inversion"),an.forEach(t),on.forEach(t),tn.forEach(t),ir=h(Q),kt=r(Q,"TD",{});var rn=l(kt);fr=s(rn,"\u2705"),rn.forEach(t),hr=h(Q),De=r(Q,"TD",{align:!0});var ln=l(De);dr=s(ln,"-"),ln.forEach(t),ur=h(Q),Se=r(Q,"TD",{align:!0});var nn=l(Se);le=r(nn,"A",{href:!0,rel:!0});var sn=l(le);Ne=r(sn,"IMG",{src:!0,alt:!0}),sn.forEach(t),nn.forEach(t),Q.forEach(t),cr=h(J),I=r(J,"TR",{});var V=l(I);$t=r(V,"TD",{});var fn=l($t);Re=r(fn,"A",{href:!0});var hn=l(Re);At=r(hn,"STRONG",{});var dn=l(At);pr=s(dn,"Dreambooth"),dn.forEach(t),hn.forEach(t),fn.forEach(t),mr=h(V),It=r(V,"TD",{});var un=l(It);gr=s(un,"\u2705"),un.forEach(t),vr=h(V),Ge=r(V,"TD",{align:!0});var cn=l(Ge);yr=s(cn,"-"),cn.forEach(t),_r=h(V),qe=r(V,"TD",{align:!0});var pn=l(qe);ne=r(pn,"A",{href:!0,rel:!0});var mn=l(ne);Ce=r(mn,"IMG",{src:!0,alt:!0}),mn.forEach(t),pn.forEach(t),V.forEach(t),J.forEach(t),mo.forEach(t),ao=h(o),R=r(o,"H2",{class:!0});var go=l(R);W=r(go,"A",{id:!0,class:!0,href:!0});var gn=l(W);Ot=r(gn,"SPAN",{});var vn=l(Ot);Ut(se.$$.fragment,vn),vn.forEach(t),gn.forEach(t),Er=h(go),Dt=r(go,"SPAN",{});var yn=l(Dt);br=s(yn,"Community"),yn.forEach(t),go.forEach(t),ro=h(o),c=r(o,"P",{});var g=l(c);xr=s(g,"In addition, we provide "),St=r(g,"STRONG",{});var _n=l(St);wr=s(_n,"community"),_n.forEach(t),Tr=s(g,` examples, which are examples added and maintained by our community.
Community examples can consist of both `),Nt=r(g,"EM",{});var En=l(Nt);kr=s(En,"training"),En.forEach(t),$r=s(g," examples or "),Rt=r(g,"EM",{});var bn=l(Rt);Ar=s(bn,"inference"),bn.forEach(t),Ir=s(g,` pipelines.
For such examples, we are more lenient regarding the philosophy defined above and also cannot guarantee to provide maintenance for every issue.
Examples that are useful for the community, but are either not yet deemed popular or not yet following our above philosophy should go into the `),ie=r(g,"A",{href:!0,rel:!0});var xn=l(ie);Or=s(xn,"community examples"),xn.forEach(t),Dr=s(g,` folder. The community folder therefore includes training examples and inference pipelines.
`),Gt=r(g,"STRONG",{});var wn=l(Gt);Sr=s(wn,"Note"),wn.forEach(t),Nr=s(g,": Community examples can be a "),fe=r(g,"A",{href:!0,rel:!0});var Tn=l(fe);Rr=s(Tn,"great first contribution"),Tn.forEach(t),Gr=s(g," to show to the community how you like to use "),qt=r(g,"CODE",{});var kn=l(qt);qr=s(kn,"diffusers"),kn.forEach(t),Cr=s(g," \u{1FA84}."),g.forEach(t),lo=h(o),G=r(o,"H2",{class:!0});var vo=l(G);U=r(vo,"A",{id:!0,class:!0,href:!0});var $n=l(U);Ct=r($n,"SPAN",{});var An=l(Ct);Ut(he.$$.fragment,An),An.forEach(t),$n.forEach(t),Pr=h(vo),Pt=r(vo,"SPAN",{});var In=l(Pt);Lr=s(In,"Important note"),In.forEach(t),vo.forEach(t),no=h(o),B=r(o,"P",{});var yo=l(B);Mr=s(yo,"To make sure you can successfully run the latest versions of the example scripts, you have to "),Lt=r(yo,"STRONG",{});var On=l(Lt);Hr=s(On,"install the library from source"),On.forEach(t),Wr=s(yo," and install some example-specific requirements. To do this, execute the following steps in a new virtual environment:"),yo.forEach(t),so=h(o),Ut(de.$$.fragment,o),io=h(o),Pe=r(o,"P",{});var Dn=l(Pe);Ur=s(Dn,"Then cd in the example folder of your choice and run"),Dn.forEach(t),fo=h(o),Ut(ue.$$.fragment,o),this.h()},h(){i(S,"name","hf:doc:metadata"),i(S,"content",JSON.stringify(Mn)),i(q,"id","diffusers-training-examples"),i(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(q,"href","#diffusers-training-examples"),i(N,"class","relative group"),i(Z,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines"),i(Z,"rel","nofollow"),i(ee,"href","https://github.com/huggingface/diffusers/blob/main/examples/unconditional_image_generation/train_unconditional.py"),i(ee,"rel","nofollow"),i(te,"href","https://github.com/huggingface/diffusers/blob/main/examples/unconditional_image_generation/requirements.txt"),i(te,"rel","nofollow"),i(oe,"href","https://github.com/huggingface/diffusers/issues/new?assignees=&labels=&template=feature_request.md&title="),i(oe,"rel","nofollow"),i(ae,"href","https://github.com/huggingface/diffusers/compare"),i(ae,"rel","nofollow"),i(me,"href","./unconditional_training"),i(ge,"href","./text2image"),i(ve,"href","./text_inversion"),i(ye,"href","./dreambooth"),i(_e,"href","./lora"),i(Ee,"href","../optimization/xformers"),i(be,"align","center"),i(xe,"align","center"),i(we,"href","./unconditional_training"),i(Te,"align","center"),Fr($e.src,Jr="https://colab.research.google.com/assets/colab-badge.svg")||i($e,"src",Jr),i($e,"alt","Open In Colab"),i(re,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb"),i(re,"rel","nofollow"),i(ke,"align","center"),i(Ae,"href","./text2image"),i(Ie,"align","center"),i(xt,"align","center"),i(Oe,"href","./text_inversion"),i(De,"align","center"),Fr(Ne.src,Yr="https://colab.research.google.com/assets/colab-badge.svg")||i(Ne,"src",Yr),i(Ne,"alt","Open In Colab"),i(le,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_textual_inversion_training.ipynb"),i(le,"rel","nofollow"),i(Se,"align","center"),i(Re,"href","./dreambooth"),i(Ge,"align","center"),Fr(Ce.src,Kr="https://colab.research.google.com/assets/colab-badge.svg")||i(Ce,"src",Kr),i(Ce,"alt","Open In Colab"),i(ne,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_dreambooth_training.ipynb"),i(ne,"rel","nofollow"),i(qe,"align","center"),i(W,"id","community"),i(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(W,"href","#community"),i(R,"class","relative group"),i(ie,"href","https://github.com/huggingface/diffusers/tree/main/examples/community"),i(ie,"rel","nofollow"),i(fe,"href","https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22"),i(fe,"rel","nofollow"),i(U,"id","important-note"),i(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(U,"href","#important-note"),i(G,"class","relative group")},m(o,d){e(document.head,S),u(o,Jt,d),u(o,N,d),e(N,q),e(q,Le),Bt(X,Le,null),e(N,_o),e(N,Me),e(Me,Eo),u(o,Yt,d),u(o,C,d),e(C,bo),e(C,He),e(He,xo),e(C,wo),u(o,Kt,d),u(o,b,d),e(b,We),e(We,To),e(b,ko),e(b,Ue),e(Ue,$o),e(b,Ao),e(b,Be),e(Be,Io),e(b,Oo),e(b,Z),e(Z,Do),u(o,Qt,d),u(o,y,d),e(y,So),e(y,Fe),e(Fe,No),e(y,Ro),e(y,je),e(je,Go),e(y,qo),e(y,ze),e(ze,Co),e(y,Po),e(y,Je),e(Je,Lo),e(y,Mo),u(o,Vt,d),u(o,x,d),e(x,p),e(p,Ye),e(Ye,Ho),e(p,Wo),e(p,Ke),e(Ke,Uo),e(p,Bo),e(p,Qe),e(Qe,Fo),e(p,jo),e(p,Ve),e(Ve,zo),e(p,Jo),e(p,ee),e(ee,Yo),e(p,Ko),e(p,Xe),e(Xe,Qo),e(p,Vo),e(p,te),e(te,Xo),e(p,Zo),e(x,ea),e(x,ce),e(ce,Ze),e(Ze,ta),e(ce,oa),e(x,aa),e(x,P),e(P,et),e(et,ra),e(P,la),e(P,tt),e(tt,na),e(P,sa),e(x,ia),e(x,L),e(L,ot),e(ot,fa),e(L,ha),e(L,at),e(at,da),e(L,ua),u(o,Xt,d),u(o,m,d),e(m,ca),e(m,rt),e(rt,pa),e(m,ma),e(m,lt),e(lt,ga),e(m,va),e(m,nt),e(nt,ya),e(m,_a),e(m,st),e(st,Ea),e(m,ba),e(m,oe),e(oe,xa),e(m,wa),e(m,ae),e(ae,Ta),e(m,ka),u(o,Zt,d),u(o,pe,d),e(pe,$a),u(o,eo,d),u(o,_,d),e(_,it),e(it,me),e(me,Aa),e(_,Ia),e(_,ft),e(ft,ge),e(ge,Oa),e(_,Da),e(_,ht),e(ht,ve),e(ve,Sa),e(_,Na),e(_,dt),e(dt,ye),e(ye,Ra),e(_,Ga),e(_,ut),e(ut,_e),e(_e,qa),u(o,to,d),u(o,M,d),e(M,Ca),e(M,Ee),e(Ee,Pa),e(M,La),u(o,oo,d),u(o,H,d),e(H,ct),e(ct,w),e(w,pt),e(pt,Ma),e(w,Ha),e(w,mt),e(mt,Wa),e(w,Ua),e(w,be),e(be,Ba),e(w,Fa),e(w,xe),e(xe,ja),e(H,za),e(H,T),e(T,k),e(k,gt),e(gt,we),e(we,vt),e(vt,Ja),e(k,Ya),e(k,yt),e(yt,Ka),e(k,Qa),e(k,Te),e(Te,Va),e(k,Xa),e(k,ke),e(ke,re),e(re,$e),e(T,Za),e(T,$),e($,_t),e(_t,Ae),e(Ae,Et),e(Et,er),e($,tr),e($,bt),e(bt,or),e($,ar),e($,Ie),e(Ie,rr),e($,lr),e($,xt),e(T,nr),e(T,A),e(A,wt),e(wt,Oe),e(Oe,Tt),e(Tt,sr),e(A,ir),e(A,kt),e(kt,fr),e(A,hr),e(A,De),e(De,dr),e(A,ur),e(A,Se),e(Se,le),e(le,Ne),e(T,cr),e(T,I),e(I,$t),e($t,Re),e(Re,At),e(At,pr),e(I,mr),e(I,It),e(It,gr),e(I,vr),e(I,Ge),e(Ge,yr),e(I,_r),e(I,qe),e(qe,ne),e(ne,Ce),u(o,ao,d),u(o,R,d),e(R,W),e(W,Ot),Bt(se,Ot,null),e(R,Er),e(R,Dt),e(Dt,br),u(o,ro,d),u(o,c,d),e(c,xr),e(c,St),e(St,wr),e(c,Tr),e(c,Nt),e(Nt,kr),e(c,$r),e(c,Rt),e(Rt,Ar),e(c,Ir),e(c,ie),e(ie,Or),e(c,Dr),e(c,Gt),e(Gt,Sr),e(c,Nr),e(c,fe),e(fe,Rr),e(c,Gr),e(c,qt),e(qt,qr),e(c,Cr),u(o,lo,d),u(o,G,d),e(G,U),e(U,Ct),Bt(he,Ct,null),e(G,Pr),e(G,Pt),e(Pt,Lr),u(o,no,d),u(o,B,d),e(B,Mr),e(B,Lt),e(Lt,Hr),e(B,Wr),u(o,so,d),Bt(de,o,d),u(o,io,d),u(o,Pe,d),e(Pe,Ur),u(o,fo,d),Bt(ue,o,d),ho=!0},p:Cn,i(o){ho||(Ft(X.$$.fragment,o),Ft(se.$$.fragment,o),Ft(he.$$.fragment,o),Ft(de.$$.fragment,o),Ft(ue.$$.fragment,o),ho=!0)},o(o){jt(X.$$.fragment,o),jt(se.$$.fragment,o),jt(he.$$.fragment,o),jt(de.$$.fragment,o),jt(ue.$$.fragment,o),ho=!1},d(o){t(S),o&&t(Jt),o&&t(N),zt(X),o&&t(Yt),o&&t(C),o&&t(Kt),o&&t(b),o&&t(Qt),o&&t(y),o&&t(Vt),o&&t(x),o&&t(Xt),o&&t(m),o&&t(Zt),o&&t(pe),o&&t(eo),o&&t(_),o&&t(to),o&&t(M),o&&t(oo),o&&t(H),o&&t(ao),o&&t(R),zt(se),o&&t(ro),o&&t(c),o&&t(lo),o&&t(G),zt(he),o&&t(no),o&&t(B),o&&t(so),zt(de,o),o&&t(io),o&&t(Pe),o&&t(fo),zt(ue,o)}}}const Mn={local:"diffusers-training-examples",sections:[{local:"community",title:"Community"},{local:"important-note",title:"Important note"}],title:"\u{1F9E8} Diffusers Training Examples"};function Hn(zr){return Pn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fn extends Nn{constructor(S){super();Rn(this,S,Hn,Ln,Gn,{})}}export{Fn as default,Mn as metadata};
