Buckets:

download
raw
2.58 kB
import"../chunks/DsnmJJEf.js";import{i as p,h,C as d,H as u,a as g,E as x,s as b}from"../chunks/CFM6C53a.js";import{p as w,o as _,s as e,f as v,a as n,b as F,c as m,n as k}from"../chunks/CNc7KuUZ.js";const y='{"title":"xFormers 설치하기","local":"xformers-설치하기","sections":[],"depth":1}';var P=m('<meta name="hf:doc:metadata"/>'),C=m(`<p></p> <!> <!> <p>추론과 학습 모두에 <a href="https://github.com/facebookresearch/xformers" rel="nofollow">xFormers</a>를 사용하는 것이 좋습니다.
자체 테스트로 어텐션 블록에서 수행된 최적화가 더 빠른 속도와 적은 메모리 소비를 확인했습니다.</p> <p>2023년 1월에 출시된 xFormers 버전 ‘0.0.16’부터 사전 빌드된 pip wheel을 사용하여 쉽게 설치할 수 있습니다:</p> <!> <blockquote class="tip"><p>xFormers PIP 패키지에는 최신 버전의 PyTorch(xFormers 0.0.16에 1.13.1)가 필요합니다. 이전 버전의 PyTorch를 사용해야 하는 경우 <a href="https://github.com/facebookresearch/xformers#installing-xformers" rel="nofollow">프로젝트 지침</a>의 소스를 사용해 xFormers를 설치하는 것이 좋습니다.</p></blockquote> <p>xFormers를 설치하면, <a href="fp16#memory-efficient-attention">여기</a>서 설명한 것처럼 ‘enable_xformers_memory_efficient_attention()‘을 사용하여 추론 속도를 높이고 메모리 소비를 줄일 수 있습니다.</p> <blockquote><p>[!WARNING][이 이슈](<a href="https://github.com/huggingface/diffusers/issues/2234#issuecomment-1416931212)%EC%97%90" rel="nofollow">https://github.com/huggingface/diffusers/issues/2234#issuecomment-1416931212)에</a> 따르면 xFormers <code>v0.0.16</code>에서 GPU를 사용한 학습(파인 튜닝 또는 Dreambooth)을 할 수 없습니다. 해당 문제가 발견되면. 해당 코멘트를 참고해 development 버전을 설치하세요.</p></blockquote> <!> <p></p>`,1);function z(l,c){w(c,!1),_(()=>{new URLSearchParams(window.location.search).get("fw")}),p();var o=C();h("gjw17f",s=>{var i=P();b(i,"content",y),n(s,i)});var a=e(v(o),2);d(a,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var r=e(a,2);u(r,{title:"xFormers 설치하기",local:"xformers-설치하기",headingTag:"h1"});var t=e(r,6);g(t,{code:"cGlwJTIwaW5zdGFsbCUyMHhmb3JtZXJz",highlighted:"pip install xformers",lang:"bash",wrap:!1});var f=e(t,8);x(f,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/ko/optimization/xformers.md"}),k(2),n(l,o),F()}export{z as component};

Xet Storage Details

Size:
2.58 kB
·
Xet hash:
fbc79a7479d1b578da3ed3dad63222372e86334983f7f386b1baf26cf89836b5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.