import{s as W,o as X,n as R}from"../chunks/scheduler.6e0d5ff7.js";import{S as Z,i as K,g as c,s as m,r as y,E as N,h as $,f as r,c as l,j as A,u as k,x as v,k as B,y as O,a,v as E,d as z,t as G,w as J}from"../chunks/index.d7c1b260.js";import{T as D}from"../chunks/Tip.c000e27b.js";import{C as Q}from"../chunks/CodeBlock.09a08494.js";import{H as V}from"../chunks/Heading.30a009b0.js";function Y(g){let s,o='xFormers PIP 패키지에는 최신 버전의 PyTorch(xFormers 0.0.16에 1.13.1)가 필요합니다. 이전 버전의 PyTorch를 사용해야 하는 경우 <a href="https://github.com/facebookresearch/xformers#installing-xformers" rel="nofollow">프로젝트 지침</a>의 소스를 사용해 xFormers를 설치하는 것이 좋습니다.';return{c(){s=c("p"),s.innerHTML=o},l(n){s=$(n,"P",{"data-svelte-h":!0}),v(s)!=="svelte-1wmbwfx"&&(s.innerHTML=o)},m(n,f){a(n,s,f)},p:R,d(n){n&&r(s)}}}function ee(g){let s,o='<a href="https://github.com/huggingface/diffusers/issues/2234#issuecomment-1416931212" rel="nofollow">이 이슈</a>에 따르면 xFormers <code>v0.0.16</code>에서 GPU를 사용한 학습(파인 튜닝 또는 Dreambooth)을 할 수 없습니다. 해당 문제가 발견되면. 해당 코멘트를 참고해 development 버전을 설치하세요.';return{c(){s=c("p"),s.innerHTML=o},l(n){s=$(n,"P",{"data-svelte-h":!0}),v(s)!=="svelte-1m1gk76"&&(s.innerHTML=o)},m(n,f){a(n,s,f)},p:R,d(n){n&&r(s)}}}function te(g){let s,o,n,f,u,P,h,S=`추론과 학습 모두에 <a href="https://github.com/facebookresearch/xformers" rel="nofollow">xFormers</a>를 사용하는 것이 좋습니다.
자체 테스트로 어텐션 블록에서 수행된 최적화가 더 빠른 속도와 적은 메모리 소비를 확인했습니다.`,T,_,U="2023년 1월에 출시된 xFormers 버전 ‘0.0.16’부터 사전 빌드된 pip wheel을 사용하여 쉽게 설치할 수 있습니다:",b,x,C,i,H,d,I='xFormers를 설치하면, <a href="fp16#memory-efficient-attention">여기</a>서 설명한 것처럼 ‘enable_xformers_memory_efficient_attention()‘을 사용하여 추론 속도를 높이고 메모리 소비를 줄일 수 있습니다.',M,p,F,w,L;return u=new V({props:{title:"xFormers 설치하기",local:"xformers-설치하기",headingTag:"h1"}}),x=new Q({props:{code:"cGlwJTIwaW5zdGFsbCUyMHhmb3JtZXJz",highlighted:"pip install xformers",wrap:!1}}),i=new D({props:{$$slots:{default:[Y]},$$scope:{ctx:g}}}),p=new D({props:{warning:!0,$$slots:{default:[ee]},$$scope:{ctx:g}}}),{c(){s=c("meta"),o=m(),n=c("p"),f=m(),y(u.$$.fragment),P=m(),h=c("p"),h.innerHTML=S,T=m(),_=c("p"),_.textContent=U,b=m(),y(x.$$.fragment),C=m(),y(i.$$.fragment),H=m(),d=c("p"),d.innerHTML=I,M=m(),y(p.$$.fragment),F=m(),w=c("p"),this.h()},l(e){const t=N("svelte-u9bgzb",document.head);s=$(t,"META",{name:!0,content:!0}),t.forEach(r),o=l(e),n=$(e,"P",{}),A(n).forEach(r),f=l(e),k(u.$$.fragment,e),P=l(e),h=$(e,"P",{"data-svelte-h":!0}),v(h)!=="svelte-82eyhi"&&(h.innerHTML=S),T=l(e),_=$(e,"P",{"data-svelte-h":!0}),v(_)!=="svelte-1tegx9b"&&(_.textContent=U),b=l(e),k(x.$$.fragment,e),C=l(e),k(i.$$.fragment,e),H=l(e),d=$(e,"P",{"data-svelte-h":!0}),v(d)!=="svelte-1htre74"&&(d.innerHTML=I),M=l(e),k(p.$$.fragment,e),F=l(e),w=$(e,"P",{}),A(w).forEach(r),this.h()},h(){B(s,"name","hf:doc:metadata"),B(s,"content",se)},m(e,t){O(document.head,s),a(e,o,t),a(e,n,t),a(e,f,t),E(u,e,t),a(e,P,t),a(e,h,t),a(e,T,t),a(e,_,t),a(e,b,t),E(x,e,t),a(e,C,t),E(i,e,t),a(e,H,t),a(e,d,t),a(e,M,t),E(p,e,t),a(e,F,t),a(e,w,t),L=!0},p(e,[t]){const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),i.$set(j);const q={};t&2&&(q.$$scope={dirty:t,ctx:e}),p.$set(q)},i(e){L||(z(u.$$.fragment,e),z(x.$$.fragment,e),z(i.$$.fragment,e),z(p.$$.fragment,e),L=!0)},o(e){G(u.$$.fragment,e),G(x.$$.fragment,e),G(i.$$.fragment,e),G(p.$$.fragment,e),L=!1},d(e){e&&(r(o),r(n),r(f),r(P),r(h),r(T),r(_),r(b),r(C),r(H),r(d),r(M),r(F),r(w)),r(s),J(u,e),J(x,e),J(i,e),J(p,e)}}}const se='{"title":"xFormers 설치하기","local":"xformers-설치하기","sections":[],"depth":1}';function re(g){return X(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fe extends Z{constructor(s){super(),K(this,s,re,te,W,{})}}export{fe as component};
