Buckets:

rtrm's picture
download
raw
13.3 kB
import{s as Ht,n as Pt,o as kt}from"../chunks/scheduler.23542ac5.js";import{S as It,i as Ut,e as a,s as l,c as I,h as zt,a as r,d as n,b as s,f as Lt,g as U,j as o,k as Mt,l as qt,m as i,n as z,t as q,o as R,p as Z}from"../chunks/index.9b1f405b.js";import{C as Rt,H as ft,E as Zt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.99afe1ab.js";import{C as yt}from"../chunks/CodeBlock.1c9c6858.js";function jt(dt){let f,E,j,G,d,S,g,J,m,gt="이번 챕터에서는 다양한 유즈케이스들에 대한 예제 코드들을 통해 어떻게하면 효과적으로 <code>diffusers</code> 라이브러리를 사용할 수 있을까에 대해 알아보도록 하겠습니다.",W,u,mt='<strong>Note</strong>: 혹시 오피셜한 예시코드를 찾고 있다면, <a href="https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines" rel="nofollow">여기</a>를 참고해보세요!',B,p,ut="여기서 다룰 예시들은 다음을 지향합니다.",D,c,pt='<li><strong>손쉬운 디펜던시 설치</strong> (Self-contained) : 여기서 사용될 예시 코드들의 디펜던시 패키지들은 전부 <code>pip install</code> 명령어를 통해 설치 가능한 패키지들입니다. 또한 친절하게 <code>requirements.txt</code> 파일에 해당 패키지들이 명시되어 있어, <code>pip install -r requirements.txt</code>로 간편하게 해당 디펜던시들을 설치할 수 있습니다. 예시: <a href="https://github.com/huggingface/diffusers/blob/main/examples/unconditional_image_generation/train_unconditional.py" rel="nofollow">train_unconditional.py</a>, <a href="https://github.com/huggingface/diffusers/blob/main/examples/unconditional_image_generation/requirements.txt" rel="nofollow">requirements.txt</a></li> <li><strong>손쉬운 수정</strong> (Easy-to-tweak) : 저희는 가능하면 많은 유즈 케이스들을 제공하고자 합니다. 하지만 예시는 결국 그저 예시라는 점들 기억해주세요. 여기서 제공되는 예시코드들을 그저 단순히 복사-붙혀넣기하는 식으로는 여러분이 마주한 문제들을 손쉽게 해결할 순 없을 것입니다. 다시 말해 어느 정도는 여러분의 상황과 니즈에 맞춰 코드를 일정 부분 고쳐나가야 할 것입니다. 따라서 대부분의 학습 예시들은 데이터의 전처리 과정과 학습 과정에 대한 코드들을 함께 제공함으로써, 사용자가 니즈에 맞게 손쉬운 수정할 수 있도록 돕고 있습니다.</li> <li><strong>입문자 친화적인</strong> (Beginner-friendly) : 이번 챕터는 diffusion 모델과 <code>diffusers</code> 라이브러리에 대한 전반적인 이해를 돕기 위해 작성되었습니다. 따라서 diffusion 모델에 대한 최신 SOTA (state-of-the-art) 방법론들 가운데서도, 입문자에게는 많이 어려울 수 있다고 판단되면, 해당 방법론들은 여기서 다루지 않으려고 합니다.</li> <li><strong>하나의 태스크만 포함할 것</strong>(One-purpose-only): 여기서 다룰 예시들은 하나의 태스크만 포함하고 있어야 합니다. 물론 이미지 초해상화(super-resolution)와 이미지 보정(modification)과 같은 유사한 모델링 프로세스를 갖는 태스크들이 존재하겠지만, 하나의 예제에 하나의 태스크만을 담는 것이 더 이해하기 용이하다고 판단했기 때문입니다.</li>',O,h,ct='저희는 diffusion 모델의 대표적인 태스크들을 다루는 공식 예제를 제공하고 있습니다. <em>공식</em> 예제는 현재 진행형으로 <code>diffusers</code> 관리자들(maintainers)에 의해 관리되고 있습니다. 또한 저희는 앞서 정의한 저희의 철학을 엄격하게 따르고자 노력하고 있습니다. 혹시 여러분께서 이러한 예시가 반드시 필요하다고 생각되신다면, 언제든지 <a href="https://github.com/huggingface/diffusers/issues/new?assignees=&amp;labels=&amp;template=feature_request.md&amp;title=" rel="nofollow">Feature Request</a> 혹은 직접 <a href="https://github.com/huggingface/diffusers/compare" rel="nofollow">Pull Request</a>를 주시기 바랍니다. 저희는 언제나 환영입니다!',F,b,ht="학습 예시들은 다양한 태스크들에 대해 diffusion 모델을 사전학습(pretrain)하거나 파인튜닝(fine-tuning)하는 법을 보여줍니다. 현재 다음과 같은 예제들을 지원하고 있습니다.",N,$,bt='<li><a href="./unconditional_training">Unconditional Training</a></li> <li><a href="./text2image">Text-to-Image Training</a></li> <li><a href="./text_inversion">Text Inversion</a></li> <li><a href="./dreambooth">Dreambooth</a></li>',V,x,$t='memory-efficient attention 연산을 수행하기 위해, 가능하면 <a href="../optimization/xformers">xFormers</a>를 설치해주시기 바랍니다. 이를 통해 학습 속도를 늘리고 메모리에 대한 부담을 줄일 수 있습니다.',Q,_,xt='<thead><tr><th>Task</th> <th>🤗 Accelerate</th> <th align="center">🤗 Datasets</th> <th align="center">Colab</th></tr></thead> <tbody><tr><td><a href="./unconditional_training"><strong>Unconditional Image Generation</strong></a></td> <td>✅</td> <td align="center">✅</td> <td align="center"><a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a></td></tr> <tr><td><a href="./text2image"><strong>Text-to-Image fine-tuning</strong></a></td> <td>✅</td> <td align="center">✅</td> <td align="center"></td></tr> <tr><td><a href="./text_inversion"><strong>Textual Inversion</strong></a></td> <td>✅</td> <td align="center">-</td> <td align="center"><a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_textual_inversion_training.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a></td></tr> <tr><td><a href="./dreambooth"><strong>Dreambooth</strong></a></td> <td>✅</td> <td align="center">-</td> <td align="center"><a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_dreambooth_training.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a></td></tr> <tr><td><a href="./lora"><strong>Training with LoRA</strong></a></td> <td>✅</td> <td align="center">-</td> <td align="center">-</td></tr> <tr><td><a href="./controlnet"><strong>ControlNet</strong></a></td> <td>✅</td> <td align="center">✅</td> <td align="center">-</td></tr> <tr><td><a href="./instructpix2pix"><strong>InstructPix2Pix</strong></a></td> <td>✅</td> <td align="center">✅</td> <td align="center">-</td></tr> <tr><td><a href="./custom_diffusion"><strong>Custom Diffusion</strong></a></td> <td>✅</td> <td align="center">✅</td> <td align="center">-</td></tr></tbody>',Y,v,X,T,_t="공식 예제 외에도 <strong>커뮤니티 예제</strong> 역시 제공하고 있습니다. 해당 예제들은 우리의 커뮤니티에 의해 관리됩니다. 커뮤니티 예쩨는 학습 예시나 추론 파이프라인으로 구성될 수 있습니다. 이러한 커뮤니티 예시들의 경우, 앞서 정의했던 철학들을 좀 더 관대하게 적용하고 있습니다. 또한 이러한 커뮤니티 예시들의 경우, 모든 이슈들에 대한 유지보수를 보장할 수는 없습니다.",K,w,vt='유용하긴 하지만, 아직은 대중적이지 못하거나 저희의 철학에 부합하지 않는 예제들은 <a href="https://github.com/huggingface/diffusers/tree/main/examples/community" rel="nofollow">community examples</a> 폴더에 담기게 됩니다.',tt,C,Tt='<strong>Note</strong>: 커뮤니티 예제는 <code>diffusers</code>에 기여(contribution)를 희망하는 분들에게 <a href="https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22" rel="nofollow">아주 좋은 기여 수단</a>이 될 수 있습니다.',et,L,nt,M,wt="최신 버전의 예시 코드들의 성공적인 구동을 보장하기 위해서는, 반드시 <strong>소스코드를 통해 <code>diffusers</code>를 설치해야 하며,</strong> 해당 예시 코드들이 요구하는 디펜던시들 역시 설치해야 합니다. 이를 위해 새로운 가상 환경을 구축하고 다음의 명령어를 실행해야 합니다.",it,y,lt,H,Ct="그 다음 <code>cd</code> 명령어를 통해 해당 예제 디렉토리에 접근해서 다음 명령어를 실행하면 됩니다.",st,P,at,k,rt,A,ot;return d=new Rt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),g=new ft({props:{title:"🧨 Diffusers 학습 예시",local:"-diffusers-학습-예시",headingTag:"h1"}}),v=new ft({props:{title:"커뮤니티",local:"커뮤니티",headingTag:"h2"}}),L=new ft({props:{title:"주목할 사항들",local:"주목할-사항들",headingTag:"h2"}}),y=new yt({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmRpZmZ1c2VycyUwQWNkJTIwZGlmZnVzZXJzJTBBcGlwJTIwaW5zdGFsbCUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/diffusers
<span class="hljs-built_in">cd</span> diffusers
pip install .`,wrap:!1}}),P=new yt({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:"pip install -r requirements.txt",wrap:!1}}),k=new Zt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/ko/training/overview.md"}}),{c(){f=a("meta"),E=l(),j=a("p"),G=l(),I(d.$$.fragment),S=l(),I(g.$$.fragment),J=l(),m=a("p"),m.innerHTML=gt,W=l(),u=a("p"),u.innerHTML=mt,B=l(),p=a("p"),p.textContent=ut,D=l(),c=a("ul"),c.innerHTML=pt,O=l(),h=a("p"),h.innerHTML=ct,F=l(),b=a("p"),b.textContent=ht,N=l(),$=a("ul"),$.innerHTML=bt,V=l(),x=a("p"),x.innerHTML=$t,Q=l(),_=a("table"),_.innerHTML=xt,Y=l(),I(v.$$.fragment),X=l(),T=a("p"),T.innerHTML=_t,K=l(),w=a("p"),w.innerHTML=vt,tt=l(),C=a("p"),C.innerHTML=Tt,et=l(),I(L.$$.fragment),nt=l(),M=a("p"),M.innerHTML=wt,it=l(),I(y.$$.fragment),lt=l(),H=a("p"),H.innerHTML=Ct,st=l(),I(P.$$.fragment),at=l(),I(k.$$.fragment),rt=l(),A=a("p"),this.h()},l(t){const e=zt("svelte-u9bgzb",document.head);f=r(e,"META",{name:!0,content:!0}),e.forEach(n),E=s(t),j=r(t,"P",{}),Lt(j).forEach(n),G=s(t),U(d.$$.fragment,t),S=s(t),U(g.$$.fragment,t),J=s(t),m=r(t,"P",{"data-svelte-h":!0}),o(m)!=="svelte-ghvjb4"&&(m.innerHTML=gt),W=s(t),u=r(t,"P",{"data-svelte-h":!0}),o(u)!=="svelte-y61l4q"&&(u.innerHTML=mt),B=s(t),p=r(t,"P",{"data-svelte-h":!0}),o(p)!=="svelte-1oj1it8"&&(p.textContent=ut),D=s(t),c=r(t,"UL",{"data-svelte-h":!0}),o(c)!=="svelte-1xzrwb5"&&(c.innerHTML=pt),O=s(t),h=r(t,"P",{"data-svelte-h":!0}),o(h)!=="svelte-1ipa2jt"&&(h.innerHTML=ct),F=s(t),b=r(t,"P",{"data-svelte-h":!0}),o(b)!=="svelte-17g36b2"&&(b.textContent=ht),N=s(t),$=r(t,"UL",{"data-svelte-h":!0}),o($)!=="svelte-elov9z"&&($.innerHTML=bt),V=s(t),x=r(t,"P",{"data-svelte-h":!0}),o(x)!=="svelte-w5df01"&&(x.innerHTML=$t),Q=s(t),_=r(t,"TABLE",{"data-svelte-h":!0}),o(_)!=="svelte-dnxkud"&&(_.innerHTML=xt),Y=s(t),U(v.$$.fragment,t),X=s(t),T=r(t,"P",{"data-svelte-h":!0}),o(T)!=="svelte-8tlpkz"&&(T.innerHTML=_t),K=s(t),w=r(t,"P",{"data-svelte-h":!0}),o(w)!=="svelte-fovf62"&&(w.innerHTML=vt),tt=s(t),C=r(t,"P",{"data-svelte-h":!0}),o(C)!=="svelte-x93w7o"&&(C.innerHTML=Tt),et=s(t),U(L.$$.fragment,t),nt=s(t),M=r(t,"P",{"data-svelte-h":!0}),o(M)!=="svelte-1av4xl1"&&(M.innerHTML=wt),it=s(t),U(y.$$.fragment,t),lt=s(t),H=r(t,"P",{"data-svelte-h":!0}),o(H)!=="svelte-8w90gs"&&(H.innerHTML=Ct),st=s(t),U(P.$$.fragment,t),at=s(t),U(k.$$.fragment,t),rt=s(t),A=r(t,"P",{}),Lt(A).forEach(n),this.h()},h(){Mt(f,"name","hf:doc:metadata"),Mt(f,"content",At)},m(t,e){qt(document.head,f),i(t,E,e),i(t,j,e),i(t,G,e),z(d,t,e),i(t,S,e),z(g,t,e),i(t,J,e),i(t,m,e),i(t,W,e),i(t,u,e),i(t,B,e),i(t,p,e),i(t,D,e),i(t,c,e),i(t,O,e),i(t,h,e),i(t,F,e),i(t,b,e),i(t,N,e),i(t,$,e),i(t,V,e),i(t,x,e),i(t,Q,e),i(t,_,e),i(t,Y,e),z(v,t,e),i(t,X,e),i(t,T,e),i(t,K,e),i(t,w,e),i(t,tt,e),i(t,C,e),i(t,et,e),z(L,t,e),i(t,nt,e),i(t,M,e),i(t,it,e),z(y,t,e),i(t,lt,e),i(t,H,e),i(t,st,e),z(P,t,e),i(t,at,e),z(k,t,e),i(t,rt,e),i(t,A,e),ot=!0},p:Pt,i(t){ot||(q(d.$$.fragment,t),q(g.$$.fragment,t),q(v.$$.fragment,t),q(L.$$.fragment,t),q(y.$$.fragment,t),q(P.$$.fragment,t),q(k.$$.fragment,t),ot=!0)},o(t){R(d.$$.fragment,t),R(g.$$.fragment,t),R(v.$$.fragment,t),R(L.$$.fragment,t),R(y.$$.fragment,t),R(P.$$.fragment,t),R(k.$$.fragment,t),ot=!1},d(t){t&&(n(E),n(j),n(G),n(S),n(J),n(m),n(W),n(u),n(B),n(p),n(D),n(c),n(O),n(h),n(F),n(b),n(N),n($),n(V),n(x),n(Q),n(_),n(Y),n(X),n(T),n(K),n(w),n(tt),n(C),n(et),n(nt),n(M),n(it),n(lt),n(H),n(st),n(at),n(rt),n(A)),n(f),Z(d,t),Z(g,t),Z(v,t),Z(L,t),Z(y,t),Z(P,t),Z(k,t)}}}const At='{"title":"🧨 Diffusers 학습 예시","local":"-diffusers-학습-예시","sections":[{"title":"커뮤니티","local":"커뮤니티","sections":[],"depth":2},{"title":"주목할 사항들","local":"주목할-사항들","sections":[],"depth":2}],"depth":1}';function Et(dt){return kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bt extends It{constructor(f){super(),Ut(this,f,Et,jt,Ht,{})}}export{Bt as component};

Xet Storage Details

Size:
13.3 kB
·
Xet hash:
918bd2061905d6bd66fe72a7338a77af6d39ad17a9bbc1ede0793b5904758ba0

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