import{S as jf,i as Ef,s as _f,e as s,k as f,t as r,w as m,M as vf,c as a,d as e,m as U,a as n,h as o,x as u,b as M,G as t,g as i,y as h,q as d,o as J,B as w,v as If}from"../../chunks/vendor-hf-doc-builder.js";import{T as za}from"../../chunks/Tip-hf-doc-builder.js";import{I as at}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as v}from"../../chunks/CodeBlock-hf-doc-builder.js";function Vf(B){let y;return{c(){y=r("\uC5B4\uB5A4 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C\uB3C4 [`torch.autocast`](https://pytorch.org/docs/stable/amp.html#torch.autocast) \uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC740 \uAC80\uC740\uC0C9 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uACE0, \uC21C\uC218\uD55C float16 \uC815\uBC00\uB3C4\uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uBCF4\uB2E4 \uD56D\uC0C1 \uB290\uB9AC\uAE30 \uB54C\uBB38\uC5D0 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.")},l(c){y=o(c,"\uC5B4\uB5A4 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C\uB3C4 [`torch.autocast`](https://pytorch.org/docs/stable/amp.html#torch.autocast) \uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC740 \uAC80\uC740\uC0C9 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uACE0, \uC21C\uC218\uD55C float16 \uC815\uBC00\uB3C4\uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uBCF4\uB2E4 \uD56D\uC0C1 \uB290\uB9AC\uAE30 \uB54C\uBB38\uC5D0 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.")},m(c,C){i(c,y,C)},d(c){c&&e(y)}}}function Zf(B){let y;return{c(){y=r(`Attention slicing\uC740 \uBAA8\uB378\uC774 \uD558\uB098 \uC774\uC0C1\uC758 \uC5B4\uD150\uC158 \uD5E4\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB294 \uD55C, \uBC30\uCE58 \uD06C\uAE30\uAC00 1\uC778 \uACBD\uC6B0\uC5D0\uB3C4 \uC720\uC6A9\uD569\uB2C8\uB2E4.
  \uD558\uB098 \uC774\uC0C1\uC758 \uC5B4\uD150\uC158 \uD5E4\uB4DC\uAC00 \uC788\uB294 \uACBD\uC6B0 *QK^T* \uC5B4\uD150\uC158 \uB9E4\uD2B8\uB9AD\uC2A4\uB294 \uC0C1\uB2F9\uD55C \uC591\uC758 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD560 \uC218 \uC788\uB294 \uAC01 \uD5E4\uB4DC\uC5D0 \uB300\uD574 \uC21C\uCC28\uC801\uC73C\uB85C \uACC4\uC0B0\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`)},l(c){y=o(c,`Attention slicing\uC740 \uBAA8\uB378\uC774 \uD558\uB098 \uC774\uC0C1\uC758 \uC5B4\uD150\uC158 \uD5E4\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB294 \uD55C, \uBC30\uCE58 \uD06C\uAE30\uAC00 1\uC778 \uACBD\uC6B0\uC5D0\uB3C4 \uC720\uC6A9\uD569\uB2C8\uB2E4.
  \uD558\uB098 \uC774\uC0C1\uC758 \uC5B4\uD150\uC158 \uD5E4\uB4DC\uAC00 \uC788\uB294 \uACBD\uC6B0 *QK^T* \uC5B4\uD150\uC158 \uB9E4\uD2B8\uB9AD\uC2A4\uB294 \uC0C1\uB2F9\uD55C \uC591\uC758 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD560 \uC218 \uC788\uB294 \uAC01 \uD5E4\uB4DC\uC5D0 \uB300\uD574 \uC21C\uCC28\uC801\uC73C\uB85C \uACC4\uC0B0\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`)},m(c,C){i(c,y,C)},d(c){c&&e(y)}}}function Bf(B){let y,c,C,al;return{c(){y=r("\uB610 \uB2E4\uB978 \uCD5C\uC801\uD654 \uBC29\uBC95\uC778 "),c=s("a"),C=r("\uBAA8\uB378 \uC624\uD504\uB85C\uB529"),al=r("\uC744 \uC0AC\uC6A9\uD558\uB294 \uAC83\uC744 \uACE0\uB824\uD558\uC2ED\uC2DC\uC624. \uC774\uB294 \uD6E8\uC52C \uBE60\uB974\uC9C0\uB9CC \uBA54\uBAA8\uB9AC \uC808\uC57D\uC774 \uD06C\uC9C0\uB294 \uC54A\uC2B5\uB2C8\uB2E4."),this.h()},l(j){y=o(j,"\uB610 \uB2E4\uB978 \uCD5C\uC801\uD654 \uBC29\uBC95\uC778 "),c=a(j,"A",{href:!0});var T=n(c);C=o(T,"\uBAA8\uB378 \uC624\uD504\uB85C\uB529"),T.forEach(e),al=o(j,"\uC744 \uC0AC\uC6A9\uD558\uB294 \uAC83\uC744 \uACE0\uB824\uD558\uC2ED\uC2DC\uC624. \uC774\uB294 \uD6E8\uC52C \uBE60\uB974\uC9C0\uB9CC \uBA54\uBAA8\uB9AC \uC808\uC57D\uC774 \uD06C\uC9C0\uB294 \uC54A\uC2B5\uB2C8\uB2E4."),this.h()},h(){M(c,"href","#model_offloading")},m(j,T){i(j,y,T),i(j,c,T),t(c,C),i(j,al,T)},d(j){j&&e(y),j&&e(c),j&&e(al)}}}function Rf(B){let y;return{c(){y=r("\uC774 \uAE30\uB2A5\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 'accelerate' \uBC84\uC804 0.17.0 \uC774\uC0C1\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.")},l(c){y=o(c,"\uC774 \uAE30\uB2A5\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 'accelerate' \uBC84\uC804 0.17.0 \uC774\uC0C1\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.")},m(c,C){i(c,y,C)},d(c){c&&e(y)}}}function Qf(B){let y,c,C,al,j,T,xa,zt,Ka,Oa,El,qa,ga,nt,La,ln,Js,pt,tn,ws,nl,xt,N,Ts,en,Kt,sn,an,Ot,nn,pn,E,W,qt,rn,on,gt,fn,Un,Lt,Mn,cn,$,le,yn,mn,te,un,hn,ee,dn,Jn,F,se,wn,Tn,ae,Cn,bn,ne,jn,En,A,pe,_n,vn,re,In,Vn,oe,Zn,Bn,k,ie,Rn,Qn,fe,Gn,Sn,Ue,Nn,Wn,X,Me,$n,Fn,ce,An,kn,ye,Xn,Cs,rt,Dn,bs,D,pl,me,_l,Yn,ue,Hn,js,vl,Il,Pn,zn,Es,Vl,he,xn,Kn,_s,Zl,vs,Y,rl,de,Bl,On,Je,qn,Is,ol,gn,Rl,Ln,lp,Vs,Ql,Zs,Gl,tp,Bs,R,ep,we,sp,ap,Te,np,pp,Rs,Sl,Qs,il,Gs,Nl,rp,Ss,ot,op,Ns,fl,Ws,Ul,ip,Ce,fp,Up,$s,Wl,Fs,it,Mp,As,H,Ml,be,$l,cp,je,yp,ks,ft,mp,Xs,Q,up,Ee,hp,dp,_e,Jp,wp,Ds,cl,Tp,ve,Cp,bp,Ys,Fl,Hs,Ut,jp,Ps,Mt,zs,P,yl,Ie,Al,Ep,Ve,_p,xs,ct,vp,Ks,ml,Ip,Ze,Vp,Zp,Os,kl,qs,yt,Bp,gs,mt,Rp,Ls,ul,la,ut,Qp,ta,Xl,ea,V,Be,Gp,Sp,Re,Np,Wp,Dl,$p,Fp,sa,ht,aa,Yl,Ap,na,Hl,dt,kp,Xp,pa,hl,Dp,Qe,Yp,Hp,ra,Jt,Pp,oa,dl,zp,Ge,xp,Kp,ia,Pl,fa,wt,Op,Ua,zl,Ma,Jl,ca,z,wl,Se,xl,qp,Ne,gp,ya,Tt,Lp,ma,Ct,lr,ua,Kl,ha,x,Tl,We,Ol,tr,$e,er,da,bt,sr,Ja,jt,ar,wa,ql,Ta,Cl,nr,Fe,pr,rr,Ca,gl,ba,K,bl,Ae,Ll,or,ke,ir,ja,G,fr,lt,Ur,Mr,tt,cr,yr,Ea,Et,mr,_a,jl,Xe,O,De,ur,hr,Ye,dr,Jr,He,wr,Tr,b,q,Pe,Cr,br,ze,jr,Er,xe,_r,vr,g,Ke,Ir,Vr,Oe,Zr,Br,qe,Rr,Qr,L,ge,Gr,Sr,Le,Nr,Wr,ls,$r,Fr,ll,ts,Ar,kr,es,Xr,Dr,ss,Yr,Hr,tl,as,Pr,zr,ns,xr,Kr,ps,Or,qr,el,rs,gr,Lr,os,lo,to,is,eo,so,sl,fs,ao,no,Us,po,ro,Ms,oo,va,_t,io,Ia,S,cs,fo,Uo,ys,Mo,co,ms,vt,yo,Va,et,Za;return _l=new at({}),Zl=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEF0b3JjaC5iYWNrZW5kcy5jdWRubi5iZW5jaG1hcmslMjAlM0QlMjBUcnVl",highlighted:`<span class="hljs-keyword">import</span> torch

torch.backends.cudnn.benchmark = <span class="hljs-literal">True</span>`}}),Bl=new at({}),Ql=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEF0b3JjaC5iYWNrZW5kcy5jdWRhLm1hdG11bC5hbGxvd190ZjMyJTIwJTNEJTIwVHJ1ZQ==",highlighted:`<span class="hljs-keyword">import</span> torch

torch.backends.cuda.matmul.allow_tf32 = <span class="hljs-literal">True</span>`}}),Sl=new v({props:{code:"cGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",highlighted:`pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    
    torch_dtype=torch.float16,
)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),il=new za({props:{warning:!0,$$slots:{default:[Vf]},$$scope:{ctx:B}}}),fl=new za({props:{$$slots:{default:[Zf]},$$scope:{ctx:B}}}),Wl=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQXBpcGUuZW5hYmxlX2F0dGVudGlvbl9zbGljaW5nKCklMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    
    torch_dtype=torch.float16,
)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
pipe.enable_attention_slicing()
image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),$l=new at({}),Fl=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQXBpcGUuZW5hYmxlX3ZhZV9zbGljaW5nKCklMEFpbWFnZXMlMjAlM0QlMjBwaXBlKCU1QnByb21wdCU1RCUyMColMjAzMikuaW1hZ2Vz",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    
    torch_dtype=torch.float16,
)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
pipe.enable_vae_slicing()
images = pipe([prompt] * <span class="hljs-number">32</span>).images`}}),Al=new at({}),kl=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFwaXBlLmVuYWJsZV9zZXF1ZW50aWFsX2NwdV9vZmZsb2FkKCklMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    
    torch_dtype=torch.float16,
)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
pipe.enable_sequential_cpu_offload()
image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),ul=new za({props:{$$slots:{default:[Bf]},$$scope:{ctx:B}}}),Xl=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFwaXBlLmVuYWJsZV9zZXF1ZW50aWFsX2NwdV9vZmZsb2FkKCklMEFwaXBlLmVuYWJsZV9hdHRlbnRpb25fc2xpY2luZygxKSUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    
    torch_dtype=torch.float16,
)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
pipe.enable_sequential_cpu_offload()
pipe.enable_attention_slicing(<span class="hljs-number">1</span>)

image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),Pl=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTIwJTIwJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,  
    torch_dtype=torch.float16,
)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
pipe.enable_model_cpu_offload()
image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),zl=new v({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoMSklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    torch_dtype=torch.float16,
)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
pipe.enable_model_cpu_offload()
pipe.enable_attention_slicing(<span class="hljs-number">1</span>)

image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),Jl=new za({props:{$$slots:{default:[Rf]},$$scope:{ctx:B}}}),xl=new at({}),Kl=new v({props:{code:"cHJpbnQocGlwZS51bmV0LmNvbnZfb3V0LnN0YXRlX2RpY3QoKSU1QiUyMndlaWdodCUyMiU1RC5zdHJpZGUoKSklMjAlMjAlMjMlMjAoMjg4MCUyQyUyMDklMkMlMjAzJTJDJTIwMSklMEFwaXBlLnVuZXQudG8obWVtb3J5X2Zvcm1hdCUzRHRvcmNoLmNoYW5uZWxzX2xhc3QpJTIwJTIwJTIzJTIwaW4tcGxhY2UlMjAlRUMlOTclQjAlRUMlODIlQjAlMEElMjMlMjAyJUVCJUIyJTg4JUVDJUE3JUI4JTIwJUVDJUIwJUE4JUVDJTlCJTkwJUVDJTk3JTkwJUVDJTg0JTlDJTIwJUVDJThBJUE0JUVEJThBJUI4JUVCJTlEJUJDJUVDJTlEJUI0JUVCJTkzJTlDJTIwMSVFQyU5RCU4NCUyMCVFQSVCMCU4MCVFQyVBNyU4MCVFQiU4QSU5NCUyMCgyODgwJTJDJTIwMSUyQyUyMDk2MCUyQyUyMDMyMCklRUIlQTElOUMlMkMlMjAlRUMlOTclQjAlRUMlODIlQjAlRUMlOUQlQjQlMjAlRUMlOUUlOTElRUIlOEYlOTklRUQlOTUlQTglRUMlOUQlODQlMjAlRUMlQTYlOUQlRUIlQUElODUlRUQlOTUlQTklRUIlOEIlODglRUIlOEIlQTQuJTBBcHJpbnQocGlwZS51bmV0LmNvbnZfb3V0LnN0YXRlX2RpY3QoKSU1QiUyMndlaWdodCUyMiU1RC5zdHJpZGUoKSk=",highlighted:`<span class="hljs-built_in">print</span>(pipe.unet.conv_out.state_dict()[<span class="hljs-string">&quot;weight&quot;</span>].stride())  <span class="hljs-comment"># (2880, 9, 3, 1)</span>
pipe.unet.to(memory_format=torch.channels_last)  <span class="hljs-comment"># in-place \uC5F0\uC0B0</span>
<span class="hljs-comment"># 2\uBC88\uC9F8 \uCC28\uC6D0\uC5D0\uC11C \uC2A4\uD2B8\uB77C\uC774\uB4DC 1\uC744 \uAC00\uC9C0\uB294 (2880, 1, 960, 320)\uB85C, \uC5F0\uC0B0\uC774 \uC791\uB3D9\uD568\uC744 \uC99D\uBA85\uD569\uB2C8\uB2E4.</span>
<span class="hljs-built_in">print</span>(pipe.unet.conv_out.state_dict()[<span class="hljs-string">&quot;weight&quot;</span>].stride())`}}),Ol=new at({}),ql=new v({props:{code:" ",highlighted:`<span class="hljs-keyword">import</span> time
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> functools

