import{S as zd,i as Jd,s as Qd,e as s,k as n,w as m,t as a,M as Xd,c as i,d as o,m as u,a as r,x as g,h as l,b as d,N as Kd,G as e,g as f,y,L as Vd,q as v,o as w,B as b,v as Zd}from"../../chunks/vendor-hf-doc-builder.js";import{I as C}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as E}from"../../chunks/CodeBlock-hf-doc-builder.js";function ep(vh){let G,ei,F,le,bo,Ce,Cr,$o,qr,ti,Gt,xr,oi,Ft,Nr,si,qe,Tr,Ut,Bt,wh,ii,ne,Hr,xe,Rr,jr,ri,U,ue,_o,Ne,Wr,ko,Gr,ai,Mt,Fr,li,P,Eo,Ur,Br,q,Mr,Te,Yr,zr,He,Jr,Qr,Re,Xr,Kr,Vr,Yt,je,Zr,ea,ta,zt,We,oa,sa,ia,Po,ra,ni,Jt,Io,aa,ui,B,he,Ao,Ge,la,So,na,hi,fe,ua,Fe,ha,fa,fi,N,Ue,da,Be,pa,ca,ma,Me,ga,Ye,ya,va,wa,ze,ba,Je,$a,_a,di,M,de,Do,Qe,ka,Lo,Ea,pi,Qt,Pa,ci,Y,pe,Oo,Xe,Ia,Co,Aa,mi,Xt,Sa,gi,ce,Da,qo,La,Oa,yi,z,me,xo,Ke,Ca,No,qa,vi,Kt,xa,wi,T,To,Na,Ta,Ho,Ha,Ra,Ro,ja,bi,Vt,Wa,$i,J,ge,jo,Ve,Ga,Wo,Fa,_i,Zt,Ua,ki,eo,Go,Ba,Ei,H,Fo,Ma,Ya,Uo,za,Ja,Bo,Qa,Pi,L,Ze,Xa,Mo,Ka,Va,Za,et,el,Yo,tl,ol,sl,zo,il,rl,Jo,al,Ii,to,ll,Ai,Q,ye,Qo,tt,nl,Xo,ul,Si,oo,hl,Di,I,fl,Ko,dl,pl,Vo,cl,ml,Zo,gl,yl,ot,vl,wl,Li,ve,bl,st,$l,_l,Oi,$,es,it,kl,rt,El,Pl,Il,at,ts,Al,Sl,lt,Dl,X,os,Ll,Ol,nt,Cl,we,ss,ql,xl,is,Nl,Tl,Hl,k,rs,Rl,jl,ut,Wl,K,Gl,as,Fl,Ul,ls,Bl,Ml,Yl,V,zl,ns,Jl,Ql,us,Xl,Kl,Vl,ht,Zl,ft,en,Z,tn,hs,on,sn,fs,rn,an,ln,p,ds,nn,un,ps,hn,fn,dt,dn,cs,pn,cn,pt,mn,so,gn,ct,yn,vn,ee,wn,ms,bn,$n,gs,_n,kn,En,mt,Pn,gt,In,ys,An,Sn,Dn,yt,Ln,te,On,vs,Cn,qn,ws,xn,Nn,Tn,vt,Hn,bs,Rn,jn,wt,Wn,$s,Gn,Fn,bt,Un,_s,$t,Bn,ks,Mn,Yn,zn,Es,Ps,Jn,Ci,oe,be,Is,_t,Qn,As,Xn,qi,_,Ss,Kn,Vn,Ds,Zn,eu,kt,tu,Ls,ou,su,iu,Os,ru,au,io,lu,Et,se,nu,Cs,uu,hu,qs,fu,du,pu,Pt,cu,xs,mu,gu,yu,It,vu,Ns,wu,bu,$u,x,_u,Ts,ku,Eu,At,Hs,Pu,Iu,St,Au,Su,xi,ie,$e,Rs,Dt,Du,js,Lu,Ni,_e,Ou,Lt,Cu,qu,Ti,O,xu,Ws,Nu,Tu,Gs,Hu,Ru,Fs,ju,Wu,Hi,Ot,Ri,ke,Gu,Us,Fu,Uu,ji,ro,Bu,Wi,R,Mu,Bs,Yu,zu,Ms,Ju,Qu,Gi,Ct,Fi,qt,Ys,Xu,Ku,Ui,xt,Bi,re,Ee,zs,Nt,Vu,Js,Zu,Mi,ao,eh,Yi,Pe,Qs,th,oh,Xs,sh,zi,Tt,Ji,ae,Ie,Ks,Ht,ih,Vs,rh,Qi,Ae,ah,Rt,lh,nh,Xi,lo,jt,uh,Wt,hh,fh,Ki;return Ce=new C({}),Ne=new C({}),Ge=new C({}),Qe=new C({}),Xe=new C({}),Ke=new C({}),Ve=new C({}),tt=new C({}),lt=new E({props:{code:`$ git clone git@github.com:<your Github handle>/diffusers.git
$ cd diffusers
$ git remote add upstream https://github.com/huggingface/diffusers.git`,highlighted:`$ git <span class="hljs-built_in">clone</span> git@github.com:&lt;your Github handle&gt;/diffusers.git
$ <span class="hljs-built_in">cd</span> diffusers
$ git remote add upstream https://github.com/huggingface/diffusers.git`}}),nt=new E({props:{code:"$ git checkout -b a-descriptive-name-for-my-changes",highlighted:"$ git checkout -b a-descriptive-name-for-my-changes"}}),ut=new E({props:{code:'$ pip install -e ".[dev]"',highlighted:'$ pip install -e <span class="hljs-string">&quot;.[dev]&quot;</span>'}}),ht=new E({props:{code:`$ git clone https://github.com/huggingface/transformers
$ cd transformers
$ pip install -e .`,highlighted:`$ git <span class="hljs-built_in">clone</span> https://github.com/huggingface/transformers
$ <span class="hljs-built_in">cd</span> transformers
$ pip install -e .`}}),ft=new E({props:{code:`$ git clone https://github.com/huggingface/datasets
$ cd datasets
$ pip install -e .`,highlighted:`$ git <span class="hljs-built_in">clone</span> https://github.com/huggingface/datasets
$ <span class="hljs-built_in">cd</span> datasets
$ pip install -e .`}}),dt=new E({props:{code:"$ pytest tests/<TEST_TO_RUN>.py",highlighted:"$ pytest tests/&lt;TEST_TO_RUN&gt;.py"}}),pt=new E({props:{code:"$ make test",highlighted:'$ make <span class="hljs-built_in">test</span>'}}),mt=new E({props:{code:"$ make style",highlighted:"$ make style"}}),yt=new E({props:{code:"$ make quality",highlighted:"$ make quality"}}),vt=new E({props:{code:`$ git add modified_file.py
$ git commit`,highlighted:`$ git add modified_file.py
$ git commit`}}),wt=new E({props:{code:`$ git fetch upstream
$ git rebase upstream/main`,highlighted:`$ git fetch upstream
$ git rebase upstream/main`}}),bt=new E({props:{code:"$ git push -u origin a-descriptive-name-for-my-changes",highlighted:"$ git push -u origin a-descriptive-name-for-my-changes"}}),_t=new C({}),Dt=new C({}),Ot=new E({props:{code:"$ python -m pytest -n auto --dist=loadfile -s -v ./tests/",highlighted:"$ python -m pytest -n auto --dist=loadfile -s -v ./tests/"}}),Ct=new E({props:{code:"$ RUN_SLOW=yes python -m pytest -n auto --dist=loadfile -s -v ./tests/",highlighted:'$ RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./tests/'}}),xt=new E({props:{code:`$ python -m unittest discover -s tests -t . -v
$ python -m unittest discover -s examples -t examples -v`,highlighted:`$ python -m unittest discover -s tests -t . -v
$ python -m unittest discover -s examples -t examples -v`}}),Nt=new C({}),Tt=new E({props:{code:`$ git checkout -b your-branch-for-syncing
$ git pull --squash --no-commit upstream main
$ git commit -m '<your message without GitHub references>'
$ git push --set-upstream origin your-branch-for-syncing`,highlighted:`<span class="hljs-symbol">$</span> git checkout -b your-branch-<span class="hljs-keyword">for</span>-syncing
<span class="hljs-symbol">$</span> git pull --squash --<span class="hljs-keyword">no</span>-commit upstream main
<span class="hljs-symbol">$</span> git commit -m <span class="hljs-string">&#x27;&lt;your message without GitHub references&gt;&#x27;</span>
<span class="hljs-symbol">$</span> git push --<span class="hljs-keyword">set</span>-upstream <span class="hljs-comment">origin your-branch-for-syncing</span>`}}),Ht=new C({}),{c(){G=s("meta"),ei=n(),F=s("h1"),le=s("a"),bo=s("span"),m(Ce.$$.fragment),Cr=n(),$o=s("span"),qr=a("How to contribute to Diffusers \u{1F9E8}"),ti=n(),Gt=s("p"),xr=a("We \u2764\uFE0F contributions from the open-source community! Everyone is welcome, and all types of participation \u2013not just code\u2013 are valued and appreciated. Answering questions, helping others, reaching out and improving the documentation are all immensely valuable to the community, so don\u2019t be afraid and get involved if you\u2019re up for it!"),oi=n(),Ft=s("p"),Nr=a(`It also helps us if you spread the word: reference the library from blog posts
on the awesome projects it made possible, shout out on Twitter every time it has
helped you, or simply star the repo to say \u201Cthank you\u201D.`),si=n(),qe=s("p"),Tr=a("We encourage everyone to start by saying \u{1F44B} in our public Discord channel. We discuss the hottest trends about diffusion models, ask questions, show-off personal projects, help each other with contributions, or just hang out \u2615. "),Ut=s("a"),Bt=s("img"),ii=n(),ne=s("p"),Hr=a("Whichever way you choose to contribute, we strive to be part of an open, welcoming and kind community. Please, read our "),xe=s("a"),Rr=a("code of conduct"),jr=a(" and be mindful to respect it during your interactions."),ri=n(),U=s("h2"),ue=s("a"),_o=s("span"),m(Ne.$$.fragment),Wr=n(),ko=s("span"),Gr=a("Overview"),ai=n(),Mt=s("p"),Fr=a("You can contribute in so many ways! Just to name a few:"),li=n(),P=s("ul"),Eo=s("li"),Ur=a("Fixing outstanding issues with the existing code."),Br=n(),q=s("li"),Mr=a("Implementing "),Te=s("a"),Yr=a("new diffusion pipelines"),zr=a(", "),He=s("a"),Jr=a("new schedulers"),Qr=a(" or "),Re=s("a"),Xr=a("new models"),Kr=a("."),Vr=n(),Yt=s("li"),je=s("a"),Zr=a("Contributing to the examples"),ea=a("."),ta=n(),zt=s("li"),We=s("a"),oa=a("Contributing to the documentation"),sa=a("."),ia=n(),Po=s("li"),ra=a("Submitting issues related to bugs or desired new features."),ni=n(),Jt=s("p"),Io=s("em"),aa=a("All are equally valuable to the community."),ui=n(),B=s("h3"),he=s("a"),Ao=s("span"),m(Ge.$$.fragment),la=n(),So=s("span"),na=a("Browse GitHub issues for suggestions"),hi=n(),fe=s("p"),ua=a("If you need inspiration, you can look out for "),Fe=s("a"),ha=a("issues"),fa=a(" you\u2019d like to tackle to contribute to the library. There are a few filters that can be helpful:"),fi=n(),N=s("ul"),Ue=s("li"),da=a("See "),Be=s("a"),pa=a("Good first issues"),ca=a(" for general opportunities to contribute and getting started with the codebase."),ma=n(),Me=s("li"),ga=a("See "),Ye=s("a"),ya=a("New pipeline/model"),va=a(" to contribute exciting new diffusion models or diffusion pipelines."),wa=n(),ze=s("li"),ba=a("See "),Je=s("a"),$a=a("New scheduler"),_a=a(" to work on new samplers and schedulers."),di=n(),M=s("h2"),de=s("a"),Do=s("span"),m(Qe.$$.fragment),ka=n(),Lo=s("span"),Ea=a("Submitting a new issue or feature request"),pi=n(),Qt=s("p"),Pa=a(`Do your best to follow these guidelines when submitting an issue or a feature
request. It will make it easier for us to come back to you quickly and with good
feedback.`),ci=n(),Y=s("h3"),pe=s("a"),Oo=s("span"),m(Xe.$$.fragment),Ia=n(),Co=s("span"),Aa=a("Did you find a bug?"),mi=n(),Xt=s("p"),Sa=a(`The \u{1F9E8} Diffusers library is robust and reliable thanks to the users who notify us of
the problems they encounter. So thank you for reporting an issue.`),gi=n(),ce=s("p"),Da=a("First, we would really appreciate it if you could "),qo=s("strong"),La=a(`make sure the bug was not
already reported`),Oa=a(" (use the search bar on GitHub under Issues)."),yi=n(),z=s("h3"),me=s("a"),xo=s("span"),m(Ke.$$.fragment),Ca=n(),No=s("span"),qa=a("Do you want to implement a new diffusion pipeline / diffusion model?"),vi=n(),Kt=s("p"),xa=a("Awesome! Please provide the following information:"),wi=n(),T=s("ul"),To=s("li"),Na=a("Short description of the diffusion pipeline and link to the paper;"),Ta=n(),Ho=s("li"),Ha=a("Link to the implementation if it is open-source;"),Ra=n(),Ro=s("li"),ja=a("Link to the model weights if they are available."),bi=n(),Vt=s("p"),Wa=a(`If you are willing to contribute the model yourself, let us know so we can best
guide you.`),$i=n(),J=s("h3"),ge=s("a"),jo=s("span"),m(Ve.$$.fragment),Ga=n(),Wo=s("span"),Fa=a("Do you want a new feature (that is not a model)?"),_i=n(),Zt=s("p"),Ua=a("A world-class feature request addresses the following points:"),ki=n(),eo=s("ol"),Go=s("li"),Ba=a("Motivation first:"),Ei=n(),H=s("ul"),Fo=s("li"),Ma=a(`Is it related to a problem/frustration with the library? If so, please explain
why. Providing a code snippet that demonstrates the problem is best.`),Ya=n(),Uo=s("li"),za=a(`Is it related to something you would need for a project? We\u2019d love to hear
about it!`),Ja=n(),Bo=s("li"),Qa=a(`Is it something you worked on and think could benefit the community?
Awesome! Tell us what problem it solved for you.`),Pi=n(),L=s("ol"),Ze=s("li"),Xa=a("Write a "),Mo=s("em"),Ka=a("full paragraph"),Va=a(" describing the feature;"),Za=n(),et=s("li"),el=a("Provide a "),Yo=s("strong"),tl=a("code snippet"),ol=a(" that demonstrates its future use;"),sl=n(),zo=s("li"),il=a("In case this is related to a paper, please attach a link;"),rl=n(),Jo=s("li"),al=a("Attach any additional information (drawings, screenshots, etc.) you think may help."),Ii=n(),to=s("p"),ll=a(`If your issue is well written we\u2019re already 80% of the way there by the time you
post it.`),Ai=n(),Q=s("h2"),ye=s("a"),Qo=s("span"),m(tt.$$.fragment),nl=n(),Xo=s("span"),ul=a("Start contributing! (Pull Requests)"),Si=n(),oo=s("p"),hl=a(`Before writing code, we strongly advise you to search through the existing PRs or
issues to make sure that nobody is already working on the same thing. If you are
unsure, it is always a good idea to open an issue to get some feedback.`),Di=n(),I=s("p"),fl=a("You will need basic "),Ko=s("code"),dl=a("git"),pl=a(` proficiency to be able to contribute to
\u{1F9E8} Diffusers. `),Vo=s("code"),cl=a("git"),ml=a(` is not the easiest tool to use but it has the greatest
manual. Type `),Zo=s("code"),gl=a("git --help"),yl=a(" in a shell and enjoy. If you prefer books, "),ot=s("a"),vl=a(`Pro
Git`),wl=a(" is a very good reference."),Li=n(),ve=s("p"),bl=a("Follow these steps to start contributing ("),st=s("a"),$l=a("supported Python versions"),_l=a("):"),Oi=n(),$=s("ol"),es=s("li"),it=s("p"),kl=a("Fork the "),rt=s("a"),El=a("repository"),Pl=a(` by
clicking on the \u2018Fork\u2019 button on the repository\u2019s page. This creates a copy of the code
under your GitHub user account.`),Il=n(),at=s("li"),ts=s("p"),Al=a("Clone your fork to your local disk, and add the base repository as a remote:"),Sl=n(),m(lt.$$.fragment),Dl=n(),X=s("li"),os=s("p"),Ll=a("Create a new branch to hold your development changes:"),Ol=n(),m(nt.$$.fragment),Cl=n(),we=s("p"),ss=s("strong"),ql=a("Do not"),xl=a(" work on the "),is=s("code"),Nl=a("main"),Tl=a(" branch."),Hl=n(),k=s("li"),rs=s("p"),Rl=a("Set up a development environment by running the following command in a virtual environment:"),jl=n(),m(ut.$$.fragment),Wl=n(),K=s("p"),Gl=a(`(If Diffusers was already installed in the virtual environment, remove
it with `),as=s("code"),Fl=a("pip uninstall diffusers"),Ul=a(` before reinstalling it in editable
mode with the `),ls=s("code"),Bl=a("-e"),Ml=a(" flag.)"),Yl=n(),V=s("p"),zl=a("To run the full test suite, you might need the additional dependency on "),ns=s("code"),Jl=a("transformers"),Ql=a(" and "),us=s("code"),Xl=a("datasets"),Kl=a(` which requires a separate source
install:`),Vl=n(),m(ht.$$.fragment),Zl=n(),m(ft.$$.fragment),en=n(),Z=s("p"),tn=a("If you have already cloned that repo, you might need to "),hs=s("code"),on=a("git pull"),sn=a(" to get the most recent changes in the "),fs=s("code"),rn=a("datasets"),an=a(`
library.`),ln=n(),p=s("li"),ds=s("p"),nn=a("Develop the features on your branch."),un=n(),ps=s("p"),hn=a(`As you work on the features, you should make sure that the test suite
passes. You should run the tests impacted by your changes like this:`),fn=n(),m(dt.$$.fragment),dn=n(),cs=s("p"),pn=a(`You can also run the full suite with the following command, but it takes
a beefy machine to produce a result in a decent amount of time now that
Diffusers has grown a lot. Here is the command for it:`),cn=n(),m(pt.$$.fragment),mn=n(),so=s("p"),gn=a(`For more information about tests, check out the
`),ct=s("a"),yn=a("dedicated documentation"),vn=n(),ee=s("p"),wn=a("\u{1F9E8} Diffusers relies on "),ms=s("code"),bn=a("black"),$n=a(" and "),gs=s("code"),_n=a("isort"),kn=a(` to format its source code
consistently. After you make changes, apply automatic style corrections and code verifications
that can\u2019t be automated in one go with:`),En=n(),m(mt.$$.fragment),Pn=n(),gt=s("p"),In=a("\u{1F9E8} Diffusers also uses "),ys=s("code"),An=a("ruff"),Sn=a(` and a few custom scripts to check for coding mistakes. Quality
control runs in CI, however you can also run the same checks with:`),Dn=n(),m(yt.$$.fragment),Ln=n(),te=s("p"),On=a("Once you\u2019re happy with your changes, add changed files using "),vs=s("code"),Cn=a("git add"),qn=a(` and
make a commit with `),ws=s("code"),xn=a("git commit"),Nn=a(" to record your changes locally:"),Tn=n(),m(vt.$$.fragment),Hn=n(),bs=s("p"),Rn=a(`It is a good idea to sync your copy of the code with the original
repository regularly. This way you can quickly account for changes:`),jn=n(),m(wt.$$.fragment),Wn=n(),$s=s("p"),Gn=a("Push the changes to your account using:"),Fn=n(),m(bt.$$.fragment),Un=n(),_s=s("li"),$t=s("p"),Bn=a("Once you are satisfied ("),ks=s("strong"),Mn=a("and the checklist below is happy too"),Yn=a(`), go to the
webpage of your fork on GitHub. Click on \u2018Pull request\u2019 to send your changes
to the project maintainers for review.`),zn=n(),Es=s("li"),Ps=s("p"),Jn=a(`It\u2019s ok if maintainers ask you for changes. It happens to core contributors
too! So everyone can see the changes in the Pull request, work in your local
branch and push the changes to your fork. They will automatically appear in
the pull request.`),Ci=n(),oe=s("h3"),be=s("a"),Is=s("span"),m(_t.$$.fragment),Qn=n(),As=s("span"),Xn=a("Checklist"),qi=n(),_=s("ol"),Ss=s("li"),Kn=a("The title of your pull request should be a summary of its contribution;"),Vn=n(),Ds=s("li"),Zn=a(`If your pull request addresses an issue, please mention the issue number in
the pull request description to make sure they are linked (and people
consulting the issue know you are working on it);`),eu=n(),kt=s("li"),tu=a("To indicate a work in progress please prefix the title with "),Ls=s("code"),ou=a("[WIP]"),su=a(`. These
are useful to avoid duplicated work, and to differentiate it from PRs ready
to be merged;`),iu=n(),Os=s("li"),ru=a("Make sure existing tests pass;"),au=n(),io=s("li"),lu=a("Add high-coverage tests. No quality testing = no merge."),Et=s("ul"),se=s("li"),nu=a("If you are adding new "),Cs=s("code"),uu=a("@slow"),hu=a(` tests, make sure they pass using
`),qs=s("code"),fu=a("RUN_SLOW=1 python -m pytest tests/test_my_new_model.py"),du=a("."),pu=n(),Pt=s("li"),cu=a(`If you are adding a new tokenizer, write tests, and make sure
`),xs=s("code"),mu=a("RUN_SLOW=1 python -m pytest tests/test_tokenization_{your_model_name}.py"),gu=a(` passes.
CircleCI does not run the slow tests, but GitHub actions does every night!`),yu=n(),It=s("li"),vu=a("All public methods must have informative docstrings that work nicely with sphinx. See "),Ns=s("code"),wu=a("[pipeline_latent_diffusion.py](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py)"),bu=a(" for an example."),$u=n(),x=s("li"),_u=a("Due to the rapidly growing repository, it is important to make sure that no files that would significantly weigh down the repository are added. This includes images, videos and other non-text files. We prefer to leverage a hf.co hosted "),Ts=s("code"),ku=a("dataset"),Eu=a(` like
the ones hosted on `),At=s("a"),Hs=s("code"),Pu=a("hf-internal-testing"),Iu=a(" in which to place these files and reference or "),St=s("a"),Au=a("huggingface/documentation-images"),Su=a(`.
If an external contribution, feel free to add the images to your PR and ask a Hugging Face member to migrate your images
to this dataset.`),xi=n(),ie=s("h3"),$e=s("a"),Rs=s("span"),m(Dt.$$.fragment),Du=n(),js=s("span"),Lu=a("Tests"),Ni=n(),_e=s("p"),Ou=a(`An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
the `),Lt=s("a"),Cu=a("tests folder"),qu=a("."),Ti=n(),O=s("p"),xu=a("We like "),Ws=s("code"),Nu=a("pytest"),Tu=a(" and "),Gs=s("code"),Hu=a("pytest-xdist"),Ru=a(` because it\u2019s faster. From the root of the
repository, here\u2019s how to run tests with `),Fs=s("code"),ju=a("pytest"),Wu=a(" for the library:"),Hi=n(),m(Ot.$$.fragment),Ri=n(),ke=s("p"),Gu=a("In fact, that\u2019s how "),Us=s("code"),Fu=a("make test"),Uu=a(" is implemented!"),ji=n(),ro=s("p"),Bu=a(`You can specify a smaller set of tests in order to test only the feature
you\u2019re working on.`),Wi=n(),R=s("p"),Mu=a("By default, slow tests are skipped. Set the "),Bs=s("code"),Yu=a("RUN_SLOW"),zu=a(` environment variable to
`),Ms=s("code"),Ju=a("yes"),Qu=a(` to run them. This will download many gigabytes of models \u2014 make sure you
have enough disk space and a good Internet connection, or a lot of patience!`),Gi=n(),m(Ct.$$.fragment),Fi=n(),qt=s("p"),Ys=s("code"),Xu=a("unittest"),Ku=a(" is fully supported, here\u2019s how to run tests with it:"),Ui=n(),m(xt.$$.fragment),Bi=n(),re=s("h3"),Ee=s("a"),zs=s("span"),m(Nt.$$.fragment),Vu=n(),Js=s("span"),Zu=a("Syncing forked main with upstream (HuggingFace) main"),Mi=n(),ao=s("p"),eh=a(`To avoid pinging the upstream repository which adds reference notes to each upstream PR and sends unnecessary notifications to the developers involved in these PRs,
when syncing the main branch of a forked repository, please, follow these steps:`),Yi=n(),Pe=s("ol"),Qs=s("li"),th=a("When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead, merge directly into the forked main."),oh=n(),Xs=s("li"),sh=a("If a PR is absolutely necessary, use the following steps after checking out your branch:"),zi=n(),m(Tt.$$.fragment),Ji=n(),ae=s("h3"),Ie=s("a"),Ks=s("span"),m(Ht.$$.fragment),ih=n(),Vs=s("span"),rh=a("Style guide"),Qi=n(),Ae=s("p"),ah=a("For documentation strings, \u{1F9E8} Diffusers follows the "),Rt=s("a"),lh=a("google style"),nh=a("."),Xi=n(),lo=s("p"),jt=s("strong"),uh=a("This guide was heavily inspired by the awesome "),Wt=s("a"),hh=a("scikit-learn guide to contributing"),fh=a("."),this.h()},l(t){const h=Xd('[data-svelte="svelte-1phssyn"]',document.head);G=i(h,"META",{name:!0,content:!0}),h.forEach(o),ei=u(t),F=i(t,"H1",{class:!0});var Vi=r(F);le=i(Vi,"A",{id:!0,class:!0,href:!0});var bh=r(le);bo=i(bh,"SPAN",{});var $h=r(bo);g(Ce.$$.fragment,$h),$h.forEach(o),bh.forEach(o),Cr=u(Vi),$o=i(Vi,"SPAN",{});var _h=r($o);qr=l(_h,"How to contribute to Diffusers \u{1F9E8}"),_h.forEach(o),Vi.forEach(o),ti=u(t),Gt=i(t,"P",{});var kh=r(Gt);xr=l(kh,"We \u2764\uFE0F contributions from the open-source community! Everyone is welcome, and all types of participation \u2013not just code\u2013 are valued and appreciated. Answering questions, helping others, reaching out and improving the documentation are all immensely valuable to the community, so don\u2019t be afraid and get involved if you\u2019re up for it!"),kh.forEach(o),oi=u(t),Ft=i(t,"P",{});var Eh=r(Ft);Nr=l(Eh,`It also helps us if you spread the word: reference the library from blog posts
on the awesome projects it made possible, shout out on Twitter every time it has
helped you, or simply star the repo to say \u201Cthank you\u201D.`),Eh.forEach(o),si=u(t),qe=i(t,"P",{});var dh=r(qe);Tr=l(dh,"We encourage everyone to start by saying \u{1F44B} in our public Discord channel. We discuss the hottest trends about diffusion models, ask questions, show-off personal projects, help each other with contributions, or just hang out \u2615. "),Ut=i(dh,"A",{href:!0});var Ph=r(Ut);Bt=i(Ph,"IMG",{alt:!0,src:!0}),Ph.forEach(o),dh.forEach(o),ii=u(t),ne=i(t,"P",{});var Zi=r(ne);Hr=l(Zi,"Whichever way you choose to contribute, we strive to be part of an open, welcoming and kind community. Please, read our "),xe=i(Zi,"A",{href:!0,rel:!0});var Ih=r(xe);Rr=l(Ih,"code of conduct"),Ih.forEach(o),jr=l(Zi," and be mindful to respect it during your interactions."),Zi.forEach(o),ri=u(t),U=i(t,"H2",{class:!0});var er=r(U);ue=i(er,"A",{id:!0,class:!0,href:!0});var Ah=r(ue);_o=i(Ah,"SPAN",{});var Sh=r(_o);g(Ne.$$.fragment,Sh),Sh.forEach(o),Ah.forEach(o),Wr=u(er),ko=i(er,"SPAN",{});var Dh=r(ko);Gr=l(Dh,"Overview"),Dh.forEach(o),er.forEach(o),ai=u(t),Mt=i(t,"P",{});var Lh=r(Mt);Fr=l(Lh,"You can contribute in so many ways! Just to name a few:"),Lh.forEach(o),li=u(t),P=i(t,"UL",{});var j=r(P);Eo=i(j,"LI",{});var Oh=r(Eo);Ur=l(Oh,"Fixing outstanding issues with the existing code."),Oh.forEach(o),Br=u(j),q=i(j,"LI",{});var Se=r(q);Mr=l(Se,"Implementing "),Te=i(Se,"A",{href:!0,rel:!0});var Ch=r(Te);Yr=l(Ch,"new diffusion pipelines"),Ch.forEach(o),zr=l(Se,", "),He=i(Se,"A",{href:!0,rel:!0});var qh=r(He);Jr=l(qh,"new schedulers"),qh.forEach(o),Qr=l(Se," or "),Re=i(Se,"A",{href:!0,rel:!0});var xh=r(Re);Xr=l(xh,"new models"),xh.forEach(o),Kr=l(Se,"."),Se.forEach(o),Vr=u(j),Yt=i(j,"LI",{});var ph=r(Yt);je=i(ph,"A",{href:!0,rel:!0});var Nh=r(je);Zr=l(Nh,"Contributing to the examples"),Nh.forEach(o),ea=l(ph,"."),ph.forEach(o),ta=u(j),zt=i(j,"LI",{});var ch=r(zt);We=i(ch,"A",{href:!0,rel:!0});var Th=r(We);oa=l(Th,"Contributing to the documentation"),Th.forEach(o),sa=l(ch,"."),ch.forEach(o),ia=u(j),Po=i(j,"LI",{});var Hh=r(Po);ra=l(Hh,"Submitting issues related to bugs or desired new features."),Hh.forEach(o),j.forEach(o),ni=u(t),Jt=i(t,"P",{});var Rh=r(Jt);Io=i(Rh,"EM",{});var jh=r(Io);aa=l(jh,"All are equally valuable to the community."),jh.forEach(o),Rh.forEach(o),ui=u(t),B=i(t,"H3",{class:!0});var tr=r(B);he=i(tr,"A",{id:!0,class:!0,href:!0});var Wh=r(he);Ao=i(Wh,"SPAN",{});var Gh=r(Ao);g(Ge.$$.fragment,Gh),Gh.forEach(o),Wh.forEach(o),la=u(tr),So=i(tr,"SPAN",{});var Fh=r(So);na=l(Fh,"Browse GitHub issues for suggestions"),Fh.forEach(o),tr.forEach(o),hi=u(t),fe=i(t,"P",{});var or=r(fe);ua=l(or,"If you need inspiration, you can look out for "),Fe=i(or,"A",{href:!0,rel:!0});var Uh=r(Fe);ha=l(Uh,"issues"),Uh.forEach(o),fa=l(or," you\u2019d like to tackle to contribute to the library. There are a few filters that can be helpful:"),or.forEach(o),fi=u(t),N=i(t,"UL",{});var no=r(N);Ue=i(no,"LI",{});var sr=r(Ue);da=l(sr,"See "),Be=i(sr,"A",{href:!0,rel:!0});var Bh=r(Be);pa=l(Bh,"Good first issues"),Bh.forEach(o),ca=l(sr," for general opportunities to contribute and getting started with the codebase."),sr.forEach(o),ma=u(no),Me=i(no,"LI",{});var ir=r(Me);ga=l(ir,"See "),Ye=i(ir,"A",{href:!0,rel:!0});var Mh=r(Ye);ya=l(Mh,"New pipeline/model"),Mh.forEach(o),va=l(ir," to contribute exciting new diffusion models or diffusion pipelines."),ir.forEach(o),wa=u(no),ze=i(no,"LI",{});var rr=r(ze);ba=l(rr,"See "),Je=i(rr,"A",{href:!0,rel:!0});var Yh=r(Je);$a=l(Yh,"New scheduler"),Yh.forEach(o),_a=l(rr," to work on new samplers and schedulers."),rr.forEach(o),no.forEach(o),di=u(t),M=i(t,"H2",{class:!0});var ar=r(M);de=i(ar,"A",{id:!0,class:!0,href:!0});var zh=r(de);Do=i(zh,"SPAN",{});var Jh=r(Do);g(Qe.$$.fragment,Jh),Jh.forEach(o),zh.forEach(o),ka=u(ar),Lo=i(ar,"SPAN",{});var Qh=r(Lo);Ea=l(Qh,"Submitting a new issue or feature request"),Qh.forEach(o),ar.forEach(o),pi=u(t),Qt=i(t,"P",{});var Xh=r(Qt);Pa=l(Xh,`Do your best to follow these guidelines when submitting an issue or a feature
request. It will make it easier for us to come back to you quickly and with good
feedback.`),Xh.forEach(o),ci=u(t),Y=i(t,"H3",{class:!0});var lr=r(Y);pe=i(lr,"A",{id:!0,class:!0,href:!0});var Kh=r(pe);Oo=i(Kh,"SPAN",{});var Vh=r(Oo);g(Xe.$$.fragment,Vh),Vh.forEach(o),Kh.forEach(o),Ia=u(lr),Co=i(lr,"SPAN",{});var Zh=r(Co);Aa=l(Zh,"Did you find a bug?"),Zh.forEach(o),lr.forEach(o),mi=u(t),Xt=i(t,"P",{});var ef=r(Xt);Sa=l(ef,`The \u{1F9E8} Diffusers library is robust and reliable thanks to the users who notify us of
the problems they encounter. So thank you for reporting an issue.`),ef.forEach(o),gi=u(t),ce=i(t,"P",{});var nr=r(ce);Da=l(nr,"First, we would really appreciate it if you could "),qo=i(nr,"STRONG",{});var tf=r(qo);La=l(tf,`make sure the bug was not
already reported`),tf.forEach(o),Oa=l(nr," (use the search bar on GitHub under Issues)."),nr.forEach(o),yi=u(t),z=i(t,"H3",{class:!0});var ur=r(z);me=i(ur,"A",{id:!0,class:!0,href:!0});var of=r(me);xo=i(of,"SPAN",{});var sf=r(xo);g(Ke.$$.fragment,sf),sf.forEach(o),of.forEach(o),Ca=u(ur),No=i(ur,"SPAN",{});var rf=r(No);qa=l(rf,"Do you want to implement a new diffusion pipeline / diffusion model?"),rf.forEach(o),ur.forEach(o),vi=u(t),Kt=i(t,"P",{});var af=r(Kt);xa=l(af,"Awesome! Please provide the following information:"),af.forEach(o),wi=u(t),T=i(t,"UL",{});var uo=r(T);To=i(uo,"LI",{});var lf=r(To);Na=l(lf,"Short description of the diffusion pipeline and link to the paper;"),lf.forEach(o),Ta=u(uo),Ho=i(uo,"LI",{});var nf=r(Ho);Ha=l(nf,"Link to the implementation if it is open-source;"),nf.forEach(o),Ra=u(uo),Ro=i(uo,"LI",{});var uf=r(Ro);ja=l(uf,"Link to the model weights if they are available."),uf.forEach(o),uo.forEach(o),bi=u(t),Vt=i(t,"P",{});var hf=r(Vt);Wa=l(hf,`If you are willing to contribute the model yourself, let us know so we can best
guide you.`),hf.forEach(o),$i=u(t),J=i(t,"H3",{class:!0});var hr=r(J);ge=i(hr,"A",{id:!0,class:!0,href:!0});var ff=r(ge);jo=i(ff,"SPAN",{});var df=r(jo);g(Ve.$$.fragment,df),df.forEach(o),ff.forEach(o),Ga=u(hr),Wo=i(hr,"SPAN",{});var pf=r(Wo);Fa=l(pf,"Do you want a new feature (that is not a model)?"),pf.forEach(o),hr.forEach(o),_i=u(t),Zt=i(t,"P",{});var cf=r(Zt);Ua=l(cf,"A world-class feature request addresses the following points:"),cf.forEach(o),ki=u(t),eo=i(t,"OL",{});var mf=r(eo);Go=i(mf,"LI",{});var gf=r(Go);Ba=l(gf,"Motivation first:"),gf.forEach(o),mf.forEach(o),Ei=u(t),H=i(t,"UL",{});var ho=r(H);Fo=i(ho,"LI",{});var yf=r(Fo);Ma=l(yf,`Is it related to a problem/frustration with the library? If so, please explain
why. Providing a code snippet that demonstrates the problem is best.`),yf.forEach(o),Ya=u(ho),Uo=i(ho,"LI",{});var vf=r(Uo);za=l(vf,`Is it related to something you would need for a project? We\u2019d love to hear
about it!`),vf.forEach(o),Ja=u(ho),Bo=i(ho,"LI",{});var wf=r(Bo);Qa=l(wf,`Is it something you worked on and think could benefit the community?
Awesome! Tell us what problem it solved for you.`),wf.forEach(o),ho.forEach(o),Pi=u(t),L=i(t,"OL",{start:!0});var De=r(L);Ze=i(De,"LI",{});var fr=r(Ze);Xa=l(fr,"Write a "),Mo=i(fr,"EM",{});var bf=r(Mo);Ka=l(bf,"full paragraph"),bf.forEach(o),Va=l(fr," describing the feature;"),fr.forEach(o),Za=u(De),et=i(De,"LI",{});var dr=r(et);el=l(dr,"Provide a "),Yo=i(dr,"STRONG",{});var $f=r(Yo);tl=l($f,"code snippet"),$f.forEach(o),ol=l(dr," that demonstrates its future use;"),dr.forEach(o),sl=u(De),zo=i(De,"LI",{});var _f=r(zo);il=l(_f,"In case this is related to a paper, please attach a link;"),_f.forEach(o),rl=u(De),Jo=i(De,"LI",{});var kf=r(Jo);al=l(kf,"Attach any additional information (drawings, screenshots, etc.) you think may help."),kf.forEach(o),De.forEach(o),Ii=u(t),to=i(t,"P",{});var Ef=r(to);ll=l(Ef,`If your issue is well written we\u2019re already 80% of the way there by the time you
post it.`),Ef.forEach(o),Ai=u(t),Q=i(t,"H2",{class:!0});var pr=r(Q);ye=i(pr,"A",{id:!0,class:!0,href:!0});var Pf=r(ye);Qo=i(Pf,"SPAN",{});var If=r(Qo);g(tt.$$.fragment,If),If.forEach(o),Pf.forEach(o),nl=u(pr),Xo=i(pr,"SPAN",{});var Af=r(Xo);ul=l(Af,"Start contributing! (Pull Requests)"),Af.forEach(o),pr.forEach(o),Si=u(t),oo=i(t,"P",{});var Sf=r(oo);hl=l(Sf,`Before writing code, we strongly advise you to search through the existing PRs or
issues to make sure that nobody is already working on the same thing. If you are
unsure, it is always a good idea to open an issue to get some feedback.`),Sf.forEach(o),Di=u(t),I=i(t,"P",{});var W=r(I);fl=l(W,"You will need basic "),Ko=i(W,"CODE",{});var Df=r(Ko);dl=l(Df,"git"),Df.forEach(o),pl=l(W,` proficiency to be able to contribute to
\u{1F9E8} Diffusers. `),Vo=i(W,"CODE",{});var Lf=r(Vo);cl=l(Lf,"git"),Lf.forEach(o),ml=l(W,` is not the easiest tool to use but it has the greatest
manual. Type `),Zo=i(W,"CODE",{});var Of=r(Zo);gl=l(Of,"git --help"),Of.forEach(o),yl=l(W," in a shell and enjoy. If you prefer books, "),ot=i(W,"A",{href:!0,rel:!0});var Cf=r(ot);vl=l(Cf,`Pro
Git`),Cf.forEach(o),wl=l(W," is a very good reference."),W.forEach(o),Li=u(t),ve=i(t,"P",{});var cr=r(ve);bl=l(cr,"Follow these steps to start contributing ("),st=i(cr,"A",{href:!0,rel:!0});var qf=r(st);$l=l(qf,"supported Python versions"),qf.forEach(o),_l=l(cr,"):"),cr.forEach(o),Oi=u(t),$=i(t,"OL",{});var A=r($);es=i(A,"LI",{});var xf=r(es);it=i(xf,"P",{});var mr=r(it);kl=l(mr,"Fork the "),rt=i(mr,"A",{href:!0,rel:!0});var Nf=r(rt);El=l(Nf,"repository"),Nf.forEach(o),Pl=l(mr,` by
clicking on the \u2018Fork\u2019 button on the repository\u2019s page. This creates a copy of the code
under your GitHub user account.`),mr.forEach(o),xf.forEach(o),Il=u(A),at=i(A,"LI",{});var gr=r(at);ts=i(gr,"P",{});var Tf=r(ts);Al=l(Tf,"Clone your fork to your local disk, and add the base repository as a remote:"),Tf.forEach(o),Sl=u(gr),g(lt.$$.fragment,gr),gr.forEach(o),Dl=u(A),X=i(A,"LI",{});var fo=r(X);os=i(fo,"P",{});var Hf=r(os);Ll=l(Hf,"Create a new branch to hold your development changes:"),Hf.forEach(o),Ol=u(fo),g(nt.$$.fragment,fo),Cl=u(fo),we=i(fo,"P",{});var Zs=r(we);ss=i(Zs,"STRONG",{});var Rf=r(ss);ql=l(Rf,"Do not"),Rf.forEach(o),xl=l(Zs," work on the "),is=i(Zs,"CODE",{});var jf=r(is);Nl=l(jf,"main"),jf.forEach(o),Tl=l(Zs," branch."),Zs.forEach(o),fo.forEach(o),Hl=u(A),k=i(A,"LI",{});var S=r(k);rs=i(S,"P",{});var Wf=r(rs);Rl=l(Wf,"Set up a development environment by running the following command in a virtual environment:"),Wf.forEach(o),jl=u(S),g(ut.$$.fragment,S),Wl=u(S),K=i(S,"P",{});var po=r(K);Gl=l(po,`(If Diffusers was already installed in the virtual environment, remove
it with `),as=i(po,"CODE",{});var Gf=r(as);Fl=l(Gf,"pip uninstall diffusers"),Gf.forEach(o),Ul=l(po,` before reinstalling it in editable
mode with the `),ls=i(po,"CODE",{});var Ff=r(ls);Bl=l(Ff,"-e"),Ff.forEach(o),Ml=l(po," flag.)"),po.forEach(o),Yl=u(S),V=i(S,"P",{});var co=r(V);zl=l(co,"To run the full test suite, you might need the additional dependency on "),ns=i(co,"CODE",{});var Uf=r(ns);Jl=l(Uf,"transformers"),Uf.forEach(o),Ql=l(co," and "),us=i(co,"CODE",{});var Bf=r(us);Xl=l(Bf,"datasets"),Bf.forEach(o),Kl=l(co,` which requires a separate source
install:`),co.forEach(o),Vl=u(S),g(ht.$$.fragment,S),Zl=u(S),g(ft.$$.fragment,S),en=u(S),Z=i(S,"P",{});var mo=r(Z);tn=l(mo,"If you have already cloned that repo, you might need to "),hs=i(mo,"CODE",{});var Mf=r(hs);on=l(Mf,"git pull"),Mf.forEach(o),sn=l(mo," to get the most recent changes in the "),fs=i(mo,"CODE",{});var Yf=r(fs);rn=l(Yf,"datasets"),Yf.forEach(o),an=l(mo,`
library.`),mo.forEach(o),S.forEach(o),ln=u(A),p=i(A,"LI",{});var c=r(p);ds=i(c,"P",{});var zf=r(ds);nn=l(zf,"Develop the features on your branch."),zf.forEach(o),un=u(c),ps=i(c,"P",{});var Jf=r(ps);hn=l(Jf,`As you work on the features, you should make sure that the test suite
passes. You should run the tests impacted by your changes like this:`),Jf.forEach(o),fn=u(c),g(dt.$$.fragment,c),dn=u(c),cs=i(c,"P",{});var Qf=r(cs);pn=l(Qf,`You can also run the full suite with the following command, but it takes
a beefy machine to produce a result in a decent amount of time now that
Diffusers has grown a lot. Here is the command for it:`),Qf.forEach(o),cn=u(c),g(pt.$$.fragment,c),mn=u(c),so=i(c,"P",{});var mh=r(so);gn=l(mh,`For more information about tests, check out the
`),ct=i(mh,"A",{href:!0,rel:!0});var Xf=r(ct);yn=l(Xf,"dedicated documentation"),Xf.forEach(o),mh.forEach(o),vn=u(c),ee=i(c,"P",{});var go=r(ee);wn=l(go,"\u{1F9E8} Diffusers relies on "),ms=i(go,"CODE",{});var Kf=r(ms);bn=l(Kf,"black"),Kf.forEach(o),$n=l(go," and "),gs=i(go,"CODE",{});var Vf=r(gs);_n=l(Vf,"isort"),Vf.forEach(o),kn=l(go,` to format its source code
consistently. After you make changes, apply automatic style corrections and code verifications
that can\u2019t be automated in one go with:`),go.forEach(o),En=u(c),g(mt.$$.fragment,c),Pn=u(c),gt=i(c,"P",{});var yr=r(gt);In=l(yr,"\u{1F9E8} Diffusers also uses "),ys=i(yr,"CODE",{});var Zf=r(ys);An=l(Zf,"ruff"),Zf.forEach(o),Sn=l(yr,` and a few custom scripts to check for coding mistakes. Quality
control runs in CI, however you can also run the same checks with:`),yr.forEach(o),Dn=u(c),g(yt.$$.fragment,c),Ln=u(c),te=i(c,"P",{});var yo=r(te);On=l(yo,"Once you\u2019re happy with your changes, add changed files using "),vs=i(yo,"CODE",{});var ed=r(vs);Cn=l(ed,"git add"),ed.forEach(o),qn=l(yo,` and
make a commit with `),ws=i(yo,"CODE",{});var td=r(ws);xn=l(td,"git commit"),td.forEach(o),Nn=l(yo," to record your changes locally:"),yo.forEach(o),Tn=u(c),g(vt.$$.fragment,c),Hn=u(c),bs=i(c,"P",{});var od=r(bs);Rn=l(od,`It is a good idea to sync your copy of the code with the original
repository regularly. This way you can quickly account for changes:`),od.forEach(o),jn=u(c),g(wt.$$.fragment,c),Wn=u(c),$s=i(c,"P",{});var sd=r($s);Gn=l(sd,"Push the changes to your account using:"),sd.forEach(o),Fn=u(c),g(bt.$$.fragment,c),c.forEach(o),Un=u(A),_s=i(A,"LI",{});var id=r(_s);$t=i(id,"P",{});var vr=r($t);Bn=l(vr,"Once you are satisfied ("),ks=i(vr,"STRONG",{});var rd=r(ks);Mn=l(rd,"and the checklist below is happy too"),rd.forEach(o),Yn=l(vr,`), go to the
webpage of your fork on GitHub. Click on \u2018Pull request\u2019 to send your changes
to the project maintainers for review.`),vr.forEach(o),id.forEach(o),zn=u(A),Es=i(A,"LI",{});var ad=r(Es);Ps=i(ad,"P",{});var ld=r(Ps);Jn=l(ld,`It\u2019s ok if maintainers ask you for changes. It happens to core contributors
too! So everyone can see the changes in the Pull request, work in your local
branch and push the changes to your fork. They will automatically appear in
the pull request.`),ld.forEach(o),ad.forEach(o),A.forEach(o),Ci=u(t),oe=i(t,"H3",{class:!0});var wr=r(oe);be=i(wr,"A",{id:!0,class:!0,href:!0});var nd=r(be);Is=i(nd,"SPAN",{});var ud=r(Is);g(_t.$$.fragment,ud),ud.forEach(o),nd.forEach(o),Qn=u(wr),As=i(wr,"SPAN",{});var hd=r(As);Xn=l(hd,"Checklist"),hd.forEach(o),wr.forEach(o),qi=u(t),_=i(t,"OL",{});var D=r(_);Ss=i(D,"LI",{});var fd=r(Ss);Kn=l(fd,"The title of your pull request should be a summary of its contribution;"),fd.forEach(o),Vn=u(D),Ds=i(D,"LI",{});var dd=r(Ds);Zn=l(dd,`If your pull request addresses an issue, please mention the issue number in
the pull request description to make sure they are linked (and people
consulting the issue know you are working on it);`),dd.forEach(o),eu=u(D),kt=i(D,"LI",{});var br=r(kt);tu=l(br,"To indicate a work in progress please prefix the title with "),Ls=i(br,"CODE",{});var pd=r(Ls);ou=l(pd,"[WIP]"),pd.forEach(o),su=l(br,`. These
are useful to avoid duplicated work, and to differentiate it from PRs ready
to be merged;`),br.forEach(o),iu=u(D),Os=i(D,"LI",{});var cd=r(Os);ru=l(cd,"Make sure existing tests pass;"),cd.forEach(o),au=u(D),io=i(D,"LI",{});var gh=r(io);lu=l(gh,"Add high-coverage tests. No quality testing = no merge."),Et=i(gh,"UL",{});var $r=r(Et);se=i($r,"LI",{});var vo=r(se);nu=l(vo,"If you are adding new "),Cs=i(vo,"CODE",{});var md=r(Cs);uu=l(md,"@slow"),md.forEach(o),hu=l(vo,` tests, make sure they pass using
`),qs=i(vo,"CODE",{});var gd=r(qs);fu=l(gd,"RUN_SLOW=1 python -m pytest tests/test_my_new_model.py"),gd.forEach(o),du=l(vo,"."),vo.forEach(o),pu=u($r),Pt=i($r,"LI",{});var _r=r(Pt);cu=l(_r,`If you are adding a new tokenizer, write tests, and make sure
`),xs=i(_r,"CODE",{});var yd=r(xs);mu=l(yd,"RUN_SLOW=1 python -m pytest tests/test_tokenization_{your_model_name}.py"),yd.forEach(o),gu=l(_r,` passes.
CircleCI does not run the slow tests, but GitHub actions does every night!`),_r.forEach(o),$r.forEach(o),gh.forEach(o),yu=u(D),It=i(D,"LI",{});var kr=r(It);vu=l(kr,"All public methods must have informative docstrings that work nicely with sphinx. See "),Ns=i(kr,"CODE",{});var vd=r(Ns);wu=l(vd,"[pipeline_latent_diffusion.py](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py)"),vd.forEach(o),bu=l(kr," for an example."),kr.forEach(o),$u=u(D),x=i(D,"LI",{});var Le=r(x);_u=l(Le,"Due to the rapidly growing repository, it is important to make sure that no files that would significantly weigh down the repository are added. This includes images, videos and other non-text files. We prefer to leverage a hf.co hosted "),Ts=i(Le,"CODE",{});var wd=r(Ts);ku=l(wd,"dataset"),wd.forEach(o),Eu=l(Le,` like
the ones hosted on `),At=i(Le,"A",{href:!0,rel:!0});var bd=r(At);Hs=i(bd,"CODE",{});var $d=r(Hs);Pu=l($d,"hf-internal-testing"),$d.forEach(o),bd.forEach(o),Iu=l(Le," in which to place these files and reference or "),St=i(Le,"A",{href:!0,rel:!0});var _d=r(St);Au=l(_d,"huggingface/documentation-images"),_d.forEach(o),Su=l(Le,`.
If an external contribution, feel free to add the images to your PR and ask a Hugging Face member to migrate your images
to this dataset.`),Le.forEach(o),D.forEach(o),xi=u(t),ie=i(t,"H3",{class:!0});var Er=r(ie);$e=i(Er,"A",{id:!0,class:!0,href:!0});var kd=r($e);Rs=i(kd,"SPAN",{});var Ed=r(Rs);g(Dt.$$.fragment,Ed),Ed.forEach(o),kd.forEach(o),Du=u(Er),js=i(Er,"SPAN",{});var Pd=r(js);Lu=l(Pd,"Tests"),Pd.forEach(o),Er.forEach(o),Ni=u(t),_e=i(t,"P",{});var Pr=r(_e);Ou=l(Pr,`An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
the `),Lt=i(Pr,"A",{href:!0,rel:!0});var Id=r(Lt);Cu=l(Id,"tests folder"),Id.forEach(o),qu=l(Pr,"."),Pr.forEach(o),Ti=u(t),O=i(t,"P",{});var Oe=r(O);xu=l(Oe,"We like "),Ws=i(Oe,"CODE",{});var Ad=r(Ws);Nu=l(Ad,"pytest"),Ad.forEach(o),Tu=l(Oe," and "),Gs=i(Oe,"CODE",{});var Sd=r(Gs);Hu=l(Sd,"pytest-xdist"),Sd.forEach(o),Ru=l(Oe,` because it\u2019s faster. From the root of the
repository, here\u2019s how to run tests with `),Fs=i(Oe,"CODE",{});var Dd=r(Fs);ju=l(Dd,"pytest"),Dd.forEach(o),Wu=l(Oe," for the library:"),Oe.forEach(o),Hi=u(t),g(Ot.$$.fragment,t),Ri=u(t),ke=i(t,"P",{});var Ir=r(ke);Gu=l(Ir,"In fact, that\u2019s how "),Us=i(Ir,"CODE",{});var Ld=r(Us);Fu=l(Ld,"make test"),Ld.forEach(o),Uu=l(Ir," is implemented!"),Ir.forEach(o),ji=u(t),ro=i(t,"P",{});var Od=r(ro);Bu=l(Od,`You can specify a smaller set of tests in order to test only the feature
you\u2019re working on.`),Od.forEach(o),Wi=u(t),R=i(t,"P",{});var wo=r(R);Mu=l(wo,"By default, slow tests are skipped. Set the "),Bs=i(wo,"CODE",{});var Cd=r(Bs);Yu=l(Cd,"RUN_SLOW"),Cd.forEach(o),zu=l(wo,` environment variable to
`),Ms=i(wo,"CODE",{});var qd=r(Ms);Ju=l(qd,"yes"),qd.forEach(o),Qu=l(wo,` to run them. This will download many gigabytes of models \u2014 make sure you
have enough disk space and a good Internet connection, or a lot of patience!`),wo.forEach(o),Gi=u(t),g(Ct.$$.fragment,t),Fi=u(t),qt=i(t,"P",{});var yh=r(qt);Ys=i(yh,"CODE",{});var xd=r(Ys);Xu=l(xd,"unittest"),xd.forEach(o),Ku=l(yh," is fully supported, here\u2019s how to run tests with it:"),yh.forEach(o),Ui=u(t),g(xt.$$.fragment,t),Bi=u(t),re=i(t,"H3",{class:!0});var Ar=r(re);Ee=i(Ar,"A",{id:!0,class:!0,href:!0});var Nd=r(Ee);zs=i(Nd,"SPAN",{});var Td=r(zs);g(Nt.$$.fragment,Td),Td.forEach(o),Nd.forEach(o),Vu=u(Ar),Js=i(Ar,"SPAN",{});var Hd=r(Js);Zu=l(Hd,"Syncing forked main with upstream (HuggingFace) main"),Hd.forEach(o),Ar.forEach(o),Mi=u(t),ao=i(t,"P",{});var Rd=r(ao);eh=l(Rd,`To avoid pinging the upstream repository which adds reference notes to each upstream PR and sends unnecessary notifications to the developers involved in these PRs,
when syncing the main branch of a forked repository, please, follow these steps:`),Rd.forEach(o),Yi=u(t),Pe=i(t,"OL",{});var Sr=r(Pe);Qs=i(Sr,"LI",{});var jd=r(Qs);th=l(jd,"When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead, merge directly into the forked main."),jd.forEach(o),oh=u(Sr),Xs=i(Sr,"LI",{});var Wd=r(Xs);sh=l(Wd,"If a PR is absolutely necessary, use the following steps after checking out your branch:"),Wd.forEach(o),Sr.forEach(o),zi=u(t),g(Tt.$$.fragment,t),Ji=u(t),ae=i(t,"H3",{class:!0});var Dr=r(ae);Ie=i(Dr,"A",{id:!0,class:!0,href:!0});var Gd=r(Ie);Ks=i(Gd,"SPAN",{});var Fd=r(Ks);g(Ht.$$.fragment,Fd),Fd.forEach(o),Gd.forEach(o),ih=u(Dr),Vs=i(Dr,"SPAN",{});var Ud=r(Vs);rh=l(Ud,"Style guide"),Ud.forEach(o),Dr.forEach(o),Qi=u(t),Ae=i(t,"P",{});var Lr=r(Ae);ah=l(Lr,"For documentation strings, \u{1F9E8} Diffusers follows the "),Rt=i(Lr,"A",{href:!0,rel:!0});var Bd=r(Rt);lh=l(Bd,"google style"),Bd.forEach(o),nh=l(Lr,"."),Lr.forEach(o),Xi=u(t),lo=i(t,"P",{});var Md=r(lo);jt=i(Md,"STRONG",{});var Or=r(jt);uh=l(Or,"This guide was heavily inspired by the awesome "),Wt=i(Or,"A",{href:!0,rel:!0});var Yd=r(Wt);hh=l(Yd,"scikit-learn guide to contributing"),Yd.forEach(o),fh=l(Or,"."),Or.forEach(o),Md.forEach(o),this.h()},h(){d(G,"name","hf:doc:metadata"),d(G,"content",JSON.stringify(tp)),d(le,"id","how-to-contribute-to-diffusers"),d(le,"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"),d(le,"href","#how-to-contribute-to-diffusers"),d(F,"class","relative group"),d(Bt,"alt","Join us on Discord"),Kd(Bt.src,wh="https://img.shields.io/discord/823813159592001537?color=5865F2&logo=discord&logoColor=white")||d(Bt,"src",wh),d(Ut,"href","https://discord.gg/G7tWnz98XR"),d(xe,"href","https://github.com/huggingface/diffusers/blob/main/CODE_OF_CONDUCT.md"),d(xe,"rel","nofollow"),d(ue,"id","overview"),d(ue,"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"),d(ue,"href","#overview"),d(U,"class","relative group"),d(Te,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines#contribution"),d(Te,"rel","nofollow"),d(He,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/schedulers"),d(He,"rel","nofollow"),d(Re,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/models"),d(Re,"rel","nofollow"),d(je,"href","https://github.com/huggingface/diffusers/tree/main/examples"),d(je,"rel","nofollow"),d(We,"href","https://github.com/huggingface/diffusers/tree/main/docs/source"),d(We,"rel","nofollow"),d(he,"id","browse-github-issues-for-suggestions"),d(he,"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"),d(he,"href","#browse-github-issues-for-suggestions"),d(B,"class","relative group"),d(Fe,"href","https://github.com/huggingface/diffusers/issues"),d(Fe,"rel","nofollow"),d(Be,"href","https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22"),d(Be,"rel","nofollow"),d(Ye,"href","https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+pipeline%2Fmodel%22"),d(Ye,"rel","nofollow"),d(Je,"href","https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+scheduler%22"),d(Je,"rel","nofollow"),d(de,"id","submitting-a-new-issue-or-feature-request"),d(de,"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"),d(de,"href","#submitting-a-new-issue-or-feature-request"),d(M,"class","relative group"),d(pe,"id","did-you-find-a-bug"),d(pe,"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"),d(pe,"href","#did-you-find-a-bug"),d(Y,"class","relative group"),d(me,"id","do-you-want-to-implement-a-new-diffusion-pipeline-diffusion-model"),d(me,"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"),d(me,"href","#do-you-want-to-implement-a-new-diffusion-pipeline-diffusion-model"),d(z,"class","relative group"),d(ge,"id","do-you-want-a-new-feature-that-is-not-a-model"),d(ge,"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"),d(ge,"href","#do-you-want-a-new-feature-that-is-not-a-model"),d(J,"class","relative group"),d(L,"start","2"),d(ye,"id","start-contributing-pull-requests"),d(ye,"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"),d(ye,"href","#start-contributing-pull-requests"),d(Q,"class","relative group"),d(ot,"href","https://git-scm.com/book/en/v2"),d(ot,"rel","nofollow"),d(st,"href","https://github.com/huggingface/diffusers/blob/main/setup.py#L212"),d(st,"rel","nofollow"),d(rt,"href","https://github.com/huggingface/diffusers"),d(rt,"rel","nofollow"),d(ct,"href","https://huggingface.co/docs/diffusers/testing"),d(ct,"rel","nofollow"),d(be,"id","checklist"),d(be,"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"),d(be,"href","#checklist"),d(oe,"class","relative group"),d(At,"href","https://huggingface.co/hf-internal-testing"),d(At,"rel","nofollow"),d(St,"href","https://huggingface.co/datasets/huggingface/documentation-images"),d(St,"rel","nofollow"),d($e,"id","tests"),d($e,"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"),d($e,"href","#tests"),d(ie,"class","relative group"),d(Lt,"href","https://github.com/huggingface/diffusers/tree/main/tests"),d(Lt,"rel","nofollow"),d(Ee,"id","syncing-forked-main-with-upstream-huggingface-main"),d(Ee,"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"),d(Ee,"href","#syncing-forked-main-with-upstream-huggingface-main"),d(re,"class","relative group"),d(Ie,"id","style-guide"),d(Ie,"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"),d(Ie,"href","#style-guide"),d(ae,"class","relative group"),d(Rt,"href","https://google.github.io/styleguide/pyguide.html"),d(Rt,"rel","nofollow"),d(Wt,"href","https://github.com/scikit-learn/scikit-learn/blob/main/CONTRIBUTING.md"),d(Wt,"rel","nofollow")},m(t,h){e(document.head,G),f(t,ei,h),f(t,F,h),e(F,le),e(le,bo),y(Ce,bo,null),e(F,Cr),e(F,$o),e($o,qr),f(t,ti,h),f(t,Gt,h),e(Gt,xr),f(t,oi,h),f(t,Ft,h),e(Ft,Nr),f(t,si,h),f(t,qe,h),e(qe,Tr),e(qe,Ut),e(Ut,Bt),f(t,ii,h),f(t,ne,h),e(ne,Hr),e(ne,xe),e(xe,Rr),e(ne,jr),f(t,ri,h),f(t,U,h),e(U,ue),e(ue,_o),y(Ne,_o,null),e(U,Wr),e(U,ko),e(ko,Gr),f(t,ai,h),f(t,Mt,h),e(Mt,Fr),f(t,li,h),f(t,P,h),e(P,Eo),e(Eo,Ur),e(P,Br),e(P,q),e(q,Mr),e(q,Te),e(Te,Yr),e(q,zr),e(q,He),e(He,Jr),e(q,Qr),e(q,Re),e(Re,Xr),e(q,Kr),e(P,Vr),e(P,Yt),e(Yt,je),e(je,Zr),e(Yt,ea),e(P,ta),e(P,zt),e(zt,We),e(We,oa),e(zt,sa),e(P,ia),e(P,Po),e(Po,ra),f(t,ni,h),f(t,Jt,h),e(Jt,Io),e(Io,aa),f(t,ui,h),f(t,B,h),e(B,he),e(he,Ao),y(Ge,Ao,null),e(B,la),e(B,So),e(So,na),f(t,hi,h),f(t,fe,h),e(fe,ua),e(fe,Fe),e(Fe,ha),e(fe,fa),f(t,fi,h),f(t,N,h),e(N,Ue),e(Ue,da),e(Ue,Be),e(Be,pa),e(Ue,ca),e(N,ma),e(N,Me),e(Me,ga),e(Me,Ye),e(Ye,ya),e(Me,va),e(N,wa),e(N,ze),e(ze,ba),e(ze,Je),e(Je,$a),e(ze,_a),f(t,di,h),f(t,M,h),e(M,de),e(de,Do),y(Qe,Do,null),e(M,ka),e(M,Lo),e(Lo,Ea),f(t,pi,h),f(t,Qt,h),e(Qt,Pa),f(t,ci,h),f(t,Y,h),e(Y,pe),e(pe,Oo),y(Xe,Oo,null),e(Y,Ia),e(Y,Co),e(Co,Aa),f(t,mi,h),f(t,Xt,h),e(Xt,Sa),f(t,gi,h),f(t,ce,h),e(ce,Da),e(ce,qo),e(qo,La),e(ce,Oa),f(t,yi,h),f(t,z,h),e(z,me),e(me,xo),y(Ke,xo,null),e(z,Ca),e(z,No),e(No,qa),f(t,vi,h),f(t,Kt,h),e(Kt,xa),f(t,wi,h),f(t,T,h),e(T,To),e(To,Na),e(T,Ta),e(T,Ho),e(Ho,Ha),e(T,Ra),e(T,Ro),e(Ro,ja),f(t,bi,h),f(t,Vt,h),e(Vt,Wa),f(t,$i,h),f(t,J,h),e(J,ge),e(ge,jo),y(Ve,jo,null),e(J,Ga),e(J,Wo),e(Wo,Fa),f(t,_i,h),f(t,Zt,h),e(Zt,Ua),f(t,ki,h),f(t,eo,h),e(eo,Go),e(Go,Ba),f(t,Ei,h),f(t,H,h),e(H,Fo),e(Fo,Ma),e(H,Ya),e(H,Uo),e(Uo,za),e(H,Ja),e(H,Bo),e(Bo,Qa),f(t,Pi,h),f(t,L,h),e(L,Ze),e(Ze,Xa),e(Ze,Mo),e(Mo,Ka),e(Ze,Va),e(L,Za),e(L,et),e(et,el),e(et,Yo),e(Yo,tl),e(et,ol),e(L,sl),e(L,zo),e(zo,il),e(L,rl),e(L,Jo),e(Jo,al),f(t,Ii,h),f(t,to,h),e(to,ll),f(t,Ai,h),f(t,Q,h),e(Q,ye),e(ye,Qo),y(tt,Qo,null),e(Q,nl),e(Q,Xo),e(Xo,ul),f(t,Si,h),f(t,oo,h),e(oo,hl),f(t,Di,h),f(t,I,h),e(I,fl),e(I,Ko),e(Ko,dl),e(I,pl),e(I,Vo),e(Vo,cl),e(I,ml),e(I,Zo),e(Zo,gl),e(I,yl),e(I,ot),e(ot,vl),e(I,wl),f(t,Li,h),f(t,ve,h),e(ve,bl),e(ve,st),e(st,$l),e(ve,_l),f(t,Oi,h),f(t,$,h),e($,es),e(es,it),e(it,kl),e(it,rt),e(rt,El),e(it,Pl),e($,Il),e($,at),e(at,ts),e(ts,Al),e(at,Sl),y(lt,at,null),e($,Dl),e($,X),e(X,os),e(os,Ll),e(X,Ol),y(nt,X,null),e(X,Cl),e(X,we),e(we,ss),e(ss,ql),e(we,xl),e(we,is),e(is,Nl),e(we,Tl),e($,Hl),e($,k),e(k,rs),e(rs,Rl),e(k,jl),y(ut,k,null),e(k,Wl),e(k,K),e(K,Gl),e(K,as),e(as,Fl),e(K,Ul),e(K,ls),e(ls,Bl),e(K,Ml),e(k,Yl),e(k,V),e(V,zl),e(V,ns),e(ns,Jl),e(V,Ql),e(V,us),e(us,Xl),e(V,Kl),e(k,Vl),y(ht,k,null),e(k,Zl),y(ft,k,null),e(k,en),e(k,Z),e(Z,tn),e(Z,hs),e(hs,on),e(Z,sn),e(Z,fs),e(fs,rn),e(Z,an),e($,ln),e($,p),e(p,ds),e(ds,nn),e(p,un),e(p,ps),e(ps,hn),e(p,fn),y(dt,p,null),e(p,dn),e(p,cs),e(cs,pn),e(p,cn),y(pt,p,null),e(p,mn),e(p,so),e(so,gn),e(so,ct),e(ct,yn),e(p,vn),e(p,ee),e(ee,wn),e(ee,ms),e(ms,bn),e(ee,$n),e(ee,gs),e(gs,_n),e(ee,kn),e(p,En),y(mt,p,null),e(p,Pn),e(p,gt),e(gt,In),e(gt,ys),e(ys,An),e(gt,Sn),e(p,Dn),y(yt,p,null),e(p,Ln),e(p,te),e(te,On),e(te,vs),e(vs,Cn),e(te,qn),e(te,ws),e(ws,xn),e(te,Nn),e(p,Tn),y(vt,p,null),e(p,Hn),e(p,bs),e(bs,Rn),e(p,jn),y(wt,p,null),e(p,Wn),e(p,$s),e($s,Gn),e(p,Fn),y(bt,p,null),e($,Un),e($,_s),e(_s,$t),e($t,Bn),e($t,ks),e(ks,Mn),e($t,Yn),e($,zn),e($,Es),e(Es,Ps),e(Ps,Jn),f(t,Ci,h),f(t,oe,h),e(oe,be),e(be,Is),y(_t,Is,null),e(oe,Qn),e(oe,As),e(As,Xn),f(t,qi,h),f(t,_,h),e(_,Ss),e(Ss,Kn),e(_,Vn),e(_,Ds),e(Ds,Zn),e(_,eu),e(_,kt),e(kt,tu),e(kt,Ls),e(Ls,ou),e(kt,su),e(_,iu),e(_,Os),e(Os,ru),e(_,au),e(_,io),e(io,lu),e(io,Et),e(Et,se),e(se,nu),e(se,Cs),e(Cs,uu),e(se,hu),e(se,qs),e(qs,fu),e(se,du),e(Et,pu),e(Et,Pt),e(Pt,cu),e(Pt,xs),e(xs,mu),e(Pt,gu),e(_,yu),e(_,It),e(It,vu),e(It,Ns),e(Ns,wu),e(It,bu),e(_,$u),e(_,x),e(x,_u),e(x,Ts),e(Ts,ku),e(x,Eu),e(x,At),e(At,Hs),e(Hs,Pu),e(x,Iu),e(x,St),e(St,Au),e(x,Su),f(t,xi,h),f(t,ie,h),e(ie,$e),e($e,Rs),y(Dt,Rs,null),e(ie,Du),e(ie,js),e(js,Lu),f(t,Ni,h),f(t,_e,h),e(_e,Ou),e(_e,Lt),e(Lt,Cu),e(_e,qu),f(t,Ti,h),f(t,O,h),e(O,xu),e(O,Ws),e(Ws,Nu),e(O,Tu),e(O,Gs),e(Gs,Hu),e(O,Ru),e(O,Fs),e(Fs,ju),e(O,Wu),f(t,Hi,h),y(Ot,t,h),f(t,Ri,h),f(t,ke,h),e(ke,Gu),e(ke,Us),e(Us,Fu),e(ke,Uu),f(t,ji,h),f(t,ro,h),e(ro,Bu),f(t,Wi,h),f(t,R,h),e(R,Mu),e(R,Bs),e(Bs,Yu),e(R,zu),e(R,Ms),e(Ms,Ju),e(R,Qu),f(t,Gi,h),y(Ct,t,h),f(t,Fi,h),f(t,qt,h),e(qt,Ys),e(Ys,Xu),e(qt,Ku),f(t,Ui,h),y(xt,t,h),f(t,Bi,h),f(t,re,h),e(re,Ee),e(Ee,zs),y(Nt,zs,null),e(re,Vu),e(re,Js),e(Js,Zu),f(t,Mi,h),f(t,ao,h),e(ao,eh),f(t,Yi,h),f(t,Pe,h),e(Pe,Qs),e(Qs,th),e(Pe,oh),e(Pe,Xs),e(Xs,sh),f(t,zi,h),y(Tt,t,h),f(t,Ji,h),f(t,ae,h),e(ae,Ie),e(Ie,Ks),y(Ht,Ks,null),e(ae,ih),e(ae,Vs),e(Vs,rh),f(t,Qi,h),f(t,Ae,h),e(Ae,ah),e(Ae,Rt),e(Rt,lh),e(Ae,nh),f(t,Xi,h),f(t,lo,h),e(lo,jt),e(jt,uh),e(jt,Wt),e(Wt,hh),e(jt,fh),Ki=!0},p:Vd,i(t){Ki||(v(Ce.$$.fragment,t),v(Ne.$$.fragment,t),v(Ge.$$.fragment,t),v(Qe.$$.fragment,t),v(Xe.$$.fragment,t),v(Ke.$$.fragment,t),v(Ve.$$.fragment,t),v(tt.$$.fragment,t),v(lt.$$.fragment,t),v(nt.$$.fragment,t),v(ut.$$.fragment,t),v(ht.$$.fragment,t),v(ft.$$.fragment,t),v(dt.$$.fragment,t),v(pt.$$.fragment,t),v(mt.$$.fragment,t),v(yt.$$.fragment,t),v(vt.$$.fragment,t),v(wt.$$.fragment,t),v(bt.$$.fragment,t),v(_t.$$.fragment,t),v(Dt.$$.fragment,t),v(Ot.$$.fragment,t),v(Ct.$$.fragment,t),v(xt.$$.fragment,t),v(Nt.$$.fragment,t),v(Tt.$$.fragment,t),v(Ht.$$.fragment,t),Ki=!0)},o(t){w(Ce.$$.fragment,t),w(Ne.$$.fragment,t),w(Ge.$$.fragment,t),w(Qe.$$.fragment,t),w(Xe.$$.fragment,t),w(Ke.$$.fragment,t),w(Ve.$$.fragment,t),w(tt.$$.fragment,t),w(lt.$$.fragment,t),w(nt.$$.fragment,t),w(ut.$$.fragment,t),w(ht.$$.fragment,t),w(ft.$$.fragment,t),w(dt.$$.fragment,t),w(pt.$$.fragment,t),w(mt.$$.fragment,t),w(yt.$$.fragment,t),w(vt.$$.fragment,t),w(wt.$$.fragment,t),w(bt.$$.fragment,t),w(_t.$$.fragment,t),w(Dt.$$.fragment,t),w(Ot.$$.fragment,t),w(Ct.$$.fragment,t),w(xt.$$.fragment,t),w(Nt.$$.fragment,t),w(Tt.$$.fragment,t),w(Ht.$$.fragment,t),Ki=!1},d(t){o(G),t&&o(ei),t&&o(F),b(Ce),t&&o(ti),t&&o(Gt),t&&o(oi),t&&o(Ft),t&&o(si),t&&o(qe),t&&o(ii),t&&o(ne),t&&o(ri),t&&o(U),b(Ne),t&&o(ai),t&&o(Mt),t&&o(li),t&&o(P),t&&o(ni),t&&o(Jt),t&&o(ui),t&&o(B),b(Ge),t&&o(hi),t&&o(fe),t&&o(fi),t&&o(N),t&&o(di),t&&o(M),b(Qe),t&&o(pi),t&&o(Qt),t&&o(ci),t&&o(Y),b(Xe),t&&o(mi),t&&o(Xt),t&&o(gi),t&&o(ce),t&&o(yi),t&&o(z),b(Ke),t&&o(vi),t&&o(Kt),t&&o(wi),t&&o(T),t&&o(bi),t&&o(Vt),t&&o($i),t&&o(J),b(Ve),t&&o(_i),t&&o(Zt),t&&o(ki),t&&o(eo),t&&o(Ei),t&&o(H),t&&o(Pi),t&&o(L),t&&o(Ii),t&&o(to),t&&o(Ai),t&&o(Q),b(tt),t&&o(Si),t&&o(oo),t&&o(Di),t&&o(I),t&&o(Li),t&&o(ve),t&&o(Oi),t&&o($),b(lt),b(nt),b(ut),b(ht),b(ft),b(dt),b(pt),b(mt),b(yt),b(vt),b(wt),b(bt),t&&o(Ci),t&&o(oe),b(_t),t&&o(qi),t&&o(_),t&&o(xi),t&&o(ie),b(Dt),t&&o(Ni),t&&o(_e),t&&o(Ti),t&&o(O),t&&o(Hi),b(Ot,t),t&&o(Ri),t&&o(ke),t&&o(ji),t&&o(ro),t&&o(Wi),t&&o(R),t&&o(Gi),b(Ct,t),t&&o(Fi),t&&o(qt),t&&o(Ui),b(xt,t),t&&o(Bi),t&&o(re),b(Nt),t&&o(Mi),t&&o(ao),t&&o(Yi),t&&o(Pe),t&&o(zi),b(Tt,t),t&&o(Ji),t&&o(ae),b(Ht),t&&o(Qi),t&&o(Ae),t&&o(Xi),t&&o(lo)}}}const tp={local:"how-to-contribute-to-diffusers",sections:[{local:"overview",sections:[{local:"browse-github-issues-for-suggestions",title:"Browse GitHub issues for suggestions"}],title:"Overview"},{local:"submitting-a-new-issue-or-feature-request",sections:[{local:"did-you-find-a-bug",title:"Did you find a bug?"},{local:"do-you-want-to-implement-a-new-diffusion-pipeline-diffusion-model",title:"Do you want to implement a new diffusion pipeline / diffusion model?"},{local:"do-you-want-a-new-feature-that-is-not-a-model",title:"Do you want a new feature (that is not a model)?"}],title:"Submitting a new issue or feature request"},{local:"start-contributing-pull-requests",sections:[{local:"checklist",title:"Checklist"},{local:"tests",title:"Tests"},{local:"syncing-forked-main-with-upstream-huggingface-main",title:"Syncing forked main with upstream (HuggingFace) main"},{local:"style-guide",title:"Style guide"}],title:"Start contributing! (Pull Requests)"}],title:"How to contribute to Diffusers \u{1F9E8}"};function op(vh){return Zd(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ap extends zd{constructor(G){super();Jd(this,G,op,ep,Qd,{})}}export{ap as default,tp as metadata};
