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 n,c as l,j as q,u as k,x as v,k as A,y as O,a as o,v as E,d as G,t as z,w as J}from"../chunks/index.d7c1b260.js";import{H as Q,g as V}from"../chunks/Heading.2be73954.js";import{T as B}from"../chunks/Tip.c000e27b.js";import{C as Y}from"../chunks/CodeBlock.09a08494.js";function ee(g){let s,a='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=a},l(r){s=$(r,"P",{"data-svelte-h":!0}),v(s)!=="svelte-1wmbwfx"&&(s.innerHTML=a)},m(r,f){o(r,s,f)},p:R,d(r){r&&n(s)}}}function te(g){let s,a='<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=a},l(r){s=$(r,"P",{"data-svelte-h":!0}),v(s)!=="svelte-1m1gk76"&&(s.innerHTML=a)},m(r,f){o(r,s,f)},p:R,d(r){r&&n(s)}}}function se(g){let s,a,r,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,D='xFormers를 설치하면, <a href="fp16#memory-efficient-attention">여기</a>서 설명한 것처럼 ‘enable_xformers_memory_efficient_attention()‘을 사용하여 추론 속도를 높이고 메모리 소비를 줄일 수 있습니다.',M,p,F,w,L;return u=new Q({props:{title:"xFormers 설치하기",local:"xformers-설치하기",headingTag:"h1"}}),x=new Y({props:{code:"cGlwJTIwaW5zdGFsbCUyMHhmb3JtZXJz",highlighted:"pip install xformers",wrap:!1}}),i=new B({props:{$$slots:{default:[ee]},$$scope:{ctx:g}}}),p=new B({props:{warning:!0,$$slots:{default:[te]},$$scope:{ctx:g}}}),{c(){s=c("meta"),a=m(),r=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=D,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(n),a=l(e),r=$(e,"P",{}),q(r).forEach(n),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=D),M=l(e),k(p.$$.fragment,e),F=l(e),w=$(e,"P",{}),q(w).forEach(n),this.h()},h(){A(s,"name","hf:doc:metadata"),A(s,"content",ne)},m(e,t){O(document.head,s),o(e,a,t),o(e,r,t),o(e,f,t),E(u,e,t),o(e,P,t),o(e,h,t),o(e,T,t),o(e,_,t),o(e,b,t),E(x,e,t),o(e,C,t),E(i,e,t),o(e,H,t),o(e,d,t),o(e,M,t),E(p,e,t),o(e,F,t),o(e,w,t),L=!0},p(e,[t]){const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),i.$set(I);const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),p.$set(j)},i(e){L||(G(u.$$.fragment,e),G(x.$$.fragment,e),G(i.$$.fragment,e),G(p.$$.fragment,e),L=!0)},o(e){z(u.$$.fragment,e),z(x.$$.fragment,e),z(i.$$.fragment,e),z(p.$$.fragment,e),L=!1},d(e){e&&(n(a),n(r),n(f),n(P),n(h),n(T),n(_),n(b),n(C),n(H),n(d),n(M),n(F),n(w)),n(s),J(u,e),J(x,e),J(i,e),J(p,e)}}}const ne='{"title":"xFormers 설치하기","local":"xformers-설치하기","sections":[],"depth":1}';function re(g){return X(()=>{new URLSearchParams(window.location.search).get("fw"),window.hfDocGoto=V}),[]}class ie extends Z{constructor(s){super(),K(this,s,re,se,W,{})}}export{ie as component};