<span class="hljs-comment"># torch \uAE30\uC6B8\uAE30 \uBE44\uD65C\uC131\uD654</span>
torch.set_grad_enabled(<span class="hljs-literal">False</span>)

<span class="hljs-comment"># \uBCC0\uC218 \uC124\uC815</span>
n_experiments = <span class="hljs-number">2</span>
unet_runs_per_experiment = <span class="hljs-number">50</span>


<span class="hljs-comment"># \uC785\uB825 \uBD88\uB7EC\uC624\uAE30</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">generate_inputs</span>():
    sample = torch.randn(<span class="hljs-number">2</span>, <span class="hljs-number">4</span>, <span class="hljs-number">64</span>, <span class="hljs-number">64</span>).half().cuda()
    timestep = torch.rand(<span class="hljs-number">1</span>).half().cuda() * <span class="hljs-number">999</span>
    encoder_hidden_states = torch.randn(<span class="hljs-number">2</span>, <span class="hljs-number">77</span>, <span class="hljs-number">768</span>).half().cuda()
    <span class="hljs-keyword">return</span> sample, timestep, encoder_hidden_states


pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    torch_dtype=torch.float16,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
unet = pipe.unet
unet.<span class="hljs-built_in">eval</span>()
unet.to(memory_format=torch.channels_last)  <span class="hljs-comment"># Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD \uC0AC\uC6A9</span>
unet.forward = functools.partial(unet.forward, return_dict=<span class="hljs-literal">False</span>)  <span class="hljs-comment"># return_dict=False\uC744 \uAE30\uBCF8\uAC12\uC73C\uB85C \uC124\uC815</span>

<span class="hljs-comment"># \uC6CC\uBC0D\uC5C5</span>
<span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">3</span>):
    <span class="hljs-keyword">with</span> torch.inference_mode():
        inputs = generate_inputs()
        orig_output = unet(*inputs)

<span class="hljs-comment"># \uCD94\uC801</span>
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;tracing..&quot;</span>)
unet_traced = torch.jit.trace(unet, inputs)
unet_traced.<span class="hljs-built_in">eval</span>()
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;done tracing&quot;</span>)


<span class="hljs-comment"># \uC6CC\uBC0D\uC5C5 \uBC0F \uADF8\uB798\uD504 \uCD5C\uC801\uD654</span>
<span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">5</span>):
    <span class="hljs-keyword">with</span> torch.inference_mode():
        inputs = generate_inputs()
        orig_output = unet_traced(*inputs)


<span class="hljs-comment"># \uBCA4\uCE58\uB9C8\uD0B9</span>
<span class="hljs-keyword">with</span> torch.inference_mode():
    <span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(n_experiments):
        torch.cuda.synchronize()
        start_time = time.time()
        <span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(unet_runs_per_experiment):
            orig_output = unet_traced(*inputs)
        torch.cuda.synchronize()
        <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;unet traced inference took <span class="hljs-subst">{time.time() - start_time:<span class="hljs-number">.2</span>f}</span> seconds&quot;</span>)
    <span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(n_experiments):
        torch.cuda.synchronize()
        start_time = time.time()
        <span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(unet_runs_per_experiment):
            orig_output = unet(*inputs)
        torch.cuda.synchronize()
        <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;unet inference took <span class="hljs-subst">{time.time() - start_time:<span class="hljs-number">.2</span>f}</span> seconds&quot;</span>)

