import{S as Qs,i as qs,s as Xs,e as o,k as m,t as r,w as c,M as Ks,c as p,d as t,m as u,a,h as i,x as v,b as $,G as l,g as s,y as _,q as y,o as h,B as d,v as gs}from"../chunks/vendor-hf-doc-builder.js";import{C as D,T as er}from"../chunks/CodeBlock-hf-doc-builder.js";import{I as zs}from"../chunks/IconCopyLink-hf-doc-builder.js";function tr(ut){let n,R,w,B,M;return{c(){n=o("p"),R=r("\u5982\u679C\u4F60\u60F3\u7EE7\u7EED\u4F7F\u7528\u8FD9\u4E2A\u5E93\uFF0C\u4F60\u5FC5\u987B\u4FDD\u7559 "),w=o("code"),B=r("diffusers"),M=r(" \u6587\u4EF6\u5939\u3002")},l(T){n=p(T,"P",{});var U=a(n);R=i(U,"\u5982\u679C\u4F60\u60F3\u7EE7\u7EED\u4F7F\u7528\u8FD9\u4E2A\u5E93\uFF0C\u4F60\u5FC5\u987B\u4FDD\u7559 "),w=p(U,"CODE",{});var W=a(w);B=i(W,"diffusers"),W.forEach(t),M=i(U," \u6587\u4EF6\u5939\u3002"),U.forEach(t)},m(T,U){s(T,n,U),l(n,R),l(n,w),l(w,B),l(n,M)},d(T){T&&t(n)}}}function lr(ut){let n,R,w,B,M,T,U,W,he,vl,$t,k,de,z,_l,yl,hl,we,Q,dl,wl,nt,C,Z,Se,q,Tl,je,Pl,Et,x,bl,X,Dl,Jl,ct,O,Ul,K,Il,Cl,vt,Te,Gl,_t,Pe,Rl,yt,g,ht,be,Ml,dt,ee,wt,De,kl,Tt,Je,Fe,Zl,Pt,te,bt,Ue,Le,xl,Dt,le,Jt,fe,Ol,Ut,P,Sl,Ve,jl,Fl,Ae,Ll,Vl,Ne,Al,Nl,It,J,He,Hl,Yl,Ye,Bl,Wl,se,zl,Ql,Ct,re,ql,Be,Xl,Gt,ie,Rt,Ie,Kl,Mt,oe,kt,E,gl,We,ef,tf,ze,lf,ff,Qe,sf,rf,qe,of,pf,Xe,af,mf,Zt,S,uf,Ke,$f,nf,xt,j,Ef,pe,cf,vf,Ot,ae,_f,St,Ce,yf,jt,F,me,hf,ge,df,wf,Tf,et,Pf,Ft,Ge,bf,Lt,ue,Vt,Re,tt,Df,At,$e,Nt,Me,lt,Jf,Ht,ne,Yt,I,Uf,ft,If,Cf,st,Gf,Rf,Bt,L,Wt,ke,Mf,zt,Ee,Qt,V,kf,rt,Zf,xf,qt,G,A,it,ce,Of,ot,Sf,Xt,N,jf,pt,Ff,Lf,Kt,H,Vf,at,Af,Nf,gt,Ze,Hf,el,ve,tl,xe,Yf,ll,_e,fl;return q=new zs({}),g=new D({props:{code:"cHl0aG9uJTIwLW0lMjB2ZW52JTIwLmVudg==",highlighted:'python -m venv .<span class="hljs-built_in">env</span>'}}),ee=new D({props:{code:"c291cmNlJTIwLmVudiUyRmJpbiUyRmFjdGl2YXRl",highlighted:'<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate'}}),te=new D({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRpZmZ1c2VycyU1QiUyMnRvcmNoJTIyJTVE",highlighted:'pip install diffusers[<span class="hljs-string">&quot;torch&quot;</span>]'}}),le=new D({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRpZmZ1c2VycyU1QiUyMmZsYXglMjIlNUQ=",highlighted:'pip install diffusers[<span class="hljs-string">&quot;flax&quot;</span>]'}}),ie=new D({props:{code:"cGlwJTIwaW5zdGFsbCUyMGFjY2VsZXJhdGU=",highlighted:"pip install accelerate"}}),oe=new D({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGZGlmZnVzZXJz",highlighted:"pip install git+https://github.com/huggingface/diffusers"}}),ue=new D({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`}}),$e=new D({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QnRvcmNoJTVEJTIy",highlighted:'pip <span class="hljs-keyword">install</span> -e <span class="hljs-string">&quot;.[torch]&quot;</span>'}}),ne=new D({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QmZsYXglNUQlMjI=",highlighted:'pip <span class="hljs-keyword">install</span> -e <span class="hljs-string">&quot;.[flax]&quot;</span>'}}),L=new er({props:{warning:!0,$$slots:{default:[tr]},$$scope:{ctx:ut}}}),Ee=new D({props:{code:"Y2QlMjB+JTJGZGlmZnVzZXJzJTJGJTBBZ2l0JTIwcHVsbA==",highlighted:`<span class="hljs-built_in">cd</span> ~/diffusers/
git pull`}}),ce=new zs({}),ve=new D({props:{code:"ZXhwb3J0JTIwRElTQUJMRV9URUxFTUVUUlklM0RZRVM=",highlighted:'<span class="hljs-built_in">export</span> DISABLE_TELEMETRY=YES'}}),_e=new D({props:{code:"c2V0JTIwRElTQUJMRV9URUxFTUVUUlklM0RZRVM=",highlighted:'<span class="hljs-built_in">set</span> DISABLE_TELEMETRY=YES'}}),{c(){n=o("meta"),R=m(),w=o("h1"),B=r("\u5B89\u88C5"),M=m(),T=o("p"),U=r("\u5728\u4F60\u6B63\u5728\u4F7F\u7528\u7684\u4EFB\u610F\u6DF1\u5EA6\u5B66\u4E60\u6846\u67B6\u4E2D\u5B89\u88C5 \u{1F917} Diffusers \u3002"),W=m(),he=o("p"),vl=r("\u{1F917} Diffusers\u5DF2\u5728Python 3.7+\u3001PyTorch 1.7.0+\u548CFlax\u4E0A\u8FDB\u884C\u4E86\u6D4B\u8BD5\u3002\u6309\u7167\u4E0B\u9762\u7684\u5B89\u88C5\u8BF4\u660E\uFF0C\u9488\u5BF9\u4F60\u6B63\u5728\u4F7F\u7528\u7684\u6DF1\u5EA6\u5B66\u4E60\u6846\u67B6\u8FDB\u884C\u5B89\u88C5\uFF1A"),$t=m(),k=o("ul"),de=o("li"),z=o("a"),_l=r("PyTorch"),yl=r(" installation instructions."),hl=m(),we=o("li"),Q=o("a"),dl=r("Flax"),wl=r(" installation instructions."),nt=m(),C=o("h2"),Z=o("a"),Se=o("span"),c(q.$$.fragment),Tl=m(),je=o("span"),Pl=r("\u4F7F\u7528pip\u5B89\u88C5"),Et=m(),x=o("p"),bl=r("\u4F60\u9700\u8981\u5728"),X=o("a"),Dl=r("\u865A\u62DF\u73AF\u5883"),Jl=r("\u4E2D\u5B89\u88C5 \u{1F917} Diffusers \u3002"),ct=m(),O=o("p"),Ul=r("\u5982\u679C\u4F60\u5BF9 Python \u865A\u62DF\u73AF\u5883\u4E0D\u719F\u6089\uFF0C\u53EF\u4EE5\u770B\u770B\u8FD9\u4E2A"),K=o("a"),Il=r("\u6559\u7A0B"),Cl=r("."),vt=m(),Te=o("p"),Gl=r("\u5728\u865A\u62DF\u73AF\u5883\u4E2D\uFF0C\u4F60\u53EF\u4EE5\u8F7B\u677E\u7BA1\u7406\u4E0D\u540C\u7684\u9879\u76EE\uFF0C\u907F\u514D\u4F9D\u8D56\u9879\u4E4B\u95F4\u7684\u517C\u5BB9\u6027\u95EE\u9898\u3002"),_t=m(),Pe=o("p"),Rl=r("\u9996\u5148\uFF0C\u5728\u4F60\u7684\u9879\u76EE\u76EE\u5F55\u4E0B\u521B\u5EFA\u4E00\u4E2A\u865A\u62DF\u73AF\u5883\uFF1A"),yt=m(),c(g.$$.fragment),ht=m(),be=o("p"),Ml=r("\u6FC0\u6D3B\u865A\u62DF\u73AF\u5883\uFF1A"),dt=m(),c(ee.$$.fragment),wt=m(),De=o("p"),kl=r("\u73B0\u5728\uFF0C\u4F60\u5C31\u53EF\u4EE5\u5B89\u88C5 \u{1F917} Diffusers\u4E86\uFF01\u4F7F\u7528\u4E0B\u8FB9\u8FD9\u4E2A\u547D\u4EE4\uFF1A"),Tt=m(),Je=o("p"),Fe=o("strong"),Zl=r("PyTorch"),Pt=m(),c(te.$$.fragment),bt=m(),Ue=o("p"),Le=o("strong"),xl=r("Flax"),Dt=m(),c(le.$$.fragment),Jt=m(),fe=o("h2"),Ol=r("\u4ECE\u6E90\u4EE3\u7801\u5B89\u88C5"),Ut=m(),P=o("p"),Sl=r("\u5728\u4ECE\u6E90\u4EE3\u7801\u5B89\u88C5 "),Ve=o("code"),jl=r("diffusers"),Fl=r(" \u4E4B\u524D\uFF0C\u786E\u4FDD\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 "),Ae=o("code"),Ll=r("torch"),Vl=r(" \u548C "),Ne=o("code"),Al=r("accelerate"),Nl=r("\u3002"),It=m(),J=o("p"),He=o("code"),Hl=r("torch"),Yl=r("\u7684\u5B89\u88C5\u6559\u7A0B\u53EF\u4EE5\u770B "),Ye=o("code"),Bl=r("torch"),Wl=m(),se=o("a"),zl=r("\u6587\u6863"),Ql=r("."),Ct=m(),re=o("p"),ql=r("\u5B89\u88C5 "),Be=o("code"),Xl=r("accelerate"),Gt=m(),c(ie.$$.fragment),Rt=m(),Ie=o("p"),Kl=r("\u4ECE\u6E90\u7801\u5B89\u88C5 \u{1F917} Diffusers \u9700\u8981\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4:"),Mt=m(),c(oe.$$.fragment),kt=m(),E=o("p"),gl=r("\u8FD9\u4E2A\u547D\u4EE4\u5B89\u88C5\u7684\u662F\u6700\u65B0\u7684 "),We=o("code"),ef=r("main"),tf=r("\u7248\u672C\uFF0C\u800C\u4E0D\u662F\u6700\u8FD1\u7684"),ze=o("code"),lf=r("stable"),ff=r(`\u7248\u3002
`),Qe=o("code"),sf=r("main"),rf=r("\u662F\u4E00\u76F4\u548C\u6700\u65B0\u8FDB\u5C55\u4FDD\u6301\u4E00\u81F4\u7684\u3002\u6BD4\u5982\uFF0C\u4E0A\u6B21\u53D1\u5E03\u7684\u6B63\u5F0F\u7248\u4E2D\u6709bug\uFF0C\u5728"),qe=o("code"),of=r("main"),pf=r(`\u4E2D\u53EF\u4EE5\u770B\u5230\u8FD9\u4E2Abug\u88AB\u4FEE\u590D\u4E86\uFF0C\u4F46\u662F\u65B0\u7684\u6B63\u5F0F\u7248\u6B64\u65F6\u5C1A\u672A\u63A8\u51FA\u3002
\u4F46\u662F\u8FD9\u4E5F\u610F\u5473\u7740 `),Xe=o("code"),af=r("main"),mf=r("\u7248\u672C\u4E0D\u4FDD\u8BC1\u662F\u7A33\u5B9A\u7684\u3002"),Zt=m(),S=o("p"),uf=r("\u6211\u4EEC\u52AA\u529B\u4FDD\u6301"),Ke=o("code"),$f=r("main"),nf=r("\u7248\u672C\u6B63\u5E38\u8FD0\u884C\uFF0C\u5927\u591A\u6570\u95EE\u9898\u90FD\u80FD\u5728\u51E0\u4E2A\u5C0F\u65F6\u6216\u4E00\u5929\u4E4B\u5185\u89E3\u51B3"),xt=m(),j=o("p"),Ef=r("\u5982\u679C\u4F60\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u53EF\u4EE5\u63D0 "),pe=o("a"),cf=r("Issue"),vf=r("\uFF0C\u8FD9\u6837\u6211\u4EEC\u5C31\u80FD\u66F4\u5FEB\u4FEE\u590D\u95EE\u9898\u4E86\u3002"),Ot=m(),ae=o("h2"),_f=r("\u53EF\u4FEE\u6539\u5B89\u88C5"),St=m(),Ce=o("p"),yf=r("\u5982\u679C\u4F60\u60F3\u505A\u4EE5\u4E0B\u4E24\u4EF6\u4E8B\uFF0C\u90A3\u4F60\u53EF\u80FD\u9700\u8981\u4E00\u4E2A\u53EF\u4FEE\u6539\u4EE3\u7801\u7684\u5B89\u88C5\u65B9\u5F0F\uFF1A"),jt=m(),F=o("ul"),me=o("li"),hf=r("\u4F7F\u7528 "),ge=o("code"),df=r("main"),wf=r("\u7248\u672C\u7684\u6E90\u4EE3\u7801\u3002"),Tf=m(),et=o("li"),Pf=r("\u4E3A \u{1F917} Diffusers \u8D21\u732E\uFF0C\u9700\u8981\u6D4B\u8BD5\u4EE3\u7801\u4E2D\u7684\u53D8\u5316\u3002"),Ft=m(),Ge=o("p"),bf=r("\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\u514B\u9686\u5E76\u5B89\u88C5 \u{1F917} Diffusers:"),Lt=m(),c(ue.$$.fragment),Vt=m(),Re=o("p"),tt=o("strong"),Df=r("PyTorch"),At=m(),c($e.$$.fragment),Nt=m(),Me=o("p"),lt=o("strong"),Jf=r("Flax"),Ht=m(),c(ne.$$.fragment),Yt=m(),I=o("p"),Uf=r(`\u8FD9\u4E9B\u547D\u4EE4\u5C06\u8FDE\u63A5\u5230\u4F60\u514B\u9686\u7684\u7248\u672C\u5E93\u548C\u4F60\u7684 Python \u5E93\u8DEF\u5F84\u3002
\u73B0\u5728\uFF0C\u4E0D\u53EA\u662F\u5728\u901A\u5E38\u7684\u5E93\u8DEF\u5F84\uFF0CPython \u8FD8\u4F1A\u5728\u4F60\u514B\u9686\u7684\u6587\u4EF6\u5939\u5185\u5BFB\u627E\u5305\u3002
\u4F8B\u5982\uFF0C\u5982\u679C\u4F60\u7684 Python \u5305\u901A\u5E38\u5B89\u88C5\u5728 `),ft=o("code"),If=r("~/anaconda3/envs/main/lib/python3.7/Site-packages/"),Cf=r("\uFF0CPython \u4E5F\u4F1A\u641C\u7D22\u4F60\u514B\u9686\u5230\u7684\u6587\u4EF6\u5939\u3002"),st=o("code"),Gf=r("~/diffusers/"),Rf=r("\u3002"),Bt=m(),c(L.$$.fragment),Wt=m(),ke=o("p"),Mf=r("\u73B0\u5728\u4F60\u53EF\u4EE5\u7528\u4E0B\u9762\u7684\u547D\u4EE4\u8F7B\u677E\u5730\u5C06\u4F60\u514B\u9686\u7684 \u{1F917} Diffusers \u5E93\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C\u3002"),zt=m(),c(Ee.$$.fragment),Qt=m(),V=o("p"),kf=r("\u4F60\u7684Python\u73AF\u5883\u5C06\u5728\u4E0B\u6B21\u8FD0\u884C\u65F6\u627E\u5230"),rt=o("code"),Zf=r("main"),xf=r("\u7248\u672C\u7684 \u{1F917} Diffusers\u3002"),qt=m(),G=o("h2"),A=o("a"),it=o("span"),c(ce.$$.fragment),Of=m(),ot=o("span"),Sf=r("\u6CE8\u610F Telemetry \u65E5\u5FD7"),Xt=m(),N=o("p"),jf=r("\u6211\u4EEC\u7684\u5E93\u4F1A\u5728\u4F7F\u7528"),pt=o("code"),Ff=r("from_pretrained()"),Lf=r(`\u8BF7\u6C42\u671F\u95F4\u6536\u96C6 telemetry \u4FE1\u606F\u3002\u8FD9\u4E9B\u6570\u636E\u5305\u62ECDiffusers\u548CPyTorch/Flax\u7684\u7248\u672C\uFF0C\u8BF7\u6C42\u7684\u6A21\u578B\u6216\u7BA1\u9053\u7C7B\uFF0C\u4EE5\u53CA\u9884\u8BAD\u7EC3\u68C0\u67E5\u70B9\u7684\u8DEF\u5F84\uFF08\u5982\u679C\u5B83\u88AB\u6258\u7BA1\u5728Hub\u4E0A\u7684\u8BDD\uFF09\u3002
\u8FD9\u4E9B\u4F7F\u7528\u6570\u636E\u6709\u52A9\u4E8E\u6211\u4EEC\u8C03\u8BD5\u95EE\u9898\u5E76\u786E\u5B9A\u65B0\u529F\u80FD\u7684\u5F00\u53D1\u4F18\u5148\u7EA7\u3002
Telemetry \u6570\u636E\u4EC5\u5728\u4ECE HuggingFace Hub \u4E2D\u52A0\u8F7D\u6A21\u578B\u548C\u7BA1\u9053\u65F6\u53D1\u9001\uFF0C\u800C\u4E0D\u4F1A\u5728\u672C\u5730\u4F7F\u7528\u671F\u95F4\u6536\u96C6\u3002`),Kt=m(),H=o("p"),Vf=r(`\u6211\u4EEC\u77E5\u9053\uFF0C\u5E76\u4E0D\u662F\u6BCF\u4E2A\u4EBA\u90FD\u60F3\u5206\u4EAB\u8FD9\u4E9B\u7684\u4FE1\u606F\uFF0C\u6211\u4EEC\u5C0A\u91CD\u60A8\u7684\u9690\u79C1\uFF0C
\u56E0\u6B64\u60A8\u53EF\u4EE5\u901A\u8FC7\u5728\u7EC8\u7AEF\u4E2D\u8BBE\u7F6E `),at=o("code"),Af=r("DISABLE_TELEMETRY"),Nf=r(" \u73AF\u5883\u53D8\u91CF\u4ECE\u800C\u7981\u7528 Telemetry \u6570\u636E\u6536\u96C6\uFF1A"),gt=m(),Ze=o("p"),Hf=r("Linux/MacOS :"),el=m(),c(ve.$$.fragment),tl=m(),xe=o("p"),Yf=r("Windows :"),ll=m(),c(_e.$$.fragment),this.h()},l(e){const f=Ks('[data-svelte="svelte-1phssyn"]',document.head);n=p(f,"META",{name:!0,content:!0}),f.forEach(t),R=u(e),w=p(e,"H1",{id:!0});var mt=a(w);B=i(mt,"\u5B89\u88C5"),mt.forEach(t),M=u(e),T=p(e,"P",{});var Qf=a(T);U=i(Qf,"\u5728\u4F60\u6B63\u5728\u4F7F\u7528\u7684\u4EFB\u610F\u6DF1\u5EA6\u5B66\u4E60\u6846\u67B6\u4E2D\u5B89\u88C5 \u{1F917} Diffusers \u3002"),Qf.forEach(t),W=u(e),he=p(e,"P",{});var qf=a(he);vl=i(qf,"\u{1F917} Diffusers\u5DF2\u5728Python 3.7+\u3001PyTorch 1.7.0+\u548CFlax\u4E0A\u8FDB\u884C\u4E86\u6D4B\u8BD5\u3002\u6309\u7167\u4E0B\u9762\u7684\u5B89\u88C5\u8BF4\u660E\uFF0C\u9488\u5BF9\u4F60\u6B63\u5728\u4F7F\u7528\u7684\u6DF1\u5EA6\u5B66\u4E60\u6846\u67B6\u8FDB\u884C\u5B89\u88C5\uFF1A"),qf.forEach(t),$t=u(e),k=p(e,"UL",{});var sl=a(k);de=p(sl,"LI",{});var Bf=a(de);z=p(Bf,"A",{href:!0,rel:!0});var Xf=a(z);_l=i(Xf,"PyTorch"),Xf.forEach(t),yl=i(Bf," installation instructions."),Bf.forEach(t),hl=u(sl),we=p(sl,"LI",{});var Wf=a(we);Q=p(Wf,"A",{href:!0,rel:!0});var Kf=a(Q);dl=i(Kf,"Flax"),Kf.forEach(t),wl=i(Wf," installation instructions."),Wf.forEach(t),sl.forEach(t),nt=u(e),C=p(e,"H2",{class:!0});var rl=a(C);Z=p(rl,"A",{id:!0,class:!0,href:!0});var gf=a(Z);Se=p(gf,"SPAN",{});var es=a(Se);v(q.$$.fragment,es),es.forEach(t),gf.forEach(t),Tl=u(rl),je=p(rl,"SPAN",{});var ts=a(je);Pl=i(ts,"\u4F7F\u7528pip\u5B89\u88C5"),ts.forEach(t),rl.forEach(t),Et=u(e),x=p(e,"P",{});var il=a(x);bl=i(il,"\u4F60\u9700\u8981\u5728"),X=p(il,"A",{href:!0,rel:!0});var ls=a(X);Dl=i(ls,"\u865A\u62DF\u73AF\u5883"),ls.forEach(t),Jl=i(il,"\u4E2D\u5B89\u88C5 \u{1F917} Diffusers \u3002"),il.forEach(t),ct=u(e),O=p(e,"P",{});var ol=a(O);Ul=i(ol,"\u5982\u679C\u4F60\u5BF9 Python \u865A\u62DF\u73AF\u5883\u4E0D\u719F\u6089\uFF0C\u53EF\u4EE5\u770B\u770B\u8FD9\u4E2A"),K=p(ol,"A",{href:!0,rel:!0});var fs=a(K);Il=i(fs,"\u6559\u7A0B"),fs.forEach(t),Cl=i(ol,"."),ol.forEach(t),vt=u(e),Te=p(e,"P",{});var ss=a(Te);Gl=i(ss,"\u5728\u865A\u62DF\u73AF\u5883\u4E2D\uFF0C\u4F60\u53EF\u4EE5\u8F7B\u677E\u7BA1\u7406\u4E0D\u540C\u7684\u9879\u76EE\uFF0C\u907F\u514D\u4F9D\u8D56\u9879\u4E4B\u95F4\u7684\u517C\u5BB9\u6027\u95EE\u9898\u3002"),ss.forEach(t),_t=u(e),Pe=p(e,"P",{});var rs=a(Pe);Rl=i(rs,"\u9996\u5148\uFF0C\u5728\u4F60\u7684\u9879\u76EE\u76EE\u5F55\u4E0B\u521B\u5EFA\u4E00\u4E2A\u865A\u62DF\u73AF\u5883\uFF1A"),rs.forEach(t),yt=u(e),v(g.$$.fragment,e),ht=u(e),be=p(e,"P",{});var is=a(be);Ml=i(is,"\u6FC0\u6D3B\u865A\u62DF\u73AF\u5883\uFF1A"),is.forEach(t),dt=u(e),v(ee.$$.fragment,e),wt=u(e),De=p(e,"P",{});var os=a(De);kl=i(os,"\u73B0\u5728\uFF0C\u4F60\u5C31\u53EF\u4EE5\u5B89\u88C5 \u{1F917} Diffusers\u4E86\uFF01\u4F7F\u7528\u4E0B\u8FB9\u8FD9\u4E2A\u547D\u4EE4\uFF1A"),os.forEach(t),Tt=u(e),Je=p(e,"P",{});var ps=a(Je);Fe=p(ps,"STRONG",{});var as=a(Fe);Zl=i(as,"PyTorch"),as.forEach(t),ps.forEach(t),Pt=u(e),v(te.$$.fragment,e),bt=u(e),Ue=p(e,"P",{});var ms=a(Ue);Le=p(ms,"STRONG",{});var us=a(Le);xl=i(us,"Flax"),us.forEach(t),ms.forEach(t),Dt=u(e),v(le.$$.fragment,e),Jt=u(e),fe=p(e,"H2",{id:!0});var $s=a(fe);Ol=i($s,"\u4ECE\u6E90\u4EE3\u7801\u5B89\u88C5"),$s.forEach(t),Ut=u(e),P=p(e,"P",{});var Y=a(P);Sl=i(Y,"\u5728\u4ECE\u6E90\u4EE3\u7801\u5B89\u88C5 "),Ve=p(Y,"CODE",{});var ns=a(Ve);jl=i(ns,"diffusers"),ns.forEach(t),Fl=i(Y," \u4E4B\u524D\uFF0C\u786E\u4FDD\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 "),Ae=p(Y,"CODE",{});var Es=a(Ae);Ll=i(Es,"torch"),Es.forEach(t),Vl=i(Y," \u548C "),Ne=p(Y,"CODE",{});var cs=a(Ne);Al=i(cs,"accelerate"),cs.forEach(t),Nl=i(Y,"\u3002"),Y.forEach(t),It=u(e),J=p(e,"P",{});var ye=a(J);He=p(ye,"CODE",{});var vs=a(He);Hl=i(vs,"torch"),vs.forEach(t),Yl=i(ye,"\u7684\u5B89\u88C5\u6559\u7A0B\u53EF\u4EE5\u770B "),Ye=p(ye,"CODE",{});var _s=a(Ye);Bl=i(_s,"torch"),_s.forEach(t),Wl=u(ye),se=p(ye,"A",{href:!0,rel:!0});var ys=a(se);zl=i(ys,"\u6587\u6863"),ys.forEach(t),Ql=i(ye,"."),ye.forEach(t),Ct=u(e),re=p(e,"P",{});var zf=a(re);ql=i(zf,"\u5B89\u88C5 "),Be=p(zf,"CODE",{});var hs=a(Be);Xl=i(hs,"accelerate"),hs.forEach(t),zf.forEach(t),Gt=u(e),v(ie.$$.fragment,e),Rt=u(e),Ie=p(e,"P",{});var ds=a(Ie);Kl=i(ds,"\u4ECE\u6E90\u7801\u5B89\u88C5 \u{1F917} Diffusers \u9700\u8981\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4:"),ds.forEach(t),Mt=u(e),v(oe.$$.fragment,e),kt=u(e),E=p(e,"P",{});var b=a(E);gl=i(b,"\u8FD9\u4E2A\u547D\u4EE4\u5B89\u88C5\u7684\u662F\u6700\u65B0\u7684 "),We=p(b,"CODE",{});var ws=a(We);ef=i(ws,"main"),ws.forEach(t),tf=i(b,"\u7248\u672C\uFF0C\u800C\u4E0D\u662F\u6700\u8FD1\u7684"),ze=p(b,"CODE",{});var Ts=a(ze);lf=i(Ts,"stable"),Ts.forEach(t),ff=i(b,`\u7248\u3002
`),Qe=p(b,"CODE",{});var Ps=a(Qe);sf=i(Ps,"main"),Ps.forEach(t),rf=i(b,"\u662F\u4E00\u76F4\u548C\u6700\u65B0\u8FDB\u5C55\u4FDD\u6301\u4E00\u81F4\u7684\u3002\u6BD4\u5982\uFF0C\u4E0A\u6B21\u53D1\u5E03\u7684\u6B63\u5F0F\u7248\u4E2D\u6709bug\uFF0C\u5728"),qe=p(b,"CODE",{});var bs=a(qe);of=i(bs,"main"),bs.forEach(t),pf=i(b,`\u4E2D\u53EF\u4EE5\u770B\u5230\u8FD9\u4E2Abug\u88AB\u4FEE\u590D\u4E86\uFF0C\u4F46\u662F\u65B0\u7684\u6B63\u5F0F\u7248\u6B64\u65F6\u5C1A\u672A\u63A8\u51FA\u3002
\u4F46\u662F\u8FD9\u4E5F\u610F\u5473\u7740 `),Xe=p(b,"CODE",{});var Ds=a(Xe);af=i(Ds,"main"),Ds.forEach(t),mf=i(b,"\u7248\u672C\u4E0D\u4FDD\u8BC1\u662F\u7A33\u5B9A\u7684\u3002"),b.forEach(t),Zt=u(e),S=p(e,"P",{});var pl=a(S);uf=i(pl,"\u6211\u4EEC\u52AA\u529B\u4FDD\u6301"),Ke=p(pl,"CODE",{});var Js=a(Ke);$f=i(Js,"main"),Js.forEach(t),nf=i(pl,"\u7248\u672C\u6B63\u5E38\u8FD0\u884C\uFF0C\u5927\u591A\u6570\u95EE\u9898\u90FD\u80FD\u5728\u51E0\u4E2A\u5C0F\u65F6\u6216\u4E00\u5929\u4E4B\u5185\u89E3\u51B3"),pl.forEach(t),xt=u(e),j=p(e,"P",{});var al=a(j);Ef=i(al,"\u5982\u679C\u4F60\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u53EF\u4EE5\u63D0 "),pe=p(al,"A",{href:!0,rel:!0});var Us=a(pe);cf=i(Us,"Issue"),Us.forEach(t),vf=i(al,"\uFF0C\u8FD9\u6837\u6211\u4EEC\u5C31\u80FD\u66F4\u5FEB\u4FEE\u590D\u95EE\u9898\u4E86\u3002"),al.forEach(t),Ot=u(e),ae=p(e,"H2",{id:!0});var Is=a(ae);_f=i(Is,"\u53EF\u4FEE\u6539\u5B89\u88C5"),Is.forEach(t),St=u(e),Ce=p(e,"P",{});var Cs=a(Ce);yf=i(Cs,"\u5982\u679C\u4F60\u60F3\u505A\u4EE5\u4E0B\u4E24\u4EF6\u4E8B\uFF0C\u90A3\u4F60\u53EF\u80FD\u9700\u8981\u4E00\u4E2A\u53EF\u4FEE\u6539\u4EE3\u7801\u7684\u5B89\u88C5\u65B9\u5F0F\uFF1A"),Cs.forEach(t),jt=u(e),F=p(e,"UL",{});var ml=a(F);me=p(ml,"LI",{});var ul=a(me);hf=i(ul,"\u4F7F\u7528 "),ge=p(ul,"CODE",{});var Gs=a(ge);df=i(Gs,"main"),Gs.forEach(t),wf=i(ul,"\u7248\u672C\u7684\u6E90\u4EE3\u7801\u3002"),ul.forEach(t),Tf=u(ml),et=p(ml,"LI",{});var Rs=a(et);Pf=i(Rs,"\u4E3A \u{1F917} Diffusers \u8D21\u732E\uFF0C\u9700\u8981\u6D4B\u8BD5\u4EE3\u7801\u4E2D\u7684\u53D8\u5316\u3002"),Rs.forEach(t),ml.forEach(t),Ft=u(e),Ge=p(e,"P",{});var Ms=a(Ge);bf=i(Ms,"\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\u514B\u9686\u5E76\u5B89\u88C5 \u{1F917} Diffusers:"),Ms.forEach(t),Lt=u(e),v(ue.$$.fragment,e),Vt=u(e),Re=p(e,"P",{});var ks=a(Re);tt=p(ks,"STRONG",{});var Zs=a(tt);Df=i(Zs,"PyTorch"),Zs.forEach(t),ks.forEach(t),At=u(e),v($e.$$.fragment,e),Nt=u(e),Me=p(e,"P",{});var xs=a(Me);lt=p(xs,"STRONG",{});var Os=a(lt);Jf=i(Os,"Flax"),Os.forEach(t),xs.forEach(t),Ht=u(e),v(ne.$$.fragment,e),Yt=u(e),I=p(e,"P",{});var Oe=a(I);Uf=i(Oe,`\u8FD9\u4E9B\u547D\u4EE4\u5C06\u8FDE\u63A5\u5230\u4F60\u514B\u9686\u7684\u7248\u672C\u5E93\u548C\u4F60\u7684 Python \u5E93\u8DEF\u5F84\u3002
\u73B0\u5728\uFF0C\u4E0D\u53EA\u662F\u5728\u901A\u5E38\u7684\u5E93\u8DEF\u5F84\uFF0CPython \u8FD8\u4F1A\u5728\u4F60\u514B\u9686\u7684\u6587\u4EF6\u5939\u5185\u5BFB\u627E\u5305\u3002
\u4F8B\u5982\uFF0C\u5982\u679C\u4F60\u7684 Python \u5305\u901A\u5E38\u5B89\u88C5\u5728 `),ft=p(Oe,"CODE",{});var Ss=a(ft);If=i(Ss,"~/anaconda3/envs/main/lib/python3.7/Site-packages/"),Ss.forEach(t),Cf=i(Oe,"\uFF0CPython \u4E5F\u4F1A\u641C\u7D22\u4F60\u514B\u9686\u5230\u7684\u6587\u4EF6\u5939\u3002"),st=p(Oe,"CODE",{});var js=a(st);Gf=i(js,"~/diffusers/"),js.forEach(t),Rf=i(Oe,"\u3002"),Oe.forEach(t),Bt=u(e),v(L.$$.fragment,e),Wt=u(e),ke=p(e,"P",{});var Fs=a(ke);Mf=i(Fs,"\u73B0\u5728\u4F60\u53EF\u4EE5\u7528\u4E0B\u9762\u7684\u547D\u4EE4\u8F7B\u677E\u5730\u5C06\u4F60\u514B\u9686\u7684 \u{1F917} Diffusers \u5E93\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C\u3002"),Fs.forEach(t),zt=u(e),v(Ee.$$.fragment,e),Qt=u(e),V=p(e,"P",{});var $l=a(V);kf=i($l,"\u4F60\u7684Python\u73AF\u5883\u5C06\u5728\u4E0B\u6B21\u8FD0\u884C\u65F6\u627E\u5230"),rt=p($l,"CODE",{});var Ls=a(rt);Zf=i(Ls,"main"),Ls.forEach(t),xf=i($l,"\u7248\u672C\u7684 \u{1F917} Diffusers\u3002"),$l.forEach(t),qt=u(e),G=p(e,"H2",{class:!0});var nl=a(G);A=p(nl,"A",{id:!0,class:!0,href:!0});var Vs=a(A);it=p(Vs,"SPAN",{});var As=a(it);v(ce.$$.fragment,As),As.forEach(t),Vs.forEach(t),Of=u(nl),ot=p(nl,"SPAN",{});var Ns=a(ot);Sf=i(Ns,"\u6CE8\u610F Telemetry \u65E5\u5FD7"),Ns.forEach(t),nl.forEach(t),Xt=u(e),N=p(e,"P",{});var El=a(N);jf=i(El,"\u6211\u4EEC\u7684\u5E93\u4F1A\u5728\u4F7F\u7528"),pt=p(El,"CODE",{});var Hs=a(pt);Ff=i(Hs,"from_pretrained()"),Hs.forEach(t),Lf=i(El,`\u8BF7\u6C42\u671F\u95F4\u6536\u96C6 telemetry \u4FE1\u606F\u3002\u8FD9\u4E9B\u6570\u636E\u5305\u62ECDiffusers\u548CPyTorch/Flax\u7684\u7248\u672C\uFF0C\u8BF7\u6C42\u7684\u6A21\u578B\u6216\u7BA1\u9053\u7C7B\uFF0C\u4EE5\u53CA\u9884\u8BAD\u7EC3\u68C0\u67E5\u70B9\u7684\u8DEF\u5F84\uFF08\u5982\u679C\u5B83\u88AB\u6258\u7BA1\u5728Hub\u4E0A\u7684\u8BDD\uFF09\u3002
\u8FD9\u4E9B\u4F7F\u7528\u6570\u636E\u6709\u52A9\u4E8E\u6211\u4EEC\u8C03\u8BD5\u95EE\u9898\u5E76\u786E\u5B9A\u65B0\u529F\u80FD\u7684\u5F00\u53D1\u4F18\u5148\u7EA7\u3002
Telemetry \u6570\u636E\u4EC5\u5728\u4ECE HuggingFace Hub \u4E2D\u52A0\u8F7D\u6A21\u578B\u548C\u7BA1\u9053\u65F6\u53D1\u9001\uFF0C\u800C\u4E0D\u4F1A\u5728\u672C\u5730\u4F7F\u7528\u671F\u95F4\u6536\u96C6\u3002`),El.forEach(t),Kt=u(e),H=p(e,"P",{});var cl=a(H);Vf=i(cl,`\u6211\u4EEC\u77E5\u9053\uFF0C\u5E76\u4E0D\u662F\u6BCF\u4E2A\u4EBA\u90FD\u60F3\u5206\u4EAB\u8FD9\u4E9B\u7684\u4FE1\u606F\uFF0C\u6211\u4EEC\u5C0A\u91CD\u60A8\u7684\u9690\u79C1\uFF0C
\u56E0\u6B64\u60A8\u53EF\u4EE5\u901A\u8FC7\u5728\u7EC8\u7AEF\u4E2D\u8BBE\u7F6E `),at=p(cl,"CODE",{});var Ys=a(at);Af=i(Ys,"DISABLE_TELEMETRY"),Ys.forEach(t),Nf=i(cl," \u73AF\u5883\u53D8\u91CF\u4ECE\u800C\u7981\u7528 Telemetry \u6570\u636E\u6536\u96C6\uFF1A"),cl.forEach(t),gt=u(e),Ze=p(e,"P",{});var Bs=a(Ze);Hf=i(Bs,"Linux/MacOS :"),Bs.forEach(t),el=u(e),v(ve.$$.fragment,e),tl=u(e),xe=p(e,"P",{});var Ws=a(xe);Yf=i(Ws,"Windows :"),Ws.forEach(t),ll=u(e),v(_e.$$.fragment,e),this.h()},h(){$(n,"name","hf:doc:metadata"),$(n,"content",JSON.stringify(fr)),$(w,"id",""),$(z,"href","https://pytorch.org/get-started/locally/"),$(z,"rel","nofollow"),$(Q,"href","https://flax.readthedocs.io/en/latest/"),$(Q,"rel","nofollow"),$(Z,"id","pip"),$(Z,"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"),$(Z,"href","#pip"),$(C,"class","relative group"),$(X,"href","https://docs.python.org/3/library/venv.html"),$(X,"rel","nofollow"),$(K,"href","https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/"),$(K,"rel","nofollow"),$(fe,"id",""),$(se,"href","https://pytorch.org/get-started/locally/#start-locally"),$(se,"rel","nofollow"),$(pe,"href","https://github.com/huggingface/transformers/issues"),$(pe,"rel","nofollow"),$(ae,"id",""),$(A,"id","telemetry"),$(A,"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"),$(A,"href","#telemetry"),$(G,"class","relative group")},m(e,f){l(document.head,n),s(e,R,f),s(e,w,f),l(w,B),s(e,M,f),s(e,T,f),l(T,U),s(e,W,f),s(e,he,f),l(he,vl),s(e,$t,f),s(e,k,f),l(k,de),l(de,z),l(z,_l),l(de,yl),l(k,hl),l(k,we),l(we,Q),l(Q,dl),l(we,wl),s(e,nt,f),s(e,C,f),l(C,Z),l(Z,Se),_(q,Se,null),l(C,Tl),l(C,je),l(je,Pl),s(e,Et,f),s(e,x,f),l(x,bl),l(x,X),l(X,Dl),l(x,Jl),s(e,ct,f),s(e,O,f),l(O,Ul),l(O,K),l(K,Il),l(O,Cl),s(e,vt,f),s(e,Te,f),l(Te,Gl),s(e,_t,f),s(e,Pe,f),l(Pe,Rl),s(e,yt,f),_(g,e,f),s(e,ht,f),s(e,be,f),l(be,Ml),s(e,dt,f),_(ee,e,f),s(e,wt,f),s(e,De,f),l(De,kl),s(e,Tt,f),s(e,Je,f),l(Je,Fe),l(Fe,Zl),s(e,Pt,f),_(te,e,f),s(e,bt,f),s(e,Ue,f),l(Ue,Le),l(Le,xl),s(e,Dt,f),_(le,e,f),s(e,Jt,f),s(e,fe,f),l(fe,Ol),s(e,Ut,f),s(e,P,f),l(P,Sl),l(P,Ve),l(Ve,jl),l(P,Fl),l(P,Ae),l(Ae,Ll),l(P,Vl),l(P,Ne),l(Ne,Al),l(P,Nl),s(e,It,f),s(e,J,f),l(J,He),l(He,Hl),l(J,Yl),l(J,Ye),l(Ye,Bl),l(J,Wl),l(J,se),l(se,zl),l(J,Ql),s(e,Ct,f),s(e,re,f),l(re,ql),l(re,Be),l(Be,Xl),s(e,Gt,f),_(ie,e,f),s(e,Rt,f),s(e,Ie,f),l(Ie,Kl),s(e,Mt,f),_(oe,e,f),s(e,kt,f),s(e,E,f),l(E,gl),l(E,We),l(We,ef),l(E,tf),l(E,ze),l(ze,lf),l(E,ff),l(E,Qe),l(Qe,sf),l(E,rf),l(E,qe),l(qe,of),l(E,pf),l(E,Xe),l(Xe,af),l(E,mf),s(e,Zt,f),s(e,S,f),l(S,uf),l(S,Ke),l(Ke,$f),l(S,nf),s(e,xt,f),s(e,j,f),l(j,Ef),l(j,pe),l(pe,cf),l(j,vf),s(e,Ot,f),s(e,ae,f),l(ae,_f),s(e,St,f),s(e,Ce,f),l(Ce,yf),s(e,jt,f),s(e,F,f),l(F,me),l(me,hf),l(me,ge),l(ge,df),l(me,wf),l(F,Tf),l(F,et),l(et,Pf),s(e,Ft,f),s(e,Ge,f),l(Ge,bf),s(e,Lt,f),_(ue,e,f),s(e,Vt,f),s(e,Re,f),l(Re,tt),l(tt,Df),s(e,At,f),_($e,e,f),s(e,Nt,f),s(e,Me,f),l(Me,lt),l(lt,Jf),s(e,Ht,f),_(ne,e,f),s(e,Yt,f),s(e,I,f),l(I,Uf),l(I,ft),l(ft,If),l(I,Cf),l(I,st),l(st,Gf),l(I,Rf),s(e,Bt,f),_(L,e,f),s(e,Wt,f),s(e,ke,f),l(ke,Mf),s(e,zt,f),_(Ee,e,f),s(e,Qt,f),s(e,V,f),l(V,kf),l(V,rt),l(rt,Zf),l(V,xf),s(e,qt,f),s(e,G,f),l(G,A),l(A,it),_(ce,it,null),l(G,Of),l(G,ot),l(ot,Sf),s(e,Xt,f),s(e,N,f),l(N,jf),l(N,pt),l(pt,Ff),l(N,Lf),s(e,Kt,f),s(e,H,f),l(H,Vf),l(H,at),l(at,Af),l(H,Nf),s(e,gt,f),s(e,Ze,f),l(Ze,Hf),s(e,el,f),_(ve,e,f),s(e,tl,f),s(e,xe,f),l(xe,Yf),s(e,ll,f),_(_e,e,f),fl=!0},p(e,[f]){const mt={};f&2&&(mt.$$scope={dirty:f,ctx:e}),L.$set(mt)},i(e){fl||(y(q.$$.fragment,e),y(g.$$.fragment,e),y(ee.$$.fragment,e),y(te.$$.fragment,e),y(le.$$.fragment,e),y(ie.$$.fragment,e),y(oe.$$.fragment,e),y(ue.$$.fragment,e),y($e.$$.fragment,e),y(ne.$$.fragment,e),y(L.$$.fragment,e),y(Ee.$$.fragment,e),y(ce.$$.fragment,e),y(ve.$$.fragment,e),y(_e.$$.fragment,e),fl=!0)},o(e){h(q.$$.fragment,e),h(g.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(le.$$.fragment,e),h(ie.$$.fragment,e),h(oe.$$.fragment,e),h(ue.$$.fragment,e),h($e.$$.fragment,e),h(ne.$$.fragment,e),h(L.$$.fragment,e),h(Ee.$$.fragment,e),h(ce.$$.fragment,e),h(ve.$$.fragment,e),h(_e.$$.fragment,e),fl=!1},d(e){t(n),e&&t(R),e&&t(w),e&&t(M),e&&t(T),e&&t(W),e&&t(he),e&&t($t),e&&t(k),e&&t(nt),e&&t(C),d(q),e&&t(Et),e&&t(x),e&&t(ct),e&&t(O),e&&t(vt),e&&t(Te),e&&t(_t),e&&t(Pe),e&&t(yt),d(g,e),e&&t(ht),e&&t(be),e&&t(dt),d(ee,e),e&&t(wt),e&&t(De),e&&t(Tt),e&&t(Je),e&&t(Pt),d(te,e),e&&t(bt),e&&t(Ue),e&&t(Dt),d(le,e),e&&t(Jt),e&&t(fe),e&&t(Ut),e&&t(P),e&&t(It),e&&t(J),e&&t(Ct),e&&t(re),e&&t(Gt),d(ie,e),e&&t(Rt),e&&t(Ie),e&&t(Mt),d(oe,e),e&&t(kt),e&&t(E),e&&t(Zt),e&&t(S),e&&t(xt),e&&t(j),e&&t(Ot),e&&t(ae),e&&t(St),e&&t(Ce),e&&t(jt),e&&t(F),e&&t(Ft),e&&t(Ge),e&&t(Lt),d(ue,e),e&&t(Vt),e&&t(Re),e&&t(At),d($e,e),e&&t(Nt),e&&t(Me),e&&t(Ht),d(ne,e),e&&t(Yt),e&&t(I),e&&t(Bt),d(L,e),e&&t(Wt),e&&t(ke),e&&t(zt),d(Ee,e),e&&t(Qt),e&&t(V),e&&t(qt),e&&t(G),d(ce),e&&t(Xt),e&&t(N),e&&t(Kt),e&&t(H),e&&t(gt),e&&t(Ze),e&&t(el),d(ve,e),e&&t(tl),e&&t(xe),e&&t(ll),d(_e,e)}}}const fr={local:"",sections:[{local:"pip",title:"\u4F7F\u7528pip\u5B89\u88C5"},{local:"",title:"\u4ECE\u6E90\u4EE3\u7801\u5B89\u88C5"},{local:"",title:"\u53EF\u4FEE\u6539\u5B89\u88C5"},{local:"telemetry",title:"\u6CE8\u610F Telemetry \u65E5\u5FD7"}],title:"\u5B89\u88C5"};function sr(ut){return gs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pr extends Qs{constructor(n){super();qs(this,n,sr,lr,Xs,{})}}export{pr as default,fr as metadata};
