Buckets:
| import{s as Mt,n as yt,o as Ht}from"../chunks/scheduler.94020406.js";import{S as Pt,i as kt,g as a,s as l,r as k,E as It,h as r,f as n,c as s,j as wt,u as I,x as o,k as Ct,y as Ut,a as i,v as U,d as q,t as z,w as R}from"../chunks/index.a08c8d92.js";import{C as Lt}from"../chunks/CodeBlock.f1fae7de.js";import{H as rt,E as qt}from"../chunks/getInferenceSnippets.d416d268.js";function zt(ot){let f,A,Z,E,d,G,g,ft="이번 챕터에서는 다양한 유즈케이스들에 대한 예제 코드들을 통해 어떻게하면 효과적으로 <code>diffusers</code> 라이브러리를 사용할 수 있을까에 대해 알아보도록 하겠습니다.",J,u,dt='<strong>Note</strong>: 혹시 오피셜한 예시코드를 찾고 있다면, <a href="https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines" rel="nofollow">여기</a>를 참고해보세요!',S,m,gt="여기서 다룰 예시들은 다음을 지향합니다.",W,p,ut='<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>',B,c,mt='저희는 diffusion 모델의 대표적인 태스크들을 다루는 공식 예제를 제공하고 있습니다. <em>공식</em> 예제는 현재 진행형으로 <code>diffusers</code> 관리자들(maintainers)에 의해 관리되고 있습니다. 또한 저희는 앞서 정의한 저희의 철학을 엄격하게 따르고자 노력하고 있습니다. 혹시 여러분께서 이러한 예시가 반드시 필요하다고 생각되신다면, 언제든지 <a href="https://github.com/huggingface/diffusers/issues/new?assignees=&labels=&template=feature_request.md&title=" rel="nofollow">Feature Request</a> 혹은 직접 <a href="https://github.com/huggingface/diffusers/compare" rel="nofollow">Pull Request</a>를 주시기 바랍니다. 저희는 언제나 환영입니다!',D,h,pt="학습 예시들은 다양한 태스크들에 대해 diffusion 모델을 사전학습(pretrain)하거나 파인튜닝(fine-tuning)하는 법을 보여줍니다. 현재 다음과 같은 예제들을 지원하고 있습니다.",O,b,ct='<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>',F,x,ht='memory-efficient attention 연산을 수행하기 위해, 가능하면 <a href="../optimization/xformers">xFormers</a>를 설치해주시기 바랍니다. 이를 통해 학습 속도를 늘리고 메모리에 대한 부담을 줄일 수 있습니다.',N,_,bt='<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>',V,$,Q,v,xt="공식 예제 외에도 <strong>커뮤니티 예제</strong> 역시 제공하고 있습니다. 해당 예제들은 우리의 커뮤니티에 의해 관리됩니다. 커뮤니티 예쩨는 학습 예시나 추론 파이프라인으로 구성될 수 있습니다. 이러한 커뮤니티 예시들의 경우, 앞서 정의했던 철학들을 좀 더 관대하게 적용하고 있습니다. 또한 이러한 커뮤니티 예시들의 경우, 모든 이슈들에 대한 유지보수를 보장할 수는 없습니다.",Y,T,_t='유용하긴 하지만, 아직은 대중적이지 못하거나 저희의 철학에 부합하지 않는 예제들은 <a href="https://github.com/huggingface/diffusers/tree/main/examples/community" rel="nofollow">community examples</a> 폴더에 담기게 됩니다.',X,w,$t='<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>이 될 수 있습니다.',K,C,tt,L,vt="최신 버전의 예시 코드들의 성공적인 구동을 보장하기 위해서는, 반드시 <strong>소스코드를 통해 <code>diffusers</code>를 설치해야 하며,</strong> 해당 예시 코드들이 요구하는 디펜던시들 역시 설치해야 합니다. 이를 위해 새로운 가상 환경을 구축하고 다음의 명령어를 실행해야 합니다.",et,M,nt,y,Tt="그 다음 <code>cd</code> 명령어를 통해 해당 예제 디렉토리에 접근해서 다음 명령어를 실행하면 됩니다.",it,H,lt,P,st,j,at;return d=new rt({props:{title:"🧨 Diffusers 학습 예시",local:"-diffusers-학습-예시",headingTag:"h1"}}),$=new rt({props:{title:"커뮤니티",local:"커뮤니티",headingTag:"h2"}}),C=new rt({props:{title:"주목할 사항들",local:"주목할-사항들",headingTag:"h2"}}),M=new Lt({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}}),H=new Lt({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:"pip install -r requirements.txt",wrap:!1}}),P=new qt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/ko/training/overview.md"}}),{c(){f=a("meta"),A=l(),Z=a("p"),E=l(),k(d.$$.fragment),G=l(),g=a("p"),g.innerHTML=ft,J=l(),u=a("p"),u.innerHTML=dt,S=l(),m=a("p"),m.textContent=gt,W=l(),p=a("ul"),p.innerHTML=ut,B=l(),c=a("p"),c.innerHTML=mt,D=l(),h=a("p"),h.textContent=pt,O=l(),b=a("ul"),b.innerHTML=ct,F=l(),x=a("p"),x.innerHTML=ht,N=l(),_=a("table"),_.innerHTML=bt,V=l(),k($.$$.fragment),Q=l(),v=a("p"),v.innerHTML=xt,Y=l(),T=a("p"),T.innerHTML=_t,X=l(),w=a("p"),w.innerHTML=$t,K=l(),k(C.$$.fragment),tt=l(),L=a("p"),L.innerHTML=vt,et=l(),k(M.$$.fragment),nt=l(),y=a("p"),y.innerHTML=Tt,it=l(),k(H.$$.fragment),lt=l(),k(P.$$.fragment),st=l(),j=a("p"),this.h()},l(t){const e=It("svelte-u9bgzb",document.head);f=r(e,"META",{name:!0,content:!0}),e.forEach(n),A=s(t),Z=r(t,"P",{}),wt(Z).forEach(n),E=s(t),I(d.$$.fragment,t),G=s(t),g=r(t,"P",{"data-svelte-h":!0}),o(g)!=="svelte-ghvjb4"&&(g.innerHTML=ft),J=s(t),u=r(t,"P",{"data-svelte-h":!0}),o(u)!=="svelte-y61l4q"&&(u.innerHTML=dt),S=s(t),m=r(t,"P",{"data-svelte-h":!0}),o(m)!=="svelte-1oj1it8"&&(m.textContent=gt),W=s(t),p=r(t,"UL",{"data-svelte-h":!0}),o(p)!=="svelte-1xzrwb5"&&(p.innerHTML=ut),B=s(t),c=r(t,"P",{"data-svelte-h":!0}),o(c)!=="svelte-1ipa2jt"&&(c.innerHTML=mt),D=s(t),h=r(t,"P",{"data-svelte-h":!0}),o(h)!=="svelte-17g36b2"&&(h.textContent=pt),O=s(t),b=r(t,"UL",{"data-svelte-h":!0}),o(b)!=="svelte-elov9z"&&(b.innerHTML=ct),F=s(t),x=r(t,"P",{"data-svelte-h":!0}),o(x)!=="svelte-w5df01"&&(x.innerHTML=ht),N=s(t),_=r(t,"TABLE",{"data-svelte-h":!0}),o(_)!=="svelte-dnxkud"&&(_.innerHTML=bt),V=s(t),I($.$$.fragment,t),Q=s(t),v=r(t,"P",{"data-svelte-h":!0}),o(v)!=="svelte-8tlpkz"&&(v.innerHTML=xt),Y=s(t),T=r(t,"P",{"data-svelte-h":!0}),o(T)!=="svelte-fovf62"&&(T.innerHTML=_t),X=s(t),w=r(t,"P",{"data-svelte-h":!0}),o(w)!=="svelte-x93w7o"&&(w.innerHTML=$t),K=s(t),I(C.$$.fragment,t),tt=s(t),L=r(t,"P",{"data-svelte-h":!0}),o(L)!=="svelte-1av4xl1"&&(L.innerHTML=vt),et=s(t),I(M.$$.fragment,t),nt=s(t),y=r(t,"P",{"data-svelte-h":!0}),o(y)!=="svelte-8w90gs"&&(y.innerHTML=Tt),it=s(t),I(H.$$.fragment,t),lt=s(t),I(P.$$.fragment,t),st=s(t),j=r(t,"P",{}),wt(j).forEach(n),this.h()},h(){Ct(f,"name","hf:doc:metadata"),Ct(f,"content",Rt)},m(t,e){Ut(document.head,f),i(t,A,e),i(t,Z,e),i(t,E,e),U(d,t,e),i(t,G,e),i(t,g,e),i(t,J,e),i(t,u,e),i(t,S,e),i(t,m,e),i(t,W,e),i(t,p,e),i(t,B,e),i(t,c,e),i(t,D,e),i(t,h,e),i(t,O,e),i(t,b,e),i(t,F,e),i(t,x,e),i(t,N,e),i(t,_,e),i(t,V,e),U($,t,e),i(t,Q,e),i(t,v,e),i(t,Y,e),i(t,T,e),i(t,X,e),i(t,w,e),i(t,K,e),U(C,t,e),i(t,tt,e),i(t,L,e),i(t,et,e),U(M,t,e),i(t,nt,e),i(t,y,e),i(t,it,e),U(H,t,e),i(t,lt,e),U(P,t,e),i(t,st,e),i(t,j,e),at=!0},p:yt,i(t){at||(q(d.$$.fragment,t),q($.$$.fragment,t),q(C.$$.fragment,t),q(M.$$.fragment,t),q(H.$$.fragment,t),q(P.$$.fragment,t),at=!0)},o(t){z(d.$$.fragment,t),z($.$$.fragment,t),z(C.$$.fragment,t),z(M.$$.fragment,t),z(H.$$.fragment,t),z(P.$$.fragment,t),at=!1},d(t){t&&(n(A),n(Z),n(E),n(G),n(g),n(J),n(u),n(S),n(m),n(W),n(p),n(B),n(c),n(D),n(h),n(O),n(b),n(F),n(x),n(N),n(_),n(V),n(Q),n(v),n(Y),n(T),n(X),n(w),n(K),n(tt),n(L),n(et),n(nt),n(y),n(it),n(lt),n(st),n(j)),n(f),R(d,t),R($,t),R(C,t),R(M,t),R(H,t),R(P,t)}}}const Rt='{"title":"🧨 Diffusers 학습 예시","local":"-diffusers-학습-예시","sections":[{"title":"커뮤니티","local":"커뮤니티","sections":[],"depth":2},{"title":"주목할 사항들","local":"주목할-사항들","sections":[],"depth":2}],"depth":1}';function Zt(ot){return Ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jt extends Pt{constructor(f){super(),kt(this,f,Zt,zt,Mt,{})}}export{Jt as component}; | |
Xet Storage Details
- Size:
- 13.1 kB
- Xet hash:
- 9a29e3afe1f184b167c15b56fce040e2226b986320dcc3ed18b759e846089563
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.