<span class="hljs-comment"># \uBAA8\uB378 \uC800\uC7A5</span>
unet_traced.save(<span class="hljs-string">&quot;unet_traced.pt&quot;</span>)`}}),gl=new v({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YWNsYXNzZXMlMjBpbXBvcnQlMjBkYXRhY2xhc3MlMEElMEElMEElNDBkYXRhY2xhc3MlMEFjbGFzcyUyMFVOZXQyRENvbmRpdGlvbk91dHB1dCUzQSUwQSUyMCUyMCUyMCUyMHNhbXBsZSUzQSUyMHRvcmNoLkZsb2F0VGVuc29yJTBBJTBBJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSkudG8oJTIyY3VkYSUyMiklMEElMEElMjMlMjBqaXR0ZWQlMjB1bmV0JTIwJUVDJTgyJUFDJUVDJTlBJUE5JTBBdW5ldF90cmFjZWQlMjAlM0QlMjB0b3JjaC5qaXQubG9hZCglMjJ1bmV0X3RyYWNlZC5wdCUyMiklMEElMEElMEElMjMlMjBwaXBlLnVuZXQlMjAlRUMlODIlQUQlRUMlQTAlOUMlMEFjbGFzcyUyMFRyYWNlZFVOZXQodG9yY2gubm4uTW9kdWxlKSUzQSUwQSUyMCUyMCUyMCUyMGRlZiUyMF9faW5pdF9fKHNlbGYpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc3VwZXIoKS5fX2luaXRfXygpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2VsZi5pbl9jaGFubmVscyUyMCUzRCUyMHBpcGUudW5ldC5pbl9jaGFubmVscyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHNlbGYuZGV2aWNlJTIwJTNEJTIwcGlwZS51bmV0LmRldmljZSUwQSUwQSUyMCUyMCUyMCUyMGRlZiUyMGZvcndhcmQoc2VsZiUyQyUyMGxhdGVudF9tb2RlbF9pbnB1dCUyQyUyMHQlMkMlMjBlbmNvZGVyX2hpZGRlbl9zdGF0ZXMpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2FtcGxlJTIwJTNEJTIwdW5ldF90cmFjZWQobGF0ZW50X21vZGVsX2lucHV0JTJDJTIwdCUyQyUyMGVuY29kZXJfaGlkZGVuX3N0YXRlcyklNUIwJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwVU5ldDJEQ29uZGl0aW9uT3V0cHV0KHNhbXBsZSUzRHNhbXBsZSklMEElMEElMEFwaXBlLnVuZXQlMjAlM0QlMjBUcmFjZWRVTmV0KCklMEElMEF3aXRoJTIwdG9yY2guaW5mZXJlbmNlX21vZGUoKSUzQSUwQSUyMCUyMCUyMCUyMGltYWdlJTIwJTNEJTIwcGlwZSglNUJwcm9tcHQlNUQlMjAqJTIwMSUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> dataclasses <span class="hljs-keyword">import</span> dataclass


<span class="hljs-meta">@dataclass</span>
<span class="hljs-keyword">class</span> <span class="hljs-title class_">UNet2DConditionOutput</span>:
    sample: torch.FloatTensor


pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    torch_dtype=torch.float16,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># jitted unet \uC0AC\uC6A9</span>
unet_traced = torch.jit.load(<span class="hljs-string">&quot;unet_traced.pt&quot;</span>)


<span class="hljs-comment"># pipe.unet \uC0AD\uC81C</span>
<span class="hljs-keyword">class</span> <span class="hljs-title class_">TracedUNet</span>(torch.nn.Module):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__init__</span>(<span class="hljs-params">self</span>):
        <span class="hljs-built_in">super</span>().__init__()
        self.in_channels = pipe.unet.in_channels
        self.device = pipe.unet.device

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, latent_model_input, t, encoder_hidden_states</span>):
        sample = unet_traced(latent_model_input, t, encoder_hidden_states)[<span class="hljs-number">0</span>]
        <span class="hljs-keyword">return</span> UNet2DConditionOutput(sample=sample)


pipe.unet = TracedUNet()

<span class="hljs-keyword">with</span> torch.inference_mode():
    image = pipe([prompt] * <span class="hljs-number">1</span>, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]`}}),Ll=new at({}),et=new v({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKS50byglMjJjdWRhJTIyKSUwQSUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKCklMEElMEF3aXRoJTIwdG9yY2guaW5mZXJlbmNlX21vZGUoKSUzQSUwQSUyMCUyMCUyMCUyMHNhbXBsZSUyMCUzRCUyMHBpcGUoJTIyYSUyMHNtYWxsJTIwY2F0JTIyKSUwQSUwQSUyMyUyMCVFQyU4NCVBMCVFRCU4MyU5RCUzQSUyMCVFQyU5RCVCNCVFQiVBNSVCQyUyMCVFQiVCOSU4NCVFRCU5OSU5QyVFQyU4NCVCMSVFRCU5OSU5NCUyMCVFRCU5NSU5OCVFQSVCOCVCMCUyMCVFQyU5QyU4NCVFRCU5NSVCNCUyMCVFQiU4QiVBNCVFQyU5RCU4QyVFQyU5RCU4NCUyMCVFQyU4MiVBQyVFQyU5QSVBOSVFRCU5NSVBMCUyMCVFQyU4OCU5OCUyMCVFQyU5RSU4OCVFQyU4QSVCNSVFQiU4QiU4OCVFQiU4QiVBNC4lMEElMjMlMjBwaXBlLmRpc2FibGVfeGZvcm1lcnNfbWVtb3J5X2VmZmljaWVudF9hdHRlbnRpb24oKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

pipe = StableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    torch_dtype=torch.float16,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.enable_xformers_memory_efficient_attention()

<span class="hljs-keyword">with</span> torch.inference_mode():
    sample = pipe(<span class="hljs-string">&quot;a small cat&quot;</span>)

<span class="hljs-comment"># \uC120\uD0DD: \uC774\uB97C \uBE44\uD65C\uC131\uD654 \uD558\uAE30 \uC704\uD574 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.</span>
<span class="hljs-comment"># pipe.disable_xformers_memory_efficient_attention()</span>`}}),{c(){y=s("meta"),c=f(),C=s("h1"),al=r("\uBA54\uBAA8\uB9AC\uC640 \uC18D\uB3C4"),j=f(),T=s("p"),xa=r("\uBA54\uBAA8\uB9AC \uB610\uB294 \uC18D\uB3C4\uC5D0 \uB300\uD574 \u{1F917} Diffusers "),zt=s("em"),Ka=r("\uCD94\uB860"),Oa=r(`\uC744 \uCD5C\uC801\uD654\uD558\uAE30 \uC704\uD55C \uBA87 \uAC00\uC9C0 \uAE30\uC220\uACFC \uC544\uC774\uB514\uC5B4\uB97C \uC81C\uC2DC\uD569\uB2C8\uB2E4.
\uC77C\uBC18\uC801\uC73C\uB85C, memory-efficient attention\uC744 \uC704\uD574 `),El=s("a"),qa=r("xFormers"),ga=r(" \uC0AC\uC6A9\uC744 \uCD94\uCC9C\uD558\uAE30 \uB54C\uBB38\uC5D0, \uCD94\uCC9C\uD558\uB294 "),nt=s("a"),La=r("\uC124\uCE58 \uBC29\uBC95"),ln=r("\uC744 \uBCF4\uACE0 \uC124\uCE58\uD574 \uBCF4\uC138\uC694."),Js=f(),pt=s("p"),tn=r("\uB2E4\uC74C \uC124\uC815\uC774 \uC131\uB2A5\uACFC \uBA54\uBAA8\uB9AC\uC5D0 \uBBF8\uCE58\uB294 \uC601\uD5A5\uC5D0 \uB300\uD574 \uC124\uBA85\uD569\uB2C8\uB2E4."),ws=f(),nl=s("table"),xt=s("thead"),N=s("tr"),Ts=s("th"),en=f(),Kt=s("th"),sn=r("\uC9C0\uC5F0\uC2DC\uAC04"),an=f(),Ot=s("th"),nn=r("\uC18D\uB3C4 \uD5A5\uC0C1"),pn=f(),E=s("tbody"),W=s("tr"),qt=s("td"),rn=r("\uBCC4\uB3C4 \uC124\uC815 \uC5C6\uC74C"),on=f(),gt=s("td"),fn=r("9.50s"),Un=f(),Lt=s("td"),Mn=r("x1"),cn=f(),$=s("tr"),le=s("td"),yn=r("cuDNN auto-tuner"),mn=f(),te=s("td"),un=r("9.37s"),hn=f(),ee=s("td"),dn=r("x1.01"),Jn=f(),F=s("tr"),se=s("td"),wn=r("fp16"),Tn=f(),ae=s("td"),Cn=r("3.61s"),bn=f(),ne=s("td"),jn=r("x2.63"),En=f(),A=s("tr"),pe=s("td"),_n=r("Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD"),vn=f(),re=s("td"),In=r("3.30s"),Vn=f(),oe=s("td"),Zn=r("x2.88"),Bn=f(),k=s("tr"),ie=s("td"),Rn=r("traced UNet"),Qn=f(),fe=s("td"),Gn=r("3.21s"),Sn=f(),Ue=s("td"),Nn=r("x2.96"),Wn=f(),X=s("tr"),Me=s("td"),$n=r("memory-efficient attention"),Fn=f(),ce=s("td"),An=r("2.63s"),kn=f(),ye=s("td"),Xn=r("x3.61"),Cs=f(),rt=s("em"),Dn=r('NVIDIA TITAN RTX\uC5D0\uC11C 50 DDIM \uC2A4\uD15D\uC758 "a photo of an astronaut riding a horse on mars" \uD504\uB86C\uD504\uD2B8\uB85C 512x512 \uD06C\uAE30\uC758 \uB2E8\uC77C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uC600\uC2B5\uB2C8\uB2E4.'),bs=f(),D=s("h2"),pl=s("a"),me=s("span"),m(_l.$$.fragment),Yn=f(),ue=s("span"),Hn=r("cuDNN auto-tuner \uD65C\uC131\uD654\uD558\uAE30"),js=f(),vl=s("p"),Il=s("a"),Pn=r("NVIDIA cuDNN"),zn=r("\uC740 \uCEE8\uBCFC\uB8E8\uC158\uC744 \uACC4\uC0B0\uD558\uB294 \uB9CE\uC740 \uC54C\uACE0\uB9AC\uC998\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4. Autotuner\uB294 \uC9E7\uC740 \uBCA4\uCE58\uB9C8\uD06C\uB97C \uC2E4\uD589\uD558\uACE0 \uC8FC\uC5B4\uC9C4 \uC785\uB825 \uD06C\uAE30\uC5D0 \uB300\uD574 \uC8FC\uC5B4\uC9C4 \uD558\uB4DC\uC6E8\uC5B4\uC5D0\uC11C \uCD5C\uACE0\uC758 \uC131\uB2A5\uC744 \uAC00\uC9C4 \uCEE4\uB110\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4."),Es=f(),Vl=s("p"),he=s("strong"),xn=r("\uCEE8\uBCFC\uB8E8\uC158 \uB124\uD2B8\uC6CC\uD06C"),Kn=r("\uB97C \uD65C\uC6A9\uD558\uACE0 \uC788\uAE30 \uB54C\uBB38\uC5D0 (\uB2E4\uB978 \uC720\uD615\uB4E4\uC740 \uD604\uC7AC \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C), \uB2E4\uC74C \uC124\uC815\uC744 \uD1B5\uD574 \uCD94\uB860 \uC804\uC5D0 cuDNN autotuner\uB97C \uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),_s=f(),m(Zl.$$.fragment),vs=f(),Y=s("h3"),rl=s("a"),de=s("span"),m(Bl.$$.fragment),On=f(),Je=s("span"),qn=r("fp32 \uB300\uC2E0 tf32 \uC0AC\uC6A9\uD558\uAE30  (Ampere \uBC0F \uC774\uD6C4 CUDA \uC7A5\uCE58\uB4E4\uC5D0\uC11C)"),Is=f(),ol=s("p"),gn=r(`Ampere \uBC0F \uC774\uD6C4 CUDA \uC7A5\uCE58\uC5D0\uC11C \uD589\uB82C\uACF1 \uBC0F \uCEE8\uBCFC\uB8E8\uC158\uC740 TensorFloat32(TF32) \uBAA8\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB354 \uBE60\uB974\uC9C0\uB9CC \uC57D\uAC04 \uB35C \uC815\uD655\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uAE30\uBCF8\uC801\uC73C\uB85C PyTorch\uB294 \uCEE8\uBCFC\uB8E8\uC158\uC5D0 \uB300\uD574 TF32 \uBAA8\uB4DC\uB97C \uD65C\uC131\uD654\uD558\uC9C0\uB9CC \uD589\uB82C \uACF1\uC148\uC740 \uD65C\uC131\uD654\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
\uB124\uD2B8\uC6CC\uD06C\uC5D0 \uC644\uC804\uD55C float32 \uC815\uBC00\uB3C4\uAC00 \uD544\uC694\uD55C \uACBD\uC6B0\uAC00 \uC544\uB2C8\uBA74 \uD589\uB82C \uACF1\uC148\uC5D0 \uB300\uD574\uC11C\uB3C4 \uC774 \uC124\uC815\uC744 \uD65C\uC131\uD654\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.
\uC774\uB294 \uC77C\uBC18\uC801\uC73C\uB85C \uBB34\uC2DC\uD560 \uC218 \uC788\uB294 \uC218\uCE58\uC758 \uC815\uD655\uB3C4 \uC190\uC2E4\uC774 \uC788\uC9C0\uB9CC, \uACC4\uC0B0 \uC18D\uB3C4\uB97C \uD06C\uAC8C \uB192\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uADF8\uAC83\uC5D0 \uB300\uD574 `),Rl=s("a"),Ln=r("\uC5EC\uAE30"),lp=r(`\uC11C \uB354 \uC77D\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uCD94\uB860\uD558\uAE30 \uC804\uC5D0 \uB2E4\uC74C\uC744 \uCD94\uAC00\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4:`),Vs=f(),m(Ql.$$.fragment),Zs=f(),Gl=s("h2"),tp=r("\uBC18\uC815\uBC00\uB3C4 \uAC00\uC911\uCE58"),Bs=f(),R=s("p"),ep=r(`\uB354 \uB9CE\uC740 GPU \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD558\uACE0 \uB354 \uBE60\uB978 \uC18D\uB3C4\uB97C \uC5BB\uAE30 \uC704\uD574 \uBAA8\uB378 \uAC00\uC911\uCE58\uB97C \uBC18\uC815\uBC00\uB3C4(half precision)\uB85C \uC9C1\uC811 \uBD88\uB7EC\uC624\uACE0 \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC5EC\uAE30\uC5D0\uB294 `),we=s("code"),sp=r("fp16"),ap=r("\uC774\uB77C\uB294 \uBE0C\uB79C\uCE58\uC5D0 \uC800\uC7A5\uB41C float16 \uBC84\uC804\uC758 \uAC00\uC911\uCE58\uB97C \uBD88\uB7EC\uC624\uACE0, \uADF8 \uB54C "),Te=s("code"),np=r("float16"),pp=r(" \uC720\uD615\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D PyTorch\uC5D0 \uC9C0\uC2DC\uD558\uB294 \uC791\uC5C5\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4."),Rs=f(),m(Sl.$$.fragment),Qs=f(),m(il.$$.fragment),Gs=f(),Nl=s("h2"),rp=r("\uCD94\uAC00 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C \uC2AC\uB77C\uC774\uC2A4 \uC5B4\uD150\uC158"),Ss=f(),ot=s("p"),op=r("\uCD94\uAC00 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD574, \uD55C \uBC88\uC5D0 \uBAA8\uB450 \uACC4\uC0B0\uD558\uB294 \uB300\uC2E0 \uB2E8\uACC4\uC801\uC73C\uB85C \uACC4\uC0B0\uC744 \uC218\uD589\uD558\uB294 \uC2AC\uB77C\uC774\uC2A4 \uBC84\uC804\uC758 \uC5B4\uD150\uC158(attention)\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ns=f(),m(fl.$$.fragment),Ws=f(),Ul=s("p"),ip=r("\uAC01 \uD5E4\uB4DC\uC5D0 \uB300\uD574 \uC21C\uCC28\uC801\uC73C\uB85C \uC5B4\uD150\uC158 \uACC4\uC0B0\uC744 \uC218\uD589\uD558\uB824\uBA74, \uB2E4\uC74C\uACFC \uAC19\uC774 \uCD94\uB860 \uC804\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),Ce=s("code"),fp=r("enable_attention_slicing()"),Up=r("\uB97C \uD638\uCD9C\uD558\uBA74 \uB429\uB2C8\uB2E4:"),$s=f(),m(Wl.$$.fragment),Fs=f(),it=s("p"),Mp=r("\uCD94\uB860 \uC2DC\uAC04\uC774 \uC57D 10% \uB290\uB824\uC9C0\uB294 \uC57D\uAC04\uC758 \uC131\uB2A5 \uC800\uD558\uAC00 \uC788\uC9C0\uB9CC \uC774 \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD558\uBA74 3.2GB \uC815\uB3C4\uC758 \uC791\uC740 VRAM\uC73C\uB85C\uB3C4 Stable Diffusion\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),As=f(),H=s("h2"),Ml=s("a"),be=s("span"),m($l.$$.fragment),cp=f(),je=s("span"),yp=r("\uB354 \uD070 \uBC30\uCE58\uB97C \uC704\uD55C sliced VAE \uB514\uCF54\uB4DC"),ks=f(),ft=s("p"),mp=r("\uC81C\uD55C\uB41C VRAM\uC5D0\uC11C \uB300\uADDC\uBAA8 \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uB514\uCF54\uB529\uD558\uAC70\uB098 32\uAC1C \uC774\uC0C1\uC758 \uC774\uBBF8\uC9C0\uAC00 \uD3EC\uD568\uB41C \uBC30\uCE58\uB97C \uD65C\uC131\uD654\uD558\uAE30 \uC704\uD574, \uBC30\uCE58\uC758 latent \uC774\uBBF8\uC9C0\uB97C \uD55C \uBC88\uC5D0 \uD558\uB098\uC529 \uB514\uCF54\uB529\uD558\uB294 \uC2AC\uB77C\uC774\uC2A4 VAE \uB514\uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Xs=f(),Q=s("p"),up=r("\uC774\uB97C "),Ee=s("code"),hp=r("enable_attention_slicing()"),dp=r(" \uB610\uB294 "),_e=s("code"),Jp=r("enable_xformers_memory_efficient_attention()"),wp=r("\uACFC \uACB0\uD569\uD558\uC5EC \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uC744 \uCD94\uAC00\uB85C \uCD5C\uC18C\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ds=f(),cl=s("p"),Tp=r("VAE \uB514\uCF54\uB4DC\uB97C \uD55C \uBC88\uC5D0 \uD558\uB098\uC529 \uC218\uD589\uD558\uB824\uBA74 \uCD94\uB860 \uC804\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),ve=s("code"),Cp=r("enable_vae_slicing()"),bp=r("\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4:"),Ys=f(),m(Fl.$$.fragment),Hs=f(),Ut=s("p"),jp=r("\uB2E4\uC911 \uC774\uBBF8\uC9C0 \uBC30\uCE58\uC5D0\uC11C VAE \uB514\uCF54\uB4DC\uAC00 \uC57D\uAC04\uC758 \uC131\uB2A5 \uD5A5\uC0C1\uC774 \uC774\uB8E8\uC5B4\uC9D1\uB2C8\uB2E4. \uB2E8\uC77C \uC774\uBBF8\uC9C0 \uBC30\uCE58\uC5D0\uC11C\uB294 \uC131\uB2A5 \uC601\uD5A5\uC740 \uC5C6\uC2B5\uB2C8\uB2E4."),Ps=f(),Mt=s("a"),zs=f(),P=s("h2"),yl=s("a"),Ie=s("span"),m(Al.$$.fragment),Ep=f(),Ve=s("span"),_p=r("\uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD574 \uAC00\uC18D \uAE30\uB2A5\uC744 \uC0AC\uC6A9\uD558\uC5EC CPU\uB85C \uC624\uD504\uB85C\uB529"),xs=f(),ct=s("p"),vp=r("\uCD94\uAC00 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD574 \uAC00\uC911\uCE58\uB97C CPU\uB85C \uC624\uD504\uB85C\uB4DC\uD558\uACE0 \uC21C\uBC29\uD5A5 \uC804\uB2EC\uC744 \uC218\uD589\uD560 \uB54C\uB9CC GPU\uB85C \uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ks=f(),ml=s("p"),Ip=r("CPU \uC624\uD504\uB85C\uB529\uC744 \uC218\uD589\uD558\uB824\uBA74 "),Ze=s("code"),Vp=r("enable_sequential_cpu_offload()"),Zp=r("\uB97C \uD638\uCD9C\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4:"),Os=f(),m(kl.$$.fragment),qs=f(),yt=s("p"),Bp=r("\uADF8\uB7EC\uBA74 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uB97C 3GB \uBBF8\uB9CC\uC73C\uB85C \uC904\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4."),gs=f(),mt=s("p"),Rp=r("\uCC38\uACE0\uB85C \uC774 \uBC29\uBC95\uC740 \uC804\uCCB4 \uBAA8\uB378\uC774 \uC544\uB2CC \uC11C\uBE0C\uBAA8\uB4C8 \uC218\uC900\uC5D0\uC11C \uC791\uB3D9\uD569\uB2C8\uB2E4. \uC774\uB294 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uB97C \uCD5C\uC18C\uD654\uD558\uB294 \uAC00\uC7A5 \uC88B\uC740 \uBC29\uBC95\uC774\uC9C0\uB9CC \uD504\uB85C\uC138\uC2A4\uC758 \uBC18\uBCF5\uC801 \uD2B9\uC131\uC73C\uB85C \uC778\uD574 \uCD94\uB860 \uC18D\uB3C4\uAC00 \uD6E8\uC52C \uB290\uB9BD\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC758 UNet \uAD6C\uC131 \uC694\uC18C\uB294 \uC5EC\uB7EC \uBC88 \uC2E4\uD589\uB429\uB2C8\uB2E4(\u2018num_inference_steps\u2019 \uB9CC\uD07C). \uB9E4\uBC88 UNet\uC758 \uC11C\uB85C \uB2E4\uB978 \uC11C\uBE0C\uBAA8\uB4C8\uC774 \uC21C\uCC28\uC801\uC73C\uB85C \uC628\uB85C\uB4DC\uB41C \uB2E4\uC74C \uD544\uC694\uC5D0 \uB530\uB77C \uC624\uD504\uB85C\uB4DC\uB418\uBBC0\uB85C \uBA54\uBAA8\uB9AC \uC774\uB3D9 \uD69F\uC218\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4."),Ls=f(),m(ul.$$.fragment),la=f(),ut=s("p"),Qp=r("\uB610\uD55C ttention slicing\uACFC \uC5F0\uACB0\uD574\uC11C \uCD5C\uC18C \uBA54\uBAA8\uB9AC(< 2GB)\uB85C\uB3C4 \uB3D9\uC791\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ta=f(),m(Xl.$$.fragment),ea=f(),V=s("p"),Be=s("strong"),Gp=r("\uCC38\uACE0"),Sp=r(": \u2018enable_sequential_cpu_offload()\u2018\uB97C \uC0AC\uC6A9\uD560 \uB54C, \uBBF8\uB9AC \uD30C\uC774\uD504\uB77C\uC778\uC744 CUDA\uB85C \uC774\uB3D9\uD558\uC9C0 "),Re=s("strong"),Np=r("\uC54A\uB294"),Wp=r(" \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4.\uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uC758 \uC774\uB4DD\uC774 \uCD5C\uC18C\uD654\uB429\uB2C8\uB2E4. \uB354 \uB9CE\uC740 \uC815\uBCF4\uB97C \uC704\uD574 "),Dl=s("a"),$p=r("\uC774 \uC774\uC288"),Fp=r("\uB97C \uBCF4\uC138\uC694."),sa=f(),ht=s("a"),aa=f(),Yl=s("h2"),Ap=r("\uBE60\uB978 \uCD94\uB860\uACFC \uBA54\uBAA8\uB9AC \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C \uBAA8\uB378 \uC624\uD504\uB85C\uB529"),na=f(),Hl=s("p"),dt=s("a"),kp=r("\uC21C\uCC28\uC801 CPU \uC624\uD504\uB85C\uB529"),Xp=r("\uC740 \uC774\uC804 \uC139\uC158\uC5D0\uC11C \uC124\uBA85\uD55C \uAC83\uCC98\uB7FC \uB9CE\uC740 \uBA54\uBAA8\uB9AC\uB97C \uBCF4\uC874\uD558\uC9C0\uB9CC \uD544\uC694\uC5D0 \uB530\uB77C \uC11C\uBE0C\uBAA8\uB4C8\uC744 GPU\uB85C \uC774\uB3D9\uD558\uACE0 \uC0C8 \uBAA8\uB4C8\uC774 \uC2E4\uD589\uB420 \uB54C \uC989\uC2DC CPU\uB85C \uBC18\uD658\uB418\uAE30 \uB54C\uBB38\uC5D0 \uCD94\uB860 \uC18D\uB3C4\uAC00 \uB290\uB824\uC9D1\uB2C8\uB2E4."),pa=f(),hl=s("p"),Dp=r("\uC804\uCCB4 \uBAA8\uB378 \uC624\uD504\uB85C\uB529\uC740 \uAC01 \uBAA8\uB378\uC758 \uAD6C\uC131 \uC694\uC18C\uC778 "),Qe=s("em"),Yp=r("modules"),Hp=r("\uC744 \uCC98\uB9AC\uD558\uB294 \uB300\uC2E0, \uC804\uCCB4 \uBAA8\uB378\uC744 GPU\uB85C \uC774\uB3D9\uD558\uB294 \uB300\uC548\uC785\uB2C8\uB2E4. \uC774\uB85C \uC778\uD574 \uCD94\uB860 \uC2DC\uAC04\uC5D0 \uBBF8\uCE58\uB294 \uC601\uD5A5\uC740 \uBBF8\uBBF8\uD558\uC9C0\uB9CC(\uD30C\uC774\uD504\uB77C\uC778\uC744 \u2018cuda\u2019\uB85C \uC774\uB3D9\uD558\uB294 \uAC83\uACFC \uBE44\uAD50\uD558\uC5EC) \uC5EC\uC804\uD788 \uC57D\uAC04\uC758 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ra=f(),Jt=s("p"),Pp=r(`\uC774 \uC2DC\uB098\uB9AC\uC624\uC5D0\uC11C\uB294 \uD30C\uC774\uD504\uB77C\uC778\uC758 \uC8FC\uC694 \uAD6C\uC131 \uC694\uC18C \uC911 \uD558\uB098\uB9CC(\uC77C\uBC18\uC801\uC73C\uB85C \uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354, unet \uBC0F vae) GPU\uC5D0 \uC788\uACE0, \uB098\uBA38\uC9C0\uB294 CPU\uC5D0\uC11C \uB300\uAE30\uD560 \uAC83\uC785\uB2C8\uB2E4.
\uC5EC\uB7EC \uBC18\uBCF5\uC744 \uC704\uD574 \uC2E4\uD589\uB418\uB294 UNet\uACFC \uAC19\uC740 \uAD6C\uC131 \uC694\uC18C\uB294 \uB354 \uC774\uC0C1 \uD544\uC694\uD558\uC9C0 \uC54A\uC744 \uB54C\uAE4C\uC9C0 GPU\uC5D0 \uB0A8\uC544 \uC788\uC2B5\uB2C8\uB2E4.`),oa=f(),dl=s("p"),zp=r("\uC774 \uAE30\uB2A5\uC740 \uC544\uB798\uC640 \uAC19\uC774 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),Ge=s("code"),xp=r("enable_model_cpu_offload()"),Kp=r("\uB97C \uD638\uCD9C\uD558\uC5EC \uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ia=f(),m(Pl.$$.fragment),fa=f(),wt=s("p"),Op=r("\uC774\uB294 \uCD94\uAC00\uC801\uC778 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C attention slicing\uACFC\uB3C4 \uD638\uD658\uB429\uB2C8\uB2E4."),Ua=f(),m(zl.$$.fragment),Ma=f(),m(Jl.$$.fragment),ca=f(),z=s("h2"),wl=s("a"),Se=s("span"),m(xl.$$.fragment),qp=f(),Ne=s("span"),gp=r("Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD \uC0AC\uC6A9\uD558\uAE30"),ya=f(),Tt=s("p"),Lp=r(`Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD\uC740 \uCC28\uC6D0 \uC21C\uC11C\uB97C \uBCF4\uC874\uD558\uB294 \uBA54\uBAA8\uB9AC\uC5D0\uC11C NCHW \uD150\uC11C \uBC30\uC5F4\uC744 \uB300\uCCB4\uD558\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4.
Channels Last \uD150\uC11C\uB294 \uCC44\uB110\uC774 \uAC00\uC7A5 \uC870\uBC00\uD55C \uCC28\uC6D0\uC774 \uB418\uB294 \uBC29\uC2DD\uC73C\uB85C \uC815\uB82C\uB429\uB2C8\uB2E4(\uC77C\uBA85 \uD53D\uC140\uB2F9 \uC774\uBBF8\uC9C0\uB97C \uC800\uC7A5).
\uD604\uC7AC \uBAA8\uB4E0 \uC5F0\uC0B0\uC790 Channels Last \uD615\uC2DD\uC744 \uC9C0\uC6D0\uD558\uB294 \uAC83\uC740 \uC544\uB2C8\uB77C \uC131\uB2A5\uC774 \uC800\uD558\uB420 \uC218 \uC788\uC73C\uBBC0\uB85C, \uC0AC\uC6A9\uD574\uBCF4\uACE0 \uBAA8\uB378\uC5D0 \uC798 \uC791\uB3D9\uD558\uB294\uC9C0 \uD655\uC778\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.`),ma=f(),Ct=s("p"),lr=r("\uC608\uB97C \uB4E4\uC5B4 \uD30C\uC774\uD504\uB77C\uC778\uC758 UNet \uBAA8\uB378\uC774 channels Last \uD615\uC2DD\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uB824\uBA74 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),ua=f(),m(Kl.$$.fragment),ha=f(),x=s("h2"),Tl=s("a"),We=s("span"),m(Ol.$$.fragment),tr=f(),$e=s("span"),er=r("\uCD94\uC801(tracing)"),da=f(),bt=s("p"),sr=r("\uCD94\uC801\uC740 \uBAA8\uB378\uC744 \uD1B5\uD574 \uC608\uC81C \uC785\uB825 \uD150\uC11C\uB97C \uD1B5\uD574 \uC2E4\uD589\uB418\uB294\uB370, \uD574\uB2F9 \uC785\uB825\uC774 \uBAA8\uB378\uC758 \uB808\uC774\uC5B4\uB97C \uD1B5\uACFC\uD560 \uB54C \uD638\uCD9C\uB418\uB294 \uC791\uC5C5\uC744 \uCEA1\uCC98\uD558\uC5EC \uC2E4\uD589 \uD30C\uC77C \uB610\uB294 \u2018ScriptFunction\u2019\uC774 \uBC18\uD658\uB418\uB3C4\uB85D \uD558\uACE0, \uC774\uB294 just-in-time \uCEF4\uD30C\uC77C\uB85C \uCD5C\uC801\uD654\uB429\uB2C8\uB2E4."),Ja=f(),jt=s("p"),ar=r("UNet \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uAE30 \uC704\uD574 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),wa=f(),m(ql.$$.fragment),Ta=f(),Cl=s("p"),nr=r("\uADF8 \uB2E4\uC74C, \uD30C\uC774\uD504\uB77C\uC778\uC758 "),Fe=s("code"),pr=r("unet"),rr=r(" \uD2B9\uC131\uC744 \uB2E4\uC74C\uACFC \uAC19\uC774 \uCD94\uC801\uB41C \uBAA8\uB378\uB85C \uBC14\uAFC0 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ca=f(),m(gl.$$.fragment),ba=f(),K=s("h2"),bl=s("a"),Ae=s("span"),m(Ll.$$.fragment),or=f(),ke=s("span"),ir=r("Memory-efficient attention"),ja=f(),G=s("p"),fr=r(`\uC5B4\uD150\uC158 \uBE14\uB85D\uC758 \uB300\uC5ED\uD3ED\uC744 \uCD5C\uC801\uD654\uD558\uB294 \uCD5C\uADFC \uC791\uC5C5\uC73C\uB85C GPU \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC774 \uD06C\uAC8C \uD5A5\uC0C1\uB418\uACE0 \uD5A5\uC0C1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
@tridao\uC758 \uAC00\uC7A5 \uCD5C\uADFC\uC758 \uD50C\uB798\uC2DC \uC5B4\uD150\uC158: `),lt=s("a"),Ur=r("code"),Mr=r(", "),tt=s("a"),cr=r("paper"),yr=r("."),Ea=f(),Et=s("p"),mr=r("\uBC30\uCE58 \uD06C\uAE30 1(\uD504\uB86C\uD504\uD2B8 1\uAC1C)\uC758 512x512 \uD06C\uAE30\uB85C \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uB54C \uBA87 \uAC00\uC9C0 Nvidia GPU\uC5D0\uC11C \uC5BB\uC740 \uC18D\uB3C4 \uD5A5\uC0C1\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4:"),_a=f(),jl=s("table"),Xe=s("thead"),O=s("tr"),De=s("th"),ur=r("GPU"),hr=f(),Ye=s("th"),dr=r("\uAE30\uC900 \uC5B4\uD150\uC158 FP16"),Jr=f(),He=s("th"),wr=r("\uBA54\uBAA8\uB9AC \uD6A8\uC728\uC801\uC778 \uC5B4\uD150\uC158 FP16"),Tr=f(),b=s("tbody"),q=s("tr"),Pe=s("td"),Cr=r("NVIDIA Tesla T4"),br=f(),ze=s("td"),jr=r("3.5it/s"),Er=f(),xe=s("td"),_r=r("5.5it/s"),vr=f(),g=s("tr"),Ke=s("td"),Ir=r("NVIDIA 3060 RTX"),Vr=f(),Oe=s("td"),Zr=r("4.6it/s"),Br=f(),qe=s("td"),Rr=r("7.8it/s"),Qr=f(),L=s("tr"),ge=s("td"),Gr=r("NVIDIA A10G"),Sr=f(),Le=s("td"),Nr=r("8.88it/s"),Wr=f(),ls=s("td"),$r=r("15.6it/s"),Fr=f(),ll=s("tr"),ts=s("td"),Ar=r("NVIDIA RTX A6000"),kr=f(),es=s("td"),Xr=r("11.7it/s"),Dr=f(),ss=s("td"),Yr=r("21.09it/s"),Hr=f(),tl=s("tr"),as=s("td"),Pr=r("NVIDIA TITAN RTX"),zr=f(),ns=s("td"),xr=r("12.51it/s"),Kr=f(),ps=s("td"),Or=r("18.22it/s"),qr=f(),el=s("tr"),rs=s("td"),gr=r("A100-SXM4-40GB"),Lr=f(),os=s("td"),lo=r("18.6it/s"),to=f(),is=s("td"),eo=r("29.it/s"),so=f(),sl=s("tr"),fs=s("td"),ao=r("A100-SXM-80GB"),no=f(),Us=s("td"),po=r("18.7it/s"),ro=f(),Ms=s("td"),oo=r("29.5it/s"),va=f(),_t=s("p"),io=r("\uC774\uB97C \uD65C\uC6A9\uD558\uB824\uBA74 \uB2E4\uC74C\uC744 \uB9CC\uC871\uD574\uC57C \uD569\uB2C8\uB2E4:"),Ia=f(),S=s("ul"),cs=s("li"),fo=r("PyTorch > 1.12"),Uo=f(),ys=s("li"),Mo=r("Cuda \uC0AC\uC6A9 \uAC00\uB2A5"),co=f(),ms=s("li"),vt=s("a"),yo=r("xformers \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC124\uCE58\uD568"),Va=f(),m(et.$$.fragment),this.h()},l(l){const p=vf('[data-svelte="svelte-1phssyn"]',document.head);y=a(p,"META",{name:!0,content:!0}),p.forEach(e),c=U(l),C=a(l,"H1",{id:!0});var us=n(C);al=o(us,"\uBA54\uBAA8\uB9AC\uC640 \uC18D\uB3C4"),us.forEach(e),j=U(l),T=a(l,"P",{});var Z=n(T);xa=o(Z,"\uBA54\uBAA8\uB9AC \uB610\uB294 \uC18D\uB3C4\uC5D0 \uB300\uD574 \u{1F917} Diffusers "),zt=a(Z,"EM",{});var hs=n(zt);Ka=o(hs,"\uCD94\uB860"),hs.forEach(e),Oa=o(Z,`\uC744 \uCD5C\uC801\uD654\uD558\uAE30 \uC704\uD55C \uBA87 \uAC00\uC9C0 \uAE30\uC220\uACFC \uC544\uC774\uB514\uC5B4\uB97C \uC81C\uC2DC\uD569\uB2C8\uB2E4.
\uC77C\uBC18\uC801\uC73C\uB85C, memory-efficient attention\uC744 \uC704\uD574 `),El=a(Z,"A",{href:!0,rel:!0});var ds=n(El);qa=o(ds,"xFormers"),ds.forEach(e),ga=o(Z," \uC0AC\uC6A9\uC744 \uCD94\uCC9C\uD558\uAE30 \uB54C\uBB38\uC5D0, \uCD94\uCC9C\uD558\uB294 "),nt=a(Z,"A",{href:!0});var Jo=n(nt);La=o(Jo,"\uC124\uCE58 \uBC29\uBC95"),Jo.forEach(e),ln=o(Z,"\uC744 \uBCF4\uACE0 \uC124\uCE58\uD574 \uBCF4\uC138\uC694."),Z.forEach(e),Js=U(l),pt=a(l,"P",{});var wo=n(pt);tn=o(wo,"\uB2E4\uC74C \uC124\uC815\uC774 \uC131\uB2A5\uACFC \uBA54\uBAA8\uB9AC\uC5D0 \uBBF8\uCE58\uB294 \uC601\uD5A5\uC5D0 \uB300\uD574 \uC124\uBA85\uD569\uB2C8\uB2E4."),wo.forEach(e),ws=U(l),nl=a(l,"TABLE",{});var Ba=n(nl);xt=a(Ba,"THEAD",{});var To=n(xt);N=a(To,"TR",{});var It=n(N);Ts=a(It,"TH",{}),n(Ts).forEach(e),en=U(It),Kt=a(It,"TH",{});var Co=n(Kt);sn=o(Co,"\uC9C0\uC5F0\uC2DC\uAC04"),Co.forEach(e),an=U(It),Ot=a(It,"TH",{});var bo=n(Ot);nn=o(bo,"\uC18D\uB3C4 \uD5A5\uC0C1"),bo.forEach(e),It.forEach(e),To.forEach(e),pn=U(Ba),E=a(Ba,"TBODY",{});var I=n(E);W=a(I,"TR",{});var Vt=n(W);qt=a(Vt,"TD",{});var jo=n(qt);rn=o(jo,"\uBCC4\uB3C4 \uC124\uC815 \uC5C6\uC74C"),jo.forEach(e),on=U(Vt),gt=a(Vt,"TD",{});var Eo=n(gt);fn=o(Eo,"9.50s"),Eo.forEach(e),Un=U(Vt),Lt=a(Vt,"TD",{});var _o=n(Lt);Mn=o(_o,"x1"),_o.forEach(e),Vt.forEach(e),cn=U(I),$=a(I,"TR",{});var Zt=n($);le=a(Zt,"TD",{});var vo=n(le);yn=o(vo,"cuDNN auto-tuner"),vo.forEach(e),mn=U(Zt),te=a(Zt,"TD",{});var Io=n(te);un=o(Io,"9.37s"),Io.forEach(e),hn=U(Zt),ee=a(Zt,"TD",{});var Vo=n(ee);dn=o(Vo,"x1.01"),Vo.forEach(e),Zt.forEach(e),Jn=U(I),F=a(I,"TR",{});var Bt=n(F);se=a(Bt,"TD",{});var Zo=n(se);wn=o(Zo,"fp16"),Zo.forEach(e),Tn=U(Bt),ae=a(Bt,"TD",{});var Bo=n(ae);Cn=o(Bo,"3.61s"),Bo.forEach(e),bn=U(Bt),ne=a(Bt,"TD",{});var Ro=n(ne);jn=o(Ro,"x2.63"),Ro.forEach(e),Bt.forEach(e),En=U(I),A=a(I,"TR",{});var Rt=n(A);pe=a(Rt,"TD",{});var Qo=n(pe);_n=o(Qo,"Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD"),Qo.forEach(e),vn=U(Rt),re=a(Rt,"TD",{});var Go=n(re);In=o(Go,"3.30s"),Go.forEach(e),Vn=U(Rt),oe=a(Rt,"TD",{});var So=n(oe);Zn=o(So,"x2.88"),So.forEach(e),Rt.forEach(e),Bn=U(I),k=a(I,"TR",{});var Qt=n(k);ie=a(Qt,"TD",{});var No=n(ie);Rn=o(No,"traced UNet"),No.forEach(e),Qn=U(Qt),fe=a(Qt,"TD",{});var Wo=n(fe);Gn=o(Wo,"3.21s"),Wo.forEach(e),Sn=U(Qt),Ue=a(Qt,"TD",{});var $o=n(Ue);Nn=o($o,"x2.96"),$o.forEach(e),Qt.forEach(e),Wn=U(I),X=a(I,"TR",{});var Gt=n(X);Me=a(Gt,"TD",{});var Fo=n(Me);$n=o(Fo,"memory-efficient attention"),Fo.forEach(e),Fn=U(Gt),ce=a(Gt,"TD",{});var Ao=n(ce);An=o(Ao,"2.63s"),Ao.forEach(e),kn=U(Gt),ye=a(Gt,"TD",{});var ko=n(ye);Xn=o(ko,"x3.61"),ko.forEach(e),Gt.forEach(e),I.forEach(e),Ba.forEach(e),Cs=U(l),rt=a(l,"EM",{});var Xo=n(rt);Dn=o(Xo,'NVIDIA TITAN RTX\uC5D0\uC11C 50 DDIM \uC2A4\uD15D\uC758 "a photo of an astronaut riding a horse on mars" \uD504\uB86C\uD504\uD2B8\uB85C 512x512 \uD06C\uAE30\uC758 \uB2E8\uC77C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uC600\uC2B5\uB2C8\uB2E4.'),Xo.forEach(e),bs=U(l),D=a(l,"H2",{class:!0});var Ra=n(D);pl=a(Ra,"A",{id:!0,class:!0,href:!0});var Do=n(pl);me=a(Do,"SPAN",{});var Yo=n(me);u(_l.$$.fragment,Yo),Yo.forEach(e),Do.forEach(e),Yn=U(Ra),ue=a(Ra,"SPAN",{});var Ho=n(ue);Hn=o(Ho,"cuDNN auto-tuner \uD65C\uC131\uD654\uD558\uAE30"),Ho.forEach(e),Ra.forEach(e),js=U(l),vl=a(l,"P",{});var mo=n(vl);Il=a(mo,"A",{href:!0,rel:!0});var Po=n(Il);Pn=o(Po,"NVIDIA cuDNN"),Po.forEach(e),zn=o(mo,"\uC740 \uCEE8\uBCFC\uB8E8\uC158\uC744 \uACC4\uC0B0\uD558\uB294 \uB9CE\uC740 \uC54C\uACE0\uB9AC\uC998\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4. Autotuner\uB294 \uC9E7\uC740 \uBCA4\uCE58\uB9C8\uD06C\uB97C \uC2E4\uD589\uD558\uACE0 \uC8FC\uC5B4\uC9C4 \uC785\uB825 \uD06C\uAE30\uC5D0 \uB300\uD574 \uC8FC\uC5B4\uC9C4 \uD558\uB4DC\uC6E8\uC5B4\uC5D0\uC11C \uCD5C\uACE0\uC758 \uC131\uB2A5\uC744 \uAC00\uC9C4 \uCEE4\uB110\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4."),mo.forEach(e),Es=U(l),Vl=a(l,"P",{});var uo=n(Vl);he=a(uo,"STRONG",{});var zo=n(he);xn=o(zo,"\uCEE8\uBCFC\uB8E8\uC158 \uB124\uD2B8\uC6CC\uD06C"),zo.forEach(e),Kn=o(uo,"\uB97C \uD65C\uC6A9\uD558\uACE0 \uC788\uAE30 \uB54C\uBB38\uC5D0 (\uB2E4\uB978 \uC720\uD615\uB4E4\uC740 \uD604\uC7AC \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C), \uB2E4\uC74C \uC124\uC815\uC744 \uD1B5\uD574 \uCD94\uB860 \uC804\uC5D0 cuDNN autotuner\uB97C \uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),uo.forEach(e),_s=U(l),u(Zl.$$.fragment,l),vs=U(l),Y=a(l,"H3",{class:!0});var Qa=n(Y);rl=a(Qa,"A",{id:!0,class:!0,href:!0});var xo=n(rl);de=a(xo,"SPAN",{});var Ko=n(de);u(Bl.$$.fragment,Ko),Ko.forEach(e),xo.forEach(e),On=U(Qa),Je=a(Qa,"SPAN",{});var Oo=n(Je);qn=o(Oo,"fp32 \uB300\uC2E0 tf32 \uC0AC\uC6A9\uD558\uAE30  (Ampere \uBC0F \uC774\uD6C4 CUDA \uC7A5\uCE58\uB4E4\uC5D0\uC11C)"),Oo.forEach(e),Qa.forEach(e),Is=U(l),ol=a(l,"P",{});var Ga=n(ol);gn=o(Ga,`Ampere \uBC0F \uC774\uD6C4 CUDA \uC7A5\uCE58\uC5D0\uC11C \uD589\uB82C\uACF1 \uBC0F \uCEE8\uBCFC\uB8E8\uC158\uC740 TensorFloat32(TF32) \uBAA8\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB354 \uBE60\uB974\uC9C0\uB9CC \uC57D\uAC04 \uB35C \uC815\uD655\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uAE30\uBCF8\uC801\uC73C\uB85C PyTorch\uB294 \uCEE8\uBCFC\uB8E8\uC158\uC5D0 \uB300\uD574 TF32 \uBAA8\uB4DC\uB97C \uD65C\uC131\uD654\uD558\uC9C0\uB9CC \uD589\uB82C \uACF1\uC148\uC740 \uD65C\uC131\uD654\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
\uB124\uD2B8\uC6CC\uD06C\uC5D0 \uC644\uC804\uD55C float32 \uC815\uBC00\uB3C4\uAC00 \uD544\uC694\uD55C \uACBD\uC6B0\uAC00 \uC544\uB2C8\uBA74 \uD589\uB82C \uACF1\uC148\uC5D0 \uB300\uD574\uC11C\uB3C4 \uC774 \uC124\uC815\uC744 \uD65C\uC131\uD654\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.
\uC774\uB294 \uC77C\uBC18\uC801\uC73C\uB85C \uBB34\uC2DC\uD560 \uC218 \uC788\uB294 \uC218\uCE58\uC758 \uC815\uD655\uB3C4 \uC190\uC2E4\uC774 \uC788\uC9C0\uB9CC, \uACC4\uC0B0 \uC18D\uB3C4\uB97C \uD06C\uAC8C \uB192\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uADF8\uAC83\uC5D0 \uB300\uD574 `),Rl=a(Ga,"A",{href:!0,rel:!0});var qo=n(Rl);Ln=o(qo,"\uC5EC\uAE30"),qo.forEach(e),lp=o(Ga,`\uC11C \uB354 \uC77D\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uCD94\uB860\uD558\uAE30 \uC804\uC5D0 \uB2E4\uC74C\uC744 \uCD94\uAC00\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4:`),Ga.forEach(e),Vs=U(l),u(Ql.$$.fragment,l),Zs=U(l),Gl=a(l,"H2",{id:!0});var go=n(Gl);tp=o(go,"\uBC18\uC815\uBC00\uB3C4 \uAC00\uC911\uCE58"),go.forEach(e),Bs=U(l),R=a(l,"P",{});var St=n(R);ep=o(St,`\uB354 \uB9CE\uC740 GPU \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD558\uACE0 \uB354 \uBE60\uB978 \uC18D\uB3C4\uB97C \uC5BB\uAE30 \uC704\uD574 \uBAA8\uB378 \uAC00\uC911\uCE58\uB97C \uBC18\uC815\uBC00\uB3C4(half precision)\uB85C \uC9C1\uC811 \uBD88\uB7EC\uC624\uACE0 \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC5EC\uAE30\uC5D0\uB294 `),we=a(St,"CODE",{});var Lo=n(we);sp=o(Lo,"fp16"),Lo.forEach(e),ap=o(St,"\uC774\uB77C\uB294 \uBE0C\uB79C\uCE58\uC5D0 \uC800\uC7A5\uB41C float16 \uBC84\uC804\uC758 \uAC00\uC911\uCE58\uB97C \uBD88\uB7EC\uC624\uACE0, \uADF8 \uB54C "),Te=a(St,"CODE",{});var li=n(Te);np=o(li,"float16"),li.forEach(e),pp=o(St," \uC720\uD615\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D PyTorch\uC5D0 \uC9C0\uC2DC\uD558\uB294 \uC791\uC5C5\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4."),St.forEach(e),Rs=U(l),u(Sl.$$.fragment,l),Qs=U(l),u(il.$$.fragment,l),Gs=U(l),Nl=a(l,"H2",{id:!0});var ti=n(Nl);rp=o(ti,"\uCD94\uAC00 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C \uC2AC\uB77C\uC774\uC2A4 \uC5B4\uD150\uC158"),ti.forEach(e),Ss=U(l),ot=a(l,"P",{});var ei=n(ot);op=o(ei,"\uCD94\uAC00 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD574, \uD55C \uBC88\uC5D0 \uBAA8\uB450 \uACC4\uC0B0\uD558\uB294 \uB300\uC2E0 \uB2E8\uACC4\uC801\uC73C\uB85C \uACC4\uC0B0\uC744 \uC218\uD589\uD558\uB294 \uC2AC\uB77C\uC774\uC2A4 \uBC84\uC804\uC758 \uC5B4\uD150\uC158(attention)\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ei.forEach(e),Ns=U(l),u(fl.$$.fragment,l),Ws=U(l),Ul=a(l,"P",{});var Sa=n(Ul);ip=o(Sa,"\uAC01 \uD5E4\uB4DC\uC5D0 \uB300\uD574 \uC21C\uCC28\uC801\uC73C\uB85C \uC5B4\uD150\uC158 \uACC4\uC0B0\uC744 \uC218\uD589\uD558\uB824\uBA74, \uB2E4\uC74C\uACFC \uAC19\uC774 \uCD94\uB860 \uC804\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),Ce=a(Sa,"CODE",{});var si=n(Ce);fp=o(si,"enable_attention_slicing()"),si.forEach(e),Up=o(Sa,"\uB97C \uD638\uCD9C\uD558\uBA74 \uB429\uB2C8\uB2E4:"),Sa.forEach(e),$s=U(l),u(Wl.$$.fragment,l),Fs=U(l),it=a(l,"P",{});var ai=n(it);Mp=o(ai,"\uCD94\uB860 \uC2DC\uAC04\uC774 \uC57D 10% \uB290\uB824\uC9C0\uB294 \uC57D\uAC04\uC758 \uC131\uB2A5 \uC800\uD558\uAC00 \uC788\uC9C0\uB9CC \uC774 \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD558\uBA74 3.2GB \uC815\uB3C4\uC758 \uC791\uC740 VRAM\uC73C\uB85C\uB3C4 Stable Diffusion\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),ai.forEach(e),As=U(l),H=a(l,"H2",{class:!0});var Na=n(H);Ml=a(Na,"A",{id:!0,class:!0,href:!0});var ni=n(Ml);be=a(ni,"SPAN",{});var pi=n(be);u($l.$$.fragment,pi),pi.forEach(e),ni.forEach(e),cp=U(Na),je=a(Na,"SPAN",{});var ri=n(je);yp=o(ri,"\uB354 \uD070 \uBC30\uCE58\uB97C \uC704\uD55C sliced VAE \uB514\uCF54\uB4DC"),ri.forEach(e),Na.forEach(e),ks=U(l),ft=a(l,"P",{});var oi=n(ft);mp=o(oi,"\uC81C\uD55C\uB41C VRAM\uC5D0\uC11C \uB300\uADDC\uBAA8 \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uB514\uCF54\uB529\uD558\uAC70\uB098 32\uAC1C \uC774\uC0C1\uC758 \uC774\uBBF8\uC9C0\uAC00 \uD3EC\uD568\uB41C \uBC30\uCE58\uB97C \uD65C\uC131\uD654\uD558\uAE30 \uC704\uD574, \uBC30\uCE58\uC758 latent \uC774\uBBF8\uC9C0\uB97C \uD55C \uBC88\uC5D0 \uD558\uB098\uC529 \uB514\uCF54\uB529\uD558\uB294 \uC2AC\uB77C\uC774\uC2A4 VAE \uB514\uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),oi.forEach(e),Xs=U(l),Q=a(l,"P",{});var Nt=n(Q);up=o(Nt,"\uC774\uB97C "),Ee=a(Nt,"CODE",{});var ii=n(Ee);hp=o(ii,"enable_attention_slicing()"),ii.forEach(e),dp=o(Nt," \uB610\uB294 "),_e=a(Nt,"CODE",{});var fi=n(_e);Jp=o(fi,"enable_xformers_memory_efficient_attention()"),fi.forEach(e),wp=o(Nt,"\uACFC \uACB0\uD569\uD558\uC5EC \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uC744 \uCD94\uAC00\uB85C \uCD5C\uC18C\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Nt.forEach(e),Ds=U(l),cl=a(l,"P",{});var Wa=n(cl);Tp=o(Wa,"VAE \uB514\uCF54\uB4DC\uB97C \uD55C \uBC88\uC5D0 \uD558\uB098\uC529 \uC218\uD589\uD558\uB824\uBA74 \uCD94\uB860 \uC804\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),ve=a(Wa,"CODE",{});var Ui=n(ve);Cp=o(Ui,"enable_vae_slicing()"),Ui.forEach(e),bp=o(Wa,"\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4:"),Wa.forEach(e),Ys=U(l),u(Fl.$$.fragment,l),Hs=U(l),Ut=a(l,"P",{});var Mi=n(Ut);jp=o(Mi,"\uB2E4\uC911 \uC774\uBBF8\uC9C0 \uBC30\uCE58\uC5D0\uC11C VAE \uB514\uCF54\uB4DC\uAC00 \uC57D\uAC04\uC758 \uC131\uB2A5 \uD5A5\uC0C1\uC774 \uC774\uB8E8\uC5B4\uC9D1\uB2C8\uB2E4. \uB2E8\uC77C \uC774\uBBF8\uC9C0 \uBC30\uCE58\uC5D0\uC11C\uB294 \uC131\uB2A5 \uC601\uD5A5\uC740 \uC5C6\uC2B5\uB2C8\uB2E4."),Mi.forEach(e),Ps=U(l),Mt=a(l,"A",{name:!0}),n(Mt).forEach(e),zs=U(l),P=a(l,"H2",{class:!0});var $a=n(P);yl=a($a,"A",{id:!0,class:!0,href:!0});var ci=n(yl);Ie=a(ci,"SPAN",{});var yi=n(Ie);u(Al.$$.fragment,yi),yi.forEach(e),ci.forEach(e),Ep=U($a),Ve=a($a,"SPAN",{});var mi=n(Ve);_p=o(mi,"\uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD574 \uAC00\uC18D \uAE30\uB2A5\uC744 \uC0AC\uC6A9\uD558\uC5EC CPU\uB85C \uC624\uD504\uB85C\uB529"),mi.forEach(e),$a.forEach(e),xs=U(l),ct=a(l,"P",{});var ui=n(ct);vp=o(ui,"\uCD94\uAC00 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD574 \uAC00\uC911\uCE58\uB97C CPU\uB85C \uC624\uD504\uB85C\uB4DC\uD558\uACE0 \uC21C\uBC29\uD5A5 \uC804\uB2EC\uC744 \uC218\uD589\uD560 \uB54C\uB9CC GPU\uB85C \uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ui.forEach(e),Ks=U(l),ml=a(l,"P",{});var Fa=n(ml);Ip=o(Fa,"CPU \uC624\uD504\uB85C\uB529\uC744 \uC218\uD589\uD558\uB824\uBA74 "),Ze=a(Fa,"CODE",{});var hi=n(Ze);Vp=o(hi,"enable_sequential_cpu_offload()"),hi.forEach(e),Zp=o(Fa,"\uB97C \uD638\uCD9C\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4:"),Fa.forEach(e),Os=U(l),u(kl.$$.fragment,l),qs=U(l),yt=a(l,"P",{});var di=n(yt);Bp=o(di,"\uADF8\uB7EC\uBA74 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uB97C 3GB \uBBF8\uB9CC\uC73C\uB85C \uC904\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4."),di.forEach(e),gs=U(l),mt=a(l,"P",{});var Ji=n(mt);Rp=o(Ji,"\uCC38\uACE0\uB85C \uC774 \uBC29\uBC95\uC740 \uC804\uCCB4 \uBAA8\uB378\uC774 \uC544\uB2CC \uC11C\uBE0C\uBAA8\uB4C8 \uC218\uC900\uC5D0\uC11C \uC791\uB3D9\uD569\uB2C8\uB2E4. \uC774\uB294 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uB97C \uCD5C\uC18C\uD654\uD558\uB294 \uAC00\uC7A5 \uC88B\uC740 \uBC29\uBC95\uC774\uC9C0\uB9CC \uD504\uB85C\uC138\uC2A4\uC758 \uBC18\uBCF5\uC801 \uD2B9\uC131\uC73C\uB85C \uC778\uD574 \uCD94\uB860 \uC18D\uB3C4\uAC00 \uD6E8\uC52C \uB290\uB9BD\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC758 UNet \uAD6C\uC131 \uC694\uC18C\uB294 \uC5EC\uB7EC \uBC88 \uC2E4\uD589\uB429\uB2C8\uB2E4(\u2018num_inference_steps\u2019 \uB9CC\uD07C). \uB9E4\uBC88 UNet\uC758 \uC11C\uB85C \uB2E4\uB978 \uC11C\uBE0C\uBAA8\uB4C8\uC774 \uC21C\uCC28\uC801\uC73C\uB85C \uC628\uB85C\uB4DC\uB41C \uB2E4\uC74C \uD544\uC694\uC5D0 \uB530\uB77C \uC624\uD504\uB85C\uB4DC\uB418\uBBC0\uB85C \uBA54\uBAA8\uB9AC \uC774\uB3D9 \uD69F\uC218\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4."),Ji.forEach(e),Ls=U(l),u(ul.$$.fragment,l),la=U(l),ut=a(l,"P",{});var wi=n(ut);Qp=o(wi,"\uB610\uD55C ttention slicing\uACFC \uC5F0\uACB0\uD574\uC11C \uCD5C\uC18C \uBA54\uBAA8\uB9AC(< 2GB)\uB85C\uB3C4 \uB3D9\uC791\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),wi.forEach(e),ta=U(l),u(Xl.$$.fragment,l),ea=U(l),V=a(l,"P",{});var st=n(V);Be=a(st,"STRONG",{});var Ti=n(Be);Gp=o(Ti,"\uCC38\uACE0"),Ti.forEach(e),Sp=o(st,": \u2018enable_sequential_cpu_offload()\u2018\uB97C \uC0AC\uC6A9\uD560 \uB54C, \uBBF8\uB9AC \uD30C\uC774\uD504\uB77C\uC778\uC744 CUDA\uB85C \uC774\uB3D9\uD558\uC9C0 "),Re=a(st,"STRONG",{});var Ci=n(Re);Np=o(Ci,"\uC54A\uB294"),Ci.forEach(e),Wp=o(st," \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4.\uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uC758 \uC774\uB4DD\uC774 \uCD5C\uC18C\uD654\uB429\uB2C8\uB2E4. \uB354 \uB9CE\uC740 \uC815\uBCF4\uB97C \uC704\uD574 "),Dl=a(st,"A",{href:!0,rel:!0});var bi=n(Dl);$p=o(bi,"\uC774 \uC774\uC288"),bi.forEach(e),Fp=o(st,"\uB97C \uBCF4\uC138\uC694."),st.forEach(e),sa=U(l),ht=a(l,"A",{name:!0}),n(ht).forEach(e),aa=U(l),Yl=a(l,"H2",{id:!0});var ji=n(Yl);Ap=o(ji,"\uBE60\uB978 \uCD94\uB860\uACFC \uBA54\uBAA8\uB9AC \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C \uBAA8\uB378 \uC624\uD504\uB85C\uB529"),ji.forEach(e),na=U(l),Hl=a(l,"P",{});var ho=n(Hl);dt=a(ho,"A",{href:!0});var Ei=n(dt);kp=o(Ei,"\uC21C\uCC28\uC801 CPU \uC624\uD504\uB85C\uB529"),Ei.forEach(e),Xp=o(ho,"\uC740 \uC774\uC804 \uC139\uC158\uC5D0\uC11C \uC124\uBA85\uD55C \uAC83\uCC98\uB7FC \uB9CE\uC740 \uBA54\uBAA8\uB9AC\uB97C \uBCF4\uC874\uD558\uC9C0\uB9CC \uD544\uC694\uC5D0 \uB530\uB77C \uC11C\uBE0C\uBAA8\uB4C8\uC744 GPU\uB85C \uC774\uB3D9\uD558\uACE0 \uC0C8 \uBAA8\uB4C8\uC774 \uC2E4\uD589\uB420 \uB54C \uC989\uC2DC CPU\uB85C \uBC18\uD658\uB418\uAE30 \uB54C\uBB38\uC5D0 \uCD94\uB860 \uC18D\uB3C4\uAC00 \uB290\uB824\uC9D1\uB2C8\uB2E4."),ho.forEach(e),pa=U(l),hl=a(l,"P",{});var Aa=n(hl);Dp=o(Aa,"\uC804\uCCB4 \uBAA8\uB378 \uC624\uD504\uB85C\uB529\uC740 \uAC01 \uBAA8\uB378\uC758 \uAD6C\uC131 \uC694\uC18C\uC778 "),Qe=a(Aa,"EM",{});var _i=n(Qe);Yp=o(_i,"modules"),_i.forEach(e),Hp=o(Aa,"\uC744 \uCC98\uB9AC\uD558\uB294 \uB300\uC2E0, \uC804\uCCB4 \uBAA8\uB378\uC744 GPU\uB85C \uC774\uB3D9\uD558\uB294 \uB300\uC548\uC785\uB2C8\uB2E4. \uC774\uB85C \uC778\uD574 \uCD94\uB860 \uC2DC\uAC04\uC5D0 \uBBF8\uCE58\uB294 \uC601\uD5A5\uC740 \uBBF8\uBBF8\uD558\uC9C0\uB9CC(\uD30C\uC774\uD504\uB77C\uC778\uC744 \u2018cuda\u2019\uB85C \uC774\uB3D9\uD558\uB294 \uAC83\uACFC \uBE44\uAD50\uD558\uC5EC) \uC5EC\uC804\uD788 \uC57D\uAC04\uC758 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Aa.forEach(e),ra=U(l),Jt=a(l,"P",{});var vi=n(Jt);Pp=o(vi,`\uC774 \uC2DC\uB098\uB9AC\uC624\uC5D0\uC11C\uB294 \uD30C\uC774\uD504\uB77C\uC778\uC758 \uC8FC\uC694 \uAD6C\uC131 \uC694\uC18C \uC911 \uD558\uB098\uB9CC(\uC77C\uBC18\uC801\uC73C\uB85C \uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354, unet \uBC0F vae) GPU\uC5D0 \uC788\uACE0, \uB098\uBA38\uC9C0\uB294 CPU\uC5D0\uC11C \uB300\uAE30\uD560 \uAC83\uC785\uB2C8\uB2E4.
\uC5EC\uB7EC \uBC18\uBCF5\uC744 \uC704\uD574 \uC2E4\uD589\uB418\uB294 UNet\uACFC \uAC19\uC740 \uAD6C\uC131 \uC694\uC18C\uB294 \uB354 \uC774\uC0C1 \uD544\uC694\uD558\uC9C0 \uC54A\uC744 \uB54C\uAE4C\uC9C0 GPU\uC5D0 \uB0A8\uC544 \uC788\uC2B5\uB2C8\uB2E4.`),vi.forEach(e),oa=U(l),dl=a(l,"P",{});var ka=n(dl);zp=o(ka,"\uC774 \uAE30\uB2A5\uC740 \uC544\uB798\uC640 \uAC19\uC774 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),Ge=a(ka,"CODE",{});var Ii=n(Ge);xp=o(Ii,"enable_model_cpu_offload()"),Ii.forEach(e),Kp=o(ka,"\uB97C \uD638\uCD9C\uD558\uC5EC \uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ka.forEach(e),ia=U(l),u(Pl.$$.fragment,l),fa=U(l),wt=a(l,"P",{});var Vi=n(wt);Op=o(Vi,"\uC774\uB294 \uCD94\uAC00\uC801\uC778 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C attention slicing\uACFC\uB3C4 \uD638\uD658\uB429\uB2C8\uB2E4."),Vi.forEach(e),Ua=U(l),u(zl.$$.fragment,l),Ma=U(l),u(Jl.$$.fragment,l),ca=U(l),z=a(l,"H2",{class:!0});var Xa=n(z);wl=a(Xa,"A",{id:!0,class:!0,href:!0});var Zi=n(wl);Se=a(Zi,"SPAN",{});var Bi=n(Se);u(xl.$$.fragment,Bi),Bi.forEach(e),Zi.forEach(e),qp=U(Xa),Ne=a(Xa,"SPAN",{});var Ri=n(Ne);gp=o(Ri,"Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD \uC0AC\uC6A9\uD558\uAE30"),Ri.forEach(e),Xa.forEach(e),ya=U(l),Tt=a(l,"P",{});var Qi=n(Tt);Lp=o(Qi,`Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD\uC740 \uCC28\uC6D0 \uC21C\uC11C\uB97C \uBCF4\uC874\uD558\uB294 \uBA54\uBAA8\uB9AC\uC5D0\uC11C NCHW \uD150\uC11C \uBC30\uC5F4\uC744 \uB300\uCCB4\uD558\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4.
Channels Last \uD150\uC11C\uB294 \uCC44\uB110\uC774 \uAC00\uC7A5 \uC870\uBC00\uD55C \uCC28\uC6D0\uC774 \uB418\uB294 \uBC29\uC2DD\uC73C\uB85C \uC815\uB82C\uB429\uB2C8\uB2E4(\uC77C\uBA85 \uD53D\uC140\uB2F9 \uC774\uBBF8\uC9C0\uB97C \uC800\uC7A5).
\uD604\uC7AC \uBAA8\uB4E0 \uC5F0\uC0B0\uC790 Channels Last \uD615\uC2DD\uC744 \uC9C0\uC6D0\uD558\uB294 \uAC83\uC740 \uC544\uB2C8\uB77C \uC131\uB2A5\uC774 \uC800\uD558\uB420 \uC218 \uC788\uC73C\uBBC0\uB85C, \uC0AC\uC6A9\uD574\uBCF4\uACE0 \uBAA8\uB378\uC5D0 \uC798 \uC791\uB3D9\uD558\uB294\uC9C0 \uD655\uC778\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.`),Qi.forEach(e),ma=U(l),Ct=a(l,"P",{});var Gi=n(Ct);lr=o(Gi,"\uC608\uB97C \uB4E4\uC5B4 \uD30C\uC774\uD504\uB77C\uC778\uC758 UNet \uBAA8\uB378\uC774 channels Last \uD615\uC2DD\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uB824\uBA74 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Gi.forEach(e),ua=U(l),u(Kl.$$.fragment,l),ha=U(l),x=a(l,"H2",{class:!0});var Da=n(x);Tl=a(Da,"A",{id:!0,class:!0,href:!0});var Si=n(Tl);We=a(Si,"SPAN",{});var Ni=n(We);u(Ol.$$.fragment,Ni),Ni.forEach(e),Si.forEach(e),tr=U(Da),$e=a(Da,"SPAN",{});var Wi=n($e);er=o(Wi,"\uCD94\uC801(tracing)"),Wi.forEach(e),Da.forEach(e),da=U(l),bt=a(l,"P",{});var $i=n(bt);sr=o($i,"\uCD94\uC801\uC740 \uBAA8\uB378\uC744 \uD1B5\uD574 \uC608\uC81C \uC785\uB825 \uD150\uC11C\uB97C \uD1B5\uD574 \uC2E4\uD589\uB418\uB294\uB370, \uD574\uB2F9 \uC785\uB825\uC774 \uBAA8\uB378\uC758 \uB808\uC774\uC5B4\uB97C \uD1B5\uACFC\uD560 \uB54C \uD638\uCD9C\uB418\uB294 \uC791\uC5C5\uC744 \uCEA1\uCC98\uD558\uC5EC \uC2E4\uD589 \uD30C\uC77C \uB610\uB294 \u2018ScriptFunction\u2019\uC774 \uBC18\uD658\uB418\uB3C4\uB85D \uD558\uACE0, \uC774\uB294 just-in-time \uCEF4\uD30C\uC77C\uB85C \uCD5C\uC801\uD654\uB429\uB2C8\uB2E4."),$i.forEach(e),Ja=U(l),jt=a(l,"P",{});var Fi=n(jt);ar=o(Fi,"UNet \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uAE30 \uC704\uD574 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Fi.forEach(e),wa=U(l),u(ql.$$.fragment,l),Ta=U(l),Cl=a(l,"P",{});var Ya=n(Cl);nr=o(Ya,"\uADF8 \uB2E4\uC74C, \uD30C\uC774\uD504\uB77C\uC778\uC758 "),Fe=a(Ya,"CODE",{});var Ai=n(Fe);pr=o(Ai,"unet"),Ai.forEach(e),rr=o(Ya," \uD2B9\uC131\uC744 \uB2E4\uC74C\uACFC \uAC19\uC774 \uCD94\uC801\uB41C \uBAA8\uB378\uB85C \uBC14\uAFC0 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ya.forEach(e),Ca=U(l),u(gl.$$.fragment,l),ba=U(l),K=a(l,"H2",{class:!0});var Ha=n(K);bl=a(Ha,"A",{id:!0,class:!0,href:!0});var ki=n(bl);Ae=a(ki,"SPAN",{});var Xi=n(Ae);u(Ll.$$.fragment,Xi),Xi.forEach(e),ki.forEach(e),or=U(Ha),ke=a(Ha,"SPAN",{});var Di=n(ke);ir=o(Di,"Memory-efficient attention"),Di.forEach(e),Ha.forEach(e),ja=U(l),G=a(l,"P",{});var Wt=n(G);fr=o(Wt,`\uC5B4\uD150\uC158 \uBE14\uB85D\uC758 \uB300\uC5ED\uD3ED\uC744 \uCD5C\uC801\uD654\uD558\uB294 \uCD5C\uADFC \uC791\uC5C5\uC73C\uB85C GPU \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC774 \uD06C\uAC8C \uD5A5\uC0C1\uB418\uACE0 \uD5A5\uC0C1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
@tridao\uC758 \uAC00\uC7A5 \uCD5C\uADFC\uC758 \uD50C\uB798\uC2DC \uC5B4\uD150\uC158: `),lt=a(Wt,"A",{href:!0,rel:!0});var Yi=n(lt);Ur=o(Yi,"code"),Yi.forEach(e),Mr=o(Wt,", "),tt=a(Wt,"A",{href:!0,rel:!0});var Hi=n(tt);cr=o(Hi,"paper"),Hi.forEach(e),yr=o(Wt,"."),Wt.forEach(e),Ea=U(l),Et=a(l,"P",{});var Pi=n(Et);mr=o(Pi,"\uBC30\uCE58 \uD06C\uAE30 1(\uD504\uB86C\uD504\uD2B8 1\uAC1C)\uC758 512x512 \uD06C\uAE30\uB85C \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uB54C \uBA87 \uAC00\uC9C0 Nvidia GPU\uC5D0\uC11C \uC5BB\uC740 \uC18D\uB3C4 \uD5A5\uC0C1\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4:"),Pi.forEach(e),_a=U(l),jl=a(l,"TABLE",{});var Pa=n(jl);Xe=a(Pa,"THEAD",{});var zi=n(Xe);O=a(zi,"TR",{});var $t=n(O);De=a($t,"TH",{});var xi=n(De);ur=o(xi,"GPU"),xi.forEach(e),hr=U($t),Ye=a($t,"TH",{});var Ki=n(Ye);dr=o(Ki,"\uAE30\uC900 \uC5B4\uD150\uC158 FP16"),Ki.forEach(e),Jr=U($t),He=a($t,"TH",{});var Oi=n(He);wr=o(Oi,"\uBA54\uBAA8\uB9AC \uD6A8\uC728\uC801\uC778 \uC5B4\uD150\uC158 FP16"),Oi.forEach(e),$t.forEach(e),zi.forEach(e),Tr=U(Pa),b=a(Pa,"TBODY",{});var _=n(b);q=a(_,"TR",{});var Ft=n(q);Pe=a(Ft,"TD",{});var qi=n(Pe);Cr=o(qi,"NVIDIA Tesla T4"),qi.forEach(e),br=U(Ft),ze=a(Ft,"TD",{});var gi=n(ze);jr=o(gi,"3.5it/s"),gi.forEach(e),Er=U(Ft),xe=a(Ft,"TD",{});var Li=n(xe);_r=o(Li,"5.5it/s"),Li.forEach(e),Ft.forEach(e),vr=U(_),g=a(_,"TR",{});var At=n(g);Ke=a(At,"TD",{});var lf=n(Ke);Ir=o(lf,"NVIDIA 3060 RTX"),lf.forEach(e),Vr=U(At),Oe=a(At,"TD",{});var tf=n(Oe);Zr=o(tf,"4.6it/s"),tf.forEach(e),Br=U(At),qe=a(At,"TD",{});var ef=n(qe);Rr=o(ef,"7.8it/s"),ef.forEach(e),At.forEach(e),Qr=U(_),L=a(_,"TR",{});var kt=n(L);ge=a(kt,"TD",{});var sf=n(ge);Gr=o(sf,"NVIDIA A10G"),sf.forEach(e),Sr=U(kt),Le=a(kt,"TD",{});var af=n(Le);Nr=o(af,"8.88it/s"),af.forEach(e),Wr=U(kt),ls=a(kt,"TD",{});var nf=n(ls);$r=o(nf,"15.6it/s"),nf.forEach(e),kt.forEach(e),Fr=U(_),ll=a(_,"TR",{});var Xt=n(ll);ts=a(Xt,"TD",{});var pf=n(ts);Ar=o(pf,"NVIDIA RTX A6000"),pf.forEach(e),kr=U(Xt),es=a(Xt,"TD",{});var rf=n(es);Xr=o(rf,"11.7it/s"),rf.forEach(e),Dr=U(Xt),ss=a(Xt,"TD",{});var of=n(ss);Yr=o(of,"21.09it/s"),of.forEach(e),Xt.forEach(e),Hr=U(_),tl=a(_,"TR",{});var Dt=n(tl);as=a(Dt,"TD",{});var ff=n(as);Pr=o(ff,"NVIDIA TITAN RTX"),ff.forEach(e),zr=U(Dt),ns=a(Dt,"TD",{});var Uf=n(ns);xr=o(Uf,"12.51it/s"),Uf.forEach(e),Kr=U(Dt),ps=a(Dt,"TD",{});var Mf=n(ps);Or=o(Mf,"18.22it/s"),Mf.forEach(e),Dt.forEach(e),qr=U(_),el=a(_,"TR",{});var Yt=n(el);rs=a(Yt,"TD",{});var cf=n(rs);gr=o(cf,"A100-SXM4-40GB"),cf.forEach(e),Lr=U(Yt),os=a(Yt,"TD",{});var yf=n(os);lo=o(yf,"18.6it/s"),yf.forEach(e),to=U(Yt),is=a(Yt,"TD",{});var mf=n(is);eo=o(mf,"29.it/s"),mf.forEach(e),Yt.forEach(e),so=U(_),sl=a(_,"TR",{});var Ht=n(sl);fs=a(Ht,"TD",{});var uf=n(fs);ao=o(uf,"A100-SXM-80GB"),uf.forEach(e),no=U(Ht),Us=a(Ht,"TD",{});var hf=n(Us);po=o(hf,"18.7it/s"),hf.forEach(e),ro=U(Ht),Ms=a(Ht,"TD",{});var df=n(Ms);oo=o(df,"29.5it/s"),df.forEach(e),Ht.forEach(e),_.forEach(e),Pa.forEach(e),va=U(l),_t=a(l,"P",{});var Jf=n(_t);io=o(Jf,"\uC774\uB97C \uD65C\uC6A9\uD558\uB824\uBA74 \uB2E4\uC74C\uC744 \uB9CC\uC871\uD574\uC57C \uD569\uB2C8\uB2E4:"),Jf.forEach(e),Ia=U(l),S=a(l,"UL",{});var Pt=n(S);cs=a(Pt,"LI",{});var wf=n(cs);fo=o(wf,"PyTorch > 1.12"),wf.forEach(e),Uo=U(Pt),ys=a(Pt,"LI",{});var Tf=n(ys);Mo=o(Tf,"Cuda \uC0AC\uC6A9 \uAC00\uB2A5"),Tf.forEach(e),co=U(Pt),ms=a(Pt,"LI",{});var Cf=n(ms);vt=a(Cf,"A",{href:!0});var bf=n(vt);yo=o(bf,"xformers \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC124\uCE58\uD568"),bf.forEach(e),Cf.forEach(e),Pt.forEach(e),Va=U(l),u(et.$$.fragment,l),this.h()},h(){M(y,"name","hf:doc:metadata"),M(y,"content",JSON.stringify(Gf)),M(C,"id",""),M(El,"href","https://github.com/facebookresearch/xformers"),M(El,"rel","nofollow"),M(nt,"href","xformers"),M(pl,"id","cudnn-autotuner"),M(pl,"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"),M(pl,"href","#cudnn-autotuner"),M(D,"class","relative group"),M(Il,"href","https://developer.nvidia.com/cudnn"),M(Il,"rel","nofollow"),M(rl,"id","fp32-tf32-ampere-cuda"),M(rl,"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"),M(rl,"href","#fp32-tf32-ampere-cuda"),M(Y,"class","relative group"),M(Rl,"href","https://huggingface.co/docs/transformers/v4.18.0/en/performance#tf32"),M(Rl,"rel","nofollow"),M(Gl,"id",""),M(Nl,"id",""),M(Ml,"id","sliced-vae"),M(Ml,"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"),M(Ml,"href","#sliced-vae"),M(H,"class","relative group"),M(Mt,"name","sequential_offloading"),M(yl,"id","cpu"),M(yl,"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"),M(yl,"href","#cpu"),M(P,"class","relative group"),M(Dl,"href","https://github.com/huggingface/diffusers/issues/1934"),M(Dl,"rel","nofollow"),M(ht,"name","model_offloading"),M(Yl,"id",""),M(dt,"href","#sequential_offloading"),M(wl,"id","channels-last"),M(wl,"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"),M(wl,"href","#channels-last"),M(z,"class","relative group"),M(Tl,"id","tracing"),M(Tl,"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"),M(Tl,"href","#tracing"),M(x,"class","relative group"),M(bl,"id","memoryefficient-attention"),M(bl,"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"),M(bl,"href","#memoryefficient-attention"),M(K,"class","relative group"),M(lt,"href","https://github.com/HazyResearch/flash-attention"),M(lt,"rel","nofollow"),M(tt,"href","https://arxiv.org/pdf/2205.14135.pdf"),M(tt,"rel","nofollow"),M(vt,"href","xformers")},m(l,p){t(document.head,y),i(l,c,p),i(l,C,p),t(C,al),i(l,j,p),i(l,T,p),t(T,xa),t(T,zt),t(zt,Ka),t(T,Oa),t(T,El),t(El,qa),t(T,ga),t(T,nt),t(nt,La),t(T,ln),i(l,Js,p),i(l,pt,p),t(pt,tn),i(l,ws,p),i(l,nl,p),t(nl,xt),t(xt,N),t(N,Ts),t(N,en),t(N,Kt),t(Kt,sn),t(N,an),t(N,Ot),t(Ot,nn),t(nl,pn),t(nl,E),t(E,W),t(W,qt),t(qt,rn),t(W,on),t(W,gt),t(gt,fn),t(W,Un),t(W,Lt),t(Lt,Mn),t(E,cn),t(E,$),t($,le),t(le,yn),t($,mn),t($,te),t(te,un),t($,hn),t($,ee),t(ee,dn),t(E,Jn),t(E,F),t(F,se),t(se,wn),t(F,Tn),t(F,ae),t(ae,Cn),t(F,bn),t(F,ne),t(ne,jn),t(E,En),t(E,A),t(A,pe),t(pe,_n),t(A,vn),t(A,re),t(re,In),t(A,Vn),t(A,oe),t(oe,Zn),t(E,Bn),t(E,k),t(k,ie),t(ie,Rn),t(k,Qn),t(k,fe),t(fe,Gn),t(k,Sn),t(k,Ue),t(Ue,Nn),t(E,Wn),t(E,X),t(X,Me),t(Me,$n),t(X,Fn),t(X,ce),t(ce,An),t(X,kn),t(X,ye),t(ye,Xn),i(l,Cs,p),i(l,rt,p),t(rt,Dn),i(l,bs,p),i(l,D,p),t(D,pl),t(pl,me),h(_l,me,null),t(D,Yn),t(D,ue),t(ue,Hn),i(l,js,p),i(l,vl,p),t(vl,Il),t(Il,Pn),t(vl,zn),i(l,Es,p),i(l,Vl,p),t(Vl,he),t(he,xn),t(Vl,Kn),i(l,_s,p),h(Zl,l,p),i(l,vs,p),i(l,Y,p),t(Y,rl),t(rl,de),h(Bl,de,null),t(Y,On),t(Y,Je),t(Je,qn),i(l,Is,p),i(l,ol,p),t(ol,gn),t(ol,Rl),t(Rl,Ln),t(ol,lp),i(l,Vs,p),h(Ql,l,p),i(l,Zs,p),i(l,Gl,p),t(Gl,tp),i(l,Bs,p),i(l,R,p),t(R,ep),t(R,we),t(we,sp),t(R,ap),t(R,Te),t(Te,np),t(R,pp),i(l,Rs,p),h(Sl,l,p),i(l,Qs,p),h(il,l,p),i(l,Gs,p),i(l,Nl,p),t(Nl,rp),i(l,Ss,p),i(l,ot,p),t(ot,op),i(l,Ns,p),h(fl,l,p),i(l,Ws,p),i(l,Ul,p),t(Ul,ip),t(Ul,Ce),t(Ce,fp),t(Ul,Up),i(l,$s,p),h(Wl,l,p),i(l,Fs,p),i(l,it,p),t(it,Mp),i(l,As,p),i(l,H,p),t(H,Ml),t(Ml,be),h($l,be,null),t(H,cp),t(H,je),t(je,yp),i(l,ks,p),i(l,ft,p),t(ft,mp),i(l,Xs,p),i(l,Q,p),t(Q,up),t(Q,Ee),t(Ee,hp),t(Q,dp),t(Q,_e),t(_e,Jp),t(Q,wp),i(l,Ds,p),i(l,cl,p),t(cl,Tp),t(cl,ve),t(ve,Cp),t(cl,bp),i(l,Ys,p),h(Fl,l,p),i(l,Hs,p),i(l,Ut,p),t(Ut,jp),i(l,Ps,p),i(l,Mt,p),i(l,zs,p),i(l,P,p),t(P,yl),t(yl,Ie),h(Al,Ie,null),t(P,Ep),t(P,Ve),t(Ve,_p),i(l,xs,p),i(l,ct,p),t(ct,vp),i(l,Ks,p),i(l,ml,p),t(ml,Ip),t(ml,Ze),t(Ze,Vp),t(ml,Zp),i(l,Os,p),h(kl,l,p),i(l,qs,p),i(l,yt,p),t(yt,Bp),i(l,gs,p),i(l,mt,p),t(mt,Rp),i(l,Ls,p),h(ul,l,p),i(l,la,p),i(l,ut,p),t(ut,Qp),i(l,ta,p),h(Xl,l,p),i(l,ea,p),i(l,V,p),t(V,Be),t(Be,Gp),t(V,Sp),t(V,Re),t(Re,Np),t(V,Wp),t(V,Dl),t(Dl,$p),t(V,Fp),i(l,sa,p),i(l,ht,p),i(l,aa,p),i(l,Yl,p),t(Yl,Ap),i(l,na,p),i(l,Hl,p),t(Hl,dt),t(dt,kp),t(Hl,Xp),i(l,pa,p),i(l,hl,p),t(hl,Dp),t(hl,Qe),t(Qe,Yp),t(hl,Hp),i(l,ra,p),i(l,Jt,p),t(Jt,Pp),i(l,oa,p),i(l,dl,p),t(dl,zp),t(dl,Ge),t(Ge,xp),t(dl,Kp),i(l,ia,p),h(Pl,l,p),i(l,fa,p),i(l,wt,p),t(wt,Op),i(l,Ua,p),h(zl,l,p),i(l,Ma,p),h(Jl,l,p),i(l,ca,p),i(l,z,p),t(z,wl),t(wl,Se),h(xl,Se,null),t(z,qp),t(z,Ne),t(Ne,gp),i(l,ya,p),i(l,Tt,p),t(Tt,Lp),i(l,ma,p),i(l,Ct,p),t(Ct,lr),i(l,ua,p),h(Kl,l,p),i(l,ha,p),i(l,x,p),t(x,Tl),t(Tl,We),h(Ol,We,null),t(x,tr),t(x,$e),t($e,er),i(l,da,p),i(l,bt,p),t(bt,sr),i(l,Ja,p),i(l,jt,p),t(jt,ar),i(l,wa,p),h(ql,l,p),i(l,Ta,p),i(l,Cl,p),t(Cl,nr),t(Cl,Fe),t(Fe,pr),t(Cl,rr),i(l,Ca,p),h(gl,l,p),i(l,ba,p),i(l,K,p),t(K,bl),t(bl,Ae),h(Ll,Ae,null),t(K,or),t(K,ke),t(ke,ir),i(l,ja,p),i(l,G,p),t(G,fr),t(G,lt),t(lt,Ur),t(G,Mr),t(G,tt),t(tt,cr),t(G,yr),i(l,Ea,p),i(l,Et,p),t(Et,mr),i(l,_a,p),i(l,jl,p),t(jl,Xe),t(Xe,O),t(O,De),t(De,ur),t(O,hr),t(O,Ye),t(Ye,dr),t(O,Jr),t(O,He),t(He,wr),t(jl,Tr),t(jl,b),t(b,q),t(q,Pe),t(Pe,Cr),t(q,br),t(q,ze),t(ze,jr),t(q,Er),t(q,xe),t(xe,_r),t(b,vr),t(b,g),t(g,Ke),t(Ke,Ir),t(g,Vr),t(g,Oe),t(Oe,Zr),t(g,Br),t(g,qe),t(qe,Rr),t(b,Qr),t(b,L),t(L,ge),t(ge,Gr),t(L,Sr),t(L,Le),t(Le,Nr),t(L,Wr),t(L,ls),t(ls,$r),t(b,Fr),t(b,ll),t(ll,ts),t(ts,Ar),t(ll,kr),t(ll,es),t(es,Xr),t(ll,Dr),t(ll,ss),t(ss,Yr),t(b,Hr),t(b,tl),t(tl,as),t(as,Pr),t(tl,zr),t(tl,ns),t(ns,xr),t(tl,Kr),t(tl,ps),t(ps,Or),t(b,qr),t(b,el),t(el,rs),t(rs,gr),t(el,Lr),t(el,os),t(os,lo),t(el,to),t(el,is),t(is,eo),t(b,so),t(b,sl),t(sl,fs),t(fs,ao),t(sl,no),t(sl,Us),t(Us,po),t(sl,ro),t(sl,Ms),t(Ms,oo),i(l,va,p),i(l,_t,p),t(_t,io),i(l,Ia,p),i(l,S,p),t(S,cs),t(cs,fo),t(S,Uo),t(S,ys),t(ys,Mo),t(S,co),t(S,ms),t(ms,vt),t(vt,yo),i(l,Va,p),h(et,l,p),Za=!0},p(l,[p]){const us={};p&2&&(us.$$scope={dirty:p,ctx:l}),il.$set(us);const Z={};p&2&&(Z.$$scope={dirty:p,ctx:l}),fl.$set(Z);const hs={};p&2&&(hs.$$scope={dirty:p,ctx:l}),ul.$set(hs);const ds={};p&2&&(ds.$$scope={dirty:p,ctx:l}),Jl.$set(ds)},i(l){Za||(d(_l.$$.fragment,l),d(Zl.$$.fragment,l),d(Bl.$$.fragment,l),d(Ql.$$.fragment,l),d(Sl.$$.fragment,l),d(il.$$.fragment,l),d(fl.$$.fragment,l),d(Wl.$$.fragment,l),d($l.$$.fragment,l),d(Fl.$$.fragment,l),d(Al.$$.fragment,l),d(kl.$$.fragment,l),d(ul.$$.fragment,l),d(Xl.$$.fragment,l),d(Pl.$$.fragment,l),d(zl.$$.fragment,l),d(Jl.$$.fragment,l),d(xl.$$.fragment,l),d(Kl.$$.fragment,l),d(Ol.$$.fragment,l),d(ql.$$.fragment,l),d(gl.$$.fragment,l),d(Ll.$$.fragment,l),d(et.$$.fragment,l),Za=!0)},o(l){J(_l.$$.fragment,l),J(Zl.$$.fragment,l),J(Bl.$$.fragment,l),J(Ql.$$.fragment,l),J(Sl.$$.fragment,l),J(il.$$.fragment,l),J(fl.$$.fragment,l),J(Wl.$$.fragment,l),J($l.$$.fragment,l),J(Fl.$$.fragment,l),J(Al.$$.fragment,l),J(kl.$$.fragment,l),J(ul.$$.fragment,l),J(Xl.$$.fragment,l),J(Pl.$$.fragment,l),J(zl.$$.fragment,l),J(Jl.$$.fragment,l),J(xl.$$.fragment,l),J(Kl.$$.fragment,l),J(Ol.$$.fragment,l),J(ql.$$.fragment,l),J(gl.$$.fragment,l),J(Ll.$$.fragment,l),J(et.$$.fragment,l),Za=!1},d(l){e(y),l&&e(c),l&&e(C),l&&e(j),l&&e(T),l&&e(Js),l&&e(pt),l&&e(ws),l&&e(nl),l&&e(Cs),l&&e(rt),l&&e(bs),l&&e(D),w(_l),l&&e(js),l&&e(vl),l&&e(Es),l&&e(Vl),l&&e(_s),w(Zl,l),l&&e(vs),l&&e(Y),w(Bl),l&&e(Is),l&&e(ol),l&&e(Vs),w(Ql,l),l&&e(Zs),l&&e(Gl),l&&e(Bs),l&&e(R),l&&e(Rs),w(Sl,l),l&&e(Qs),w(il,l),l&&e(Gs),l&&e(Nl),l&&e(Ss),l&&e(ot),l&&e(Ns),w(fl,l),l&&e(Ws),l&&e(Ul),l&&e($s),w(Wl,l),l&&e(Fs),l&&e(it),l&&e(As),l&&e(H),w($l),l&&e(ks),l&&e(ft),l&&e(Xs),l&&e(Q),l&&e(Ds),l&&e(cl),l&&e(Ys),w(Fl,l),l&&e(Hs),l&&e(Ut),l&&e(Ps),l&&e(Mt),l&&e(zs),l&&e(P),w(Al),l&&e(xs),l&&e(ct),l&&e(Ks),l&&e(ml),l&&e(Os),w(kl,l),l&&e(qs),l&&e(yt),l&&e(gs),l&&e(mt),l&&e(Ls),w(ul,l),l&&e(la),l&&e(ut),l&&e(ta),w(Xl,l),l&&e(ea),l&&e(V),l&&e(sa),l&&e(ht),l&&e(aa),l&&e(Yl),l&&e(na),l&&e(Hl),l&&e(pa),l&&e(hl),l&&e(ra),l&&e(Jt),l&&e(oa),l&&e(dl),l&&e(ia),w(Pl,l),l&&e(fa),l&&e(wt),l&&e(Ua),w(zl,l),l&&e(Ma),w(Jl,l),l&&e(ca),l&&e(z),w(xl),l&&e(ya),l&&e(Tt),l&&e(ma),l&&e(Ct),l&&e(ua),w(Kl,l),l&&e(ha),l&&e(x),w(Ol),l&&e(da),l&&e(bt),l&&e(Ja),l&&e(jt),l&&e(wa),w(ql,l),l&&e(Ta),l&&e(Cl),l&&e(Ca),w(gl,l),l&&e(ba),l&&e(K),w(Ll),l&&e(ja),l&&e(G),l&&e(Ea),l&&e(Et),l&&e(_a),l&&e(jl),l&&e(va),l&&e(_t),l&&e(Ia),l&&e(S),l&&e(Va),w(et,l)}}}const Gf={local:"",sections:[{local:"cudnn-autotuner",sections:[{local:"fp32-tf32-ampere-cuda",title:"fp32 \uB300\uC2E0 tf32 \uC0AC\uC6A9\uD558\uAE30  (Ampere \uBC0F \uC774\uD6C4 CUDA \uC7A5\uCE58\uB4E4\uC5D0\uC11C)"}],title:"cuDNN auto-tuner \uD65C\uC131\uD654\uD558\uAE30"},{local:"",title:"\uBC18\uC815\uBC00\uB3C4 \uAC00\uC911\uCE58"},{local:"",title:"\uCD94\uAC00 \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C \uC2AC\uB77C\uC774\uC2A4 \uC5B4\uD150\uC158"},{local:"sliced-vae",title:"\uB354 \uD070 \uBC30\uCE58\uB97C \uC704\uD55C sliced VAE \uB514\uCF54\uB4DC"},{local:"cpu",title:"\uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD574 \uAC00\uC18D \uAE30\uB2A5\uC744 \uC0AC\uC6A9\uD558\uC5EC CPU\uB85C \uC624\uD504\uB85C\uB529"},{local:"",title:"\uBE60\uB978 \uCD94\uB860\uACFC \uBA54\uBAA8\uB9AC \uBA54\uBAA8\uB9AC \uC808\uC57D\uC744 \uC704\uD55C \uBAA8\uB378 \uC624\uD504\uB85C\uB529"},{local:"channels-last",title:"Channels Last \uBA54\uBAA8\uB9AC \uD615\uC2DD \uC0AC\uC6A9\uD558\uAE30"},{local:"tracing",title:"\uCD94\uC801(tracing)"},{local:"memoryefficient-attention",title:"Memory-efficient attention"}],title:"\uBA54\uBAA8\uB9AC\uC640 \uC18D\uB3C4"};function Sf(B){return If(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Af extends jf{constructor(y){super();Ef(this,y,Sf,Qf,_f,{})}}export{Af as default,Gf as metadata};
