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