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