import{s as Tt,o as bt,n as re}from"../chunks/scheduler.182ea377.js";import{S as xt,i as Ct,g as p,s as r,r as u,A as Mt,h as m,f as s,c as o,j as yt,u as $,x as w,k as vt,y as kt,a as i,v as c,d,t as h,w as g}from"../chunks/index.abf12888.js";import{T as Jt}from"../chunks/Tip.230e2334.js";import{C as _}from"../chunks/CodeBlock.57fe6e13.js";import{F as _t,M as Se}from"../chunks/Markdown.a342410d.js";import{H as ae}from"../chunks/Heading.16916d63.js";function Ut(v){let n,a;return n=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRpZmZ1c2VycyU1QiUyMnRvcmNoJTIyJTVEJTIwdHJhbnNmb3JtZXJz",highlighted:'pip install diffusers[<span class="hljs-string">&quot;torch&quot;</span>] transformers',wrap:!1}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p:re,i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function Lt(v){let n,a;return n=new Se({props:{$$slots:{default:[Ut]},$$scope:{ctx:v}}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p(t,f){const y={};f&2&&(y.$$scope={dirty:f,ctx:t}),n.$set(y)},i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function Pt(v){let n,a;return n=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRpZmZ1c2VycyU1QiUyMmZsYXglMjIlNUQlMjB0cmFuc2Zvcm1lcnM=",highlighted:'pip install diffusers[<span class="hljs-string">&quot;flax&quot;</span>] transformers',wrap:!1}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p:re,i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function It(v){let n,a;return n=new Se({props:{$$slots:{default:[Pt]},$$scope:{ctx:v}}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p(t,f){const y={};f&2&&(y.$$scope={dirty:f,ctx:t}),n.$set(y)},i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function jt(v){let n,a;return n=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QnRvcmNoJTVEJTIy",highlighted:'pip install -e <span class="hljs-string">&quot;.[torch]&quot;</span>',wrap:!1}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p:re,i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function Ht(v){let n,a;return n=new Se({props:{$$slots:{default:[jt]},$$scope:{ctx:v}}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p(t,f){const y={};f&2&&(y.$$scope={dirty:f,ctx:t}),n.$set(y)},i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function Zt(v){let n,a;return n=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QmZsYXglNUQlMjI=",highlighted:'pip install -e <span class="hljs-string">&quot;.[flax]&quot;</span>',wrap:!1}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p:re,i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function Gt(v){let n,a;return n=new Se({props:{$$slots:{default:[Zt]},$$scope:{ctx:v}}}),{c(){u(n.$$.fragment)},l(t){$(n.$$.fragment,t)},m(t,f){c(n,t,f),a=!0},p(t,f){const y={};f&2&&(y.$$scope={dirty:f,ctx:t}),n.$set(y)},i(t){a||(d(n.$$.fragment,t),a=!0)},o(t){h(n.$$.fragment,t),a=!1},d(t){g(n,t)}}}function Rt(v){let n,a="You must keep the <code>diffusers</code> folder if you want to keep using the library.";return{c(){n=p("p"),n.innerHTML=a},l(t){n=m(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-n1zjn8"&&(n.innerHTML=a)},m(t,f){i(t,n,f)},p:re,d(t){t&&s(n)}}}function Et(v){let n,a,t,f,y,oe,C,Ne="Install 🤗 Diffusers for whichever deep learning library you’re working with.",fe,M,Qe="🤗 Diffusers is tested on Python 3.8+, PyTorch 1.7.0+ and Flax. Follow the installation instructions below for the deep learning library you are using:",pe,k,Ae='<li><a href="https://pytorch.org/get-started/locally/" rel="nofollow">PyTorch</a> installation instructions.</li> <li><a href="https://flax.readthedocs.io/en/latest/" rel="nofollow">Flax</a> installation instructions.</li>',me,J,ue,U,Xe=`You should install 🤗 Diffusers in a <a href="https://docs.python.org/3/library/venv.html" rel="nofollow">virtual environment</a>.
If you’re unfamiliar with Python virtual environments, take a look at this <a href="https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/" rel="nofollow">guide</a>.
A virtual environment makes it easier to manage different projects and avoid compatibility issues between dependencies.`,$e,L,Oe="Start by creating a virtual environment in your project directory:",ce,P,de,I,Ke="Activate the virtual environment:",he,j,ge,H,et="🤗 Diffusers also relies on the 🤗 Transformers library, and you can install both with the following command:",we,T,ye,Z,ve,G,tt="Before installing 🤗 Diffusers from source, make sure you have <code>torch</code> and 🤗 Accelerate installed.",_e,R,lt='For <code>torch</code> installation, refer to the <code>torch</code> <a href="https://pytorch.org/get-started/locally/#start-locally" rel="nofollow">installation</a> guide.',Te,E,nt="To install 🤗 Accelerate:",be,F,xe,z,st="Install 🤗 Diffusers from source with the following command:",Ce,V,Me,Y,it=`This command installs the bleeding edge <code>main</code> version rather than the latest <code>stable</code> version.
The <code>main</code> version is useful for staying up-to-date with the latest developments.
For instance, if a bug has been fixed since the last official release but a new release hasn’t been rolled out yet.
However, this means the <code>main</code> version may not always be stable.
We strive to keep the <code>main</code> version operational, and most issues are usually resolved within a few hours or a day.
If you run into a problem, please open an <a href="https://github.com/huggingface/diffusers/issues/new/choose" rel="nofollow">Issue</a>, so we can fix it even sooner!`,ke,D,Je,W,at="You will need an editable install if you’d like to:",Ue,q,rt="<li>Use the <code>main</code> version of the source code.</li> <li>Contribute to 🤗 Diffusers and need to test changes in the code.</li>",Le,B,ot="Clone the repository and install 🤗 Diffusers with the following commands:",Pe,S,Ie,b,je,N,ft=`These commands will link the folder you cloned the repository to and your Python library paths.
Python will now look inside the folder you cloned to in addition to the normal library paths.
For example, if your Python packages are typically installed in <code>~/anaconda3/envs/main/lib/python3.8/site-packages/</code>, Python will also search the <code>~/diffusers/</code> folder you cloned to.`,He,x,Ze,Q,pt="Now you can easily update your clone to the latest version of 🤗 Diffusers with the following command:",Ge,A,Re,X,mt="Your Python environment will find the <code>main</code> version of 🤗 Diffusers on the next run.",Ee,O,Fe,K,ut=`Our library gathers telemetry information during <code>from_pretrained()</code> requests.
This data includes the version of Diffusers and PyTorch/Flax, the requested model or pipeline class,
and the path to a pre-trained checkpoint if it is hosted on the Hub.
This usage data helps us debug issues and prioritize new features.
Telemetry is only sent when loading models and pipelines from the HuggingFace Hub,
and is not collected during local usage.`,ze,ee,$t=`We understand that not everyone wants to share additional information, and we respect your privacy,
so you can disable telemetry collection by setting the <code>DISABLE_TELEMETRY</code> environment variable from your terminal:`,Ve,te,ct="On Linux/MacOS:",Ye,le,De,ne,dt="On Windows:",We,se,qe,ie,Be;return y=new ae({props:{title:"Installation",local:"installation",headingTag:"h1"}}),J=new ae({props:{title:"Install with pip",local:"install-with-pip",headingTag:"h2"}}),P=new _({props:{code:"cHl0aG9uJTIwLW0lMjB2ZW52JTIwLmVudg==",highlighted:'python -m venv .<span class="hljs-built_in">env</span>',wrap:!1}}),j=new _({props:{code:"c291cmNlJTIwLmVudiUyRmJpbiUyRmFjdGl2YXRl",highlighted:'<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate',wrap:!1}}),T=new _t({props:{pytorch:!0,tensorflow:!1,jax:!0,$$slots:{jax:[It],pytorch:[Lt]},$$scope:{ctx:v}}}),Z=new ae({props:{title:"Install from source",local:"install-from-source",headingTag:"h2"}}),F=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMGFjY2VsZXJhdGU=",highlighted:"pip install accelerate",wrap:!1}}),V=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGZGlmZnVzZXJz",highlighted:"pip install git+https://github.com/huggingface/diffusers",wrap:!1}}),D=new ae({props:{title:"Editable install",local:"editable-install",headingTag:"h2"}}),S=new _({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmRpZmZ1c2Vycy5naXQlMEFjZCUyMGRpZmZ1c2Vycw==",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/diffusers.git
<span class="hljs-built_in">cd</span> diffusers`,wrap:!1}}),b=new _t({props:{pytorch:!0,tensorflow:!1,jax:!0,$$slots:{jax:[Gt],pytorch:[Ht]},$$scope:{ctx:v}}}),x=new Jt({props:{warning:!0,$$slots:{default:[Rt]},$$scope:{ctx:v}}}),A=new _({props:{code:"Y2QlMjB+JTJGZGlmZnVzZXJzJTJGJTBBZ2l0JTIwcHVsbA==",highlighted:`<span class="hljs-built_in">cd</span> ~/diffusers/
git pull`,wrap:!1}}),O=new ae({props:{title:"Notice on telemetry logging",local:"notice-on-telemetry-logging",headingTag:"h2"}}),le=new _({props:{code:"ZXhwb3J0JTIwRElTQUJMRV9URUxFTUVUUlklM0RZRVM=",highlighted:'<span class="hljs-built_in">export</span> DISABLE_TELEMETRY=YES',wrap:!1}}),se=new _({props:{code:"c2V0JTIwRElTQUJMRV9URUxFTUVUUlklM0RZRVM=",highlighted:'<span class="hljs-built_in">set</span> DISABLE_TELEMETRY=YES',wrap:!1}}),{c(){n=p("meta"),a=r(),t=p("p"),f=r(),u(y.$$.fragment),oe=r(),C=p("p"),C.textContent=Ne,fe=r(),M=p("p"),M.textContent=Qe,pe=r(),k=p("ul"),k.innerHTML=Ae,me=r(),u(J.$$.fragment),ue=r(),U=p("p"),U.innerHTML=Xe,$e=r(),L=p("p"),L.textContent=Oe,ce=r(),u(P.$$.fragment),de=r(),I=p("p"),I.textContent=Ke,he=r(),u(j.$$.fragment),ge=r(),H=p("p"),H.textContent=et,we=r(),u(T.$$.fragment),ye=r(),u(Z.$$.fragment),ve=r(),G=p("p"),G.innerHTML=tt,_e=r(),R=p("p"),R.innerHTML=lt,Te=r(),E=p("p"),E.textContent=nt,be=r(),u(F.$$.fragment),xe=r(),z=p("p"),z.textContent=st,Ce=r(),u(V.$$.fragment),Me=r(),Y=p("p"),Y.innerHTML=it,ke=r(),u(D.$$.fragment),Je=r(),W=p("p"),W.textContent=at,Ue=r(),q=p("ul"),q.innerHTML=rt,Le=r(),B=p("p"),B.textContent=ot,Pe=r(),u(S.$$.fragment),Ie=r(),u(b.$$.fragment),je=r(),N=p("p"),N.innerHTML=ft,He=r(),u(x.$$.fragment),Ze=r(),Q=p("p"),Q.textContent=pt,Ge=r(),u(A.$$.fragment),Re=r(),X=p("p"),X.innerHTML=mt,Ee=r(),u(O.$$.fragment),Fe=r(),K=p("p"),K.innerHTML=ut,ze=r(),ee=p("p"),ee.innerHTML=$t,Ve=r(),te=p("p"),te.textContent=ct,Ye=r(),u(le.$$.fragment),De=r(),ne=p("p"),ne.textContent=dt,We=r(),u(se.$$.fragment),qe=r(),ie=p("p"),this.h()},l(e){const l=Mt("svelte-u9bgzb",document.head);n=m(l,"META",{name:!0,content:!0}),l.forEach(s),a=o(e),t=m(e,"P",{}),yt(t).forEach(s),f=o(e),$(y.$$.fragment,e),oe=o(e),C=m(e,"P",{"data-svelte-h":!0}),w(C)!=="svelte-m60lo4"&&(C.textContent=Ne),fe=o(e),M=m(e,"P",{"data-svelte-h":!0}),w(M)!=="svelte-17n9w7s"&&(M.textContent=Qe),pe=o(e),k=m(e,"UL",{"data-svelte-h":!0}),w(k)!=="svelte-1gzhez4"&&(k.innerHTML=Ae),me=o(e),$(J.$$.fragment,e),ue=o(e),U=m(e,"P",{"data-svelte-h":!0}),w(U)!=="svelte-jan9ki"&&(U.innerHTML=Xe),$e=o(e),L=m(e,"P",{"data-svelte-h":!0}),w(L)!=="svelte-4vcemb"&&(L.textContent=Oe),ce=o(e),$(P.$$.fragment,e),de=o(e),I=m(e,"P",{"data-svelte-h":!0}),w(I)!=="svelte-ji0hbe"&&(I.textContent=Ke),he=o(e),$(j.$$.fragment,e),ge=o(e),H=m(e,"P",{"data-svelte-h":!0}),w(H)!=="svelte-prkr2g"&&(H.textContent=et),we=o(e),$(T.$$.fragment,e),ye=o(e),$(Z.$$.fragment,e),ve=o(e),G=m(e,"P",{"data-svelte-h":!0}),w(G)!=="svelte-oih0nr"&&(G.innerHTML=tt),_e=o(e),R=m(e,"P",{"data-svelte-h":!0}),w(R)!=="svelte-h07ggz"&&(R.innerHTML=lt),Te=o(e),E=m(e,"P",{"data-svelte-h":!0}),w(E)!=="svelte-krupno"&&(E.textContent=nt),be=o(e),$(F.$$.fragment,e),xe=o(e),z=m(e,"P",{"data-svelte-h":!0}),w(z)!=="svelte-4cq58h"&&(z.textContent=st),Ce=o(e),$(V.$$.fragment,e),Me=o(e),Y=m(e,"P",{"data-svelte-h":!0}),w(Y)!=="svelte-1ke6vs5"&&(Y.innerHTML=it),ke=o(e),$(D.$$.fragment,e),Je=o(e),W=m(e,"P",{"data-svelte-h":!0}),w(W)!=="svelte-oeh2m0"&&(W.textContent=at),Ue=o(e),q=m(e,"UL",{"data-svelte-h":!0}),w(q)!=="svelte-1edyqz4"&&(q.innerHTML=rt),Le=o(e),B=m(e,"P",{"data-svelte-h":!0}),w(B)!=="svelte-1ot86w6"&&(B.textContent=ot),Pe=o(e),$(S.$$.fragment,e),Ie=o(e),$(b.$$.fragment,e),je=o(e),N=m(e,"P",{"data-svelte-h":!0}),w(N)!=="svelte-1y77vmc"&&(N.innerHTML=ft),He=o(e),$(x.$$.fragment,e),Ze=o(e),Q=m(e,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-df0eim"&&(Q.textContent=pt),Ge=o(e),$(A.$$.fragment,e),Re=o(e),X=m(e,"P",{"data-svelte-h":!0}),w(X)!=="svelte-s6kf2x"&&(X.innerHTML=mt),Ee=o(e),$(O.$$.fragment,e),Fe=o(e),K=m(e,"P",{"data-svelte-h":!0}),w(K)!=="svelte-m12d9"&&(K.innerHTML=ut),ze=o(e),ee=m(e,"P",{"data-svelte-h":!0}),w(ee)!=="svelte-nizes4"&&(ee.innerHTML=$t),Ve=o(e),te=m(e,"P",{"data-svelte-h":!0}),w(te)!=="svelte-99tbt5"&&(te.textContent=ct),Ye=o(e),$(le.$$.fragment,e),De=o(e),ne=m(e,"P",{"data-svelte-h":!0}),w(ne)!=="svelte-l29ize"&&(ne.textContent=dt),We=o(e),$(se.$$.fragment,e),qe=o(e),ie=m(e,"P",{}),yt(ie).forEach(s),this.h()},h(){vt(n,"name","hf:doc:metadata"),vt(n,"content",Ft)},m(e,l){kt(document.head,n),i(e,a,l),i(e,t,l),i(e,f,l),c(y,e,l),i(e,oe,l),i(e,C,l),i(e,fe,l),i(e,M,l),i(e,pe,l),i(e,k,l),i(e,me,l),c(J,e,l),i(e,ue,l),i(e,U,l),i(e,$e,l),i(e,L,l),i(e,ce,l),c(P,e,l),i(e,de,l),i(e,I,l),i(e,he,l),c(j,e,l),i(e,ge,l),i(e,H,l),i(e,we,l),c(T,e,l),i(e,ye,l),c(Z,e,l),i(e,ve,l),i(e,G,l),i(e,_e,l),i(e,R,l),i(e,Te,l),i(e,E,l),i(e,be,l),c(F,e,l),i(e,xe,l),i(e,z,l),i(e,Ce,l),c(V,e,l),i(e,Me,l),i(e,Y,l),i(e,ke,l),c(D,e,l),i(e,Je,l),i(e,W,l),i(e,Ue,l),i(e,q,l),i(e,Le,l),i(e,B,l),i(e,Pe,l),c(S,e,l),i(e,Ie,l),c(b,e,l),i(e,je,l),i(e,N,l),i(e,He,l),c(x,e,l),i(e,Ze,l),i(e,Q,l),i(e,Ge,l),c(A,e,l),i(e,Re,l),i(e,X,l),i(e,Ee,l),c(O,e,l),i(e,Fe,l),i(e,K,l),i(e,ze,l),i(e,ee,l),i(e,Ve,l),i(e,te,l),i(e,Ye,l),c(le,e,l),i(e,De,l),i(e,ne,l),i(e,We,l),c(se,e,l),i(e,qe,l),i(e,ie,l),Be=!0},p(e,[l]){const ht={};l&2&&(ht.$$scope={dirty:l,ctx:e}),T.$set(ht);const gt={};l&2&&(gt.$$scope={dirty:l,ctx:e}),b.$set(gt);const wt={};l&2&&(wt.$$scope={dirty:l,ctx:e}),x.$set(wt)},i(e){Be||(d(y.$$.fragment,e),d(J.$$.fragment,e),d(P.$$.fragment,e),d(j.$$.fragment,e),d(T.$$.fragment,e),d(Z.$$.fragment,e),d(F.$$.fragment,e),d(V.$$.fragment,e),d(D.$$.fragment,e),d(S.$$.fragment,e),d(b.$$.fragment,e),d(x.$$.fragment,e),d(A.$$.fragment,e),d(O.$$.fragment,e),d(le.$$.fragment,e),d(se.$$.fragment,e),Be=!0)},o(e){h(y.$$.fragment,e),h(J.$$.fragment,e),h(P.$$.fragment,e),h(j.$$.fragment,e),h(T.$$.fragment,e),h(Z.$$.fragment,e),h(F.$$.fragment,e),h(V.$$.fragment,e),h(D.$$.fragment,e),h(S.$$.fragment,e),h(b.$$.fragment,e),h(x.$$.fragment,e),h(A.$$.fragment,e),h(O.$$.fragment,e),h(le.$$.fragment,e),h(se.$$.fragment,e),Be=!1},d(e){e&&(s(a),s(t),s(f),s(oe),s(C),s(fe),s(M),s(pe),s(k),s(me),s(ue),s(U),s($e),s(L),s(ce),s(de),s(I),s(he),s(ge),s(H),s(we),s(ye),s(ve),s(G),s(_e),s(R),s(Te),s(E),s(be),s(xe),s(z),s(Ce),s(Me),s(Y),s(ke),s(Je),s(W),s(Ue),s(q),s(Le),s(B),s(Pe),s(Ie),s(je),s(N),s(He),s(Ze),s(Q),s(Ge),s(Re),s(X),s(Ee),s(Fe),s(K),s(ze),s(ee),s(Ve),s(te),s(Ye),s(De),s(ne),s(We),s(qe),s(ie)),s(n),g(y,e),g(J,e),g(P,e),g(j,e),g(T,e),g(Z,e),g(F,e),g(V,e),g(D,e),g(S,e),g(b,e),g(x,e),g(A,e),g(O,e),g(le,e),g(se,e)}}}const Ft='{"title":"Installation","local":"installation","sections":[{"title":"Install with pip","local":"install-with-pip","sections":[],"depth":2},{"title":"Install from source","local":"install-from-source","sections":[],"depth":2},{"title":"Editable install","local":"editable-install","sections":[],"depth":2},{"title":"Notice on telemetry logging","local":"notice-on-telemetry-logging","sections":[],"depth":2}],"depth":1}';function zt(v){return bt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class St extends xt{constructor(n){super(),Ct(this,n,zt,Et,Tt,{})}}export{St as component};
