import{S as et,i as tt,s as lt,e as f,k as p,t as i,w as B,M as ot,c as r,d as t,m,a as n,h as a,x as S,b as u,N as st,G as o,g as s,y as F,L as it,q as A,o as O,B as R,v as at}from"../../chunks/vendor-hf-doc-builder.js";import{C as ue}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as ft}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function rt(xe){let g,L,$,ce,X,y,Q,G,be,Y,v,C,de,ge,z,c,_e,W,he,$e,w,ye,ve,H,b,we,P,Pe,Ee,q,ke,Me,K,E,ee,k,V,Ze,je,te,M,le,_,De,x,Ge,Ue,oe,Z,se,h,Je,j,N,Ie,Te,ie,U,Ce,ae,D,fe,J,We,re,d,Ne,ne;return y=new ft({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/conditional_image_generation.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/conditional_image_generation.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/conditional_image_generation.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/conditional_image_generation.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/conditional_image_generation.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/conditional_image_generation.ipynb"}]}}),E=new ue({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBZ2VuZXJhdG9yJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMkNvbXBWaXMlMkZsZG0tdGV4dDJpbS1sYXJnZS0yNTYlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>generator = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;CompVis/ldm-text2im-large-256&quot;</span>)`}}),M=new ue({props:{code:"Z2VuZXJhdG9yLnRvKCUyMmN1ZGElMjIp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>generator.to(<span class="hljs-string">&quot;cuda&quot;</span>)'}}),Z=new ue({props:{code:"aW1hZ2UlMjAlM0QlMjBnZW5lcmF0b3IoJTIyQW4lMjBpbWFnZSUyMG9mJTIwYSUyMHNxdWlycmVsJTIwaW4lMjBQaWNhc3NvJTIwc3R5bGUlMjIpLmltYWdlcyU1QjAlNUQ=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>image = generator(<span class="hljs-string">&quot;An image of a squirrel in Picasso style&quot;</span>).images[<span class="hljs-number">0</span>]'}}),D=new ue({props:{code:"aW1hZ2Uuc2F2ZSglMjJpbWFnZV9vZl9zcXVpcnJlbF9wYWludGluZy5wbmclMjIp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;image_of_squirrel_painting.png&quot;</span>)'}}),{c(){g=f("meta"),L=p(),$=f("h1"),ce=i("\uC870\uAC74\uBD80 \uC774\uBBF8\uC9C0 \uC0DD\uC131"),X=p(),B(y.$$.fragment),Q=p(),G=f("p"),be=i("\uC870\uAC74\uBD80 \uC774\uBBF8\uC9C0 \uC0DD\uC131\uC744 \uC0AC\uC6A9\uD558\uBA74 \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD14D\uC2A4\uD2B8\uB294 \uC784\uBCA0\uB529\uC73C\uB85C \uBCC0\uD658\uB418\uBA70, \uC784\uBCA0\uB529\uC740 \uB178\uC774\uC988\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB3C4\uB85D \uBAA8\uB378\uC744 \uC870\uAC74\uD654\uD558\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),Y=p(),v=f("p"),C=f("code"),de=i("DiffusionPipeline"),ge=i("\uC740 \uCD94\uB860\uC744 \uC704\uD574 \uC0AC\uC804 \uD6C8\uB828\uB41C diffusion \uC2DC\uC2A4\uD15C\uC744 \uC0AC\uC6A9\uD558\uB294 \uAC00\uC7A5 \uC26C\uC6B4 \uBC29\uBC95\uC785\uB2C8\uB2E4."),z=p(),c=f("p"),_e=i("\uBA3C\uC800 "),W=f("code"),he=i("DiffusionPipeline"),$e=i("\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD558\uACE0 \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uD30C\uC774\uD504\uB77C\uC778 "),w=f("a"),ye=i("\uCCB4\uD06C\uD3EC\uC778\uD2B8"),ve=i("\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4."),H=p(),b=f("p"),we=i("\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 "),P=f("a"),Pe=i("\uC7A0\uC7AC Diffusion"),Ee=i("\uACFC \uD568\uAED8 \uD14D\uC2A4\uD2B8-\uC774\uBBF8\uC9C0 \uC0DD\uC131\uC5D0 "),q=f("code"),ke=i("DiffusionPipeline"),Me=i("\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4:"),K=p(),B(E.$$.fragment),ee=p(),k=f("p"),V=f("code"),Ze=i("DiffusionPipeline"),je=i(`\uC740 \uBAA8\uB4E0 \uBAA8\uB378\uB9C1, \uD1A0\uD070\uD654, \uC2A4\uCF00\uC904\uB9C1 \uAD6C\uC131 \uC694\uC18C\uB97C \uB2E4\uC6B4\uB85C\uB4DC\uD558\uACE0 \uCE90\uC2DC\uD569\uB2C8\uB2E4.
\uC774 \uBAA8\uB378\uC740 \uC57D 14\uC5B5 \uAC1C\uC758 \uD30C\uB77C\uBBF8\uD130\uB85C \uAD6C\uC131\uB418\uC5B4 \uC788\uAE30 \uB54C\uBB38\uC5D0 GPU\uC5D0\uC11C \uC2E4\uD589\uD560 \uAC83\uC744 \uAC15\uB825\uD788 \uAD8C\uC7A5\uD569\uB2C8\uB2E4.
PyTorch\uC5D0\uC11C\uC640 \uB9C8\uCC2C\uAC00\uC9C0\uB85C \uC0DD\uC131\uAE30 \uAC1D\uCCB4\uB97C GPU\uB85C \uC774\uB3D9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:`),te=p(),B(M.$$.fragment),le=p(),_=f("p"),De=i("\uC774\uC81C \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C "),x=f("code"),Ge=i("\uC0DD\uC131\uAE30"),Ue=i("\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),oe=p(),B(Z.$$.fragment),se=p(),h=f("p"),Je=i("\uCD9C\uB825\uAC12\uC740 \uAE30\uBCF8\uC801\uC73C\uB85C "),j=f("a"),N=f("code"),Ie=i("PIL.Image"),Te=i(" \uAC1D\uCCB4\uB85C \uB798\uD551\uB429\uB2C8\uB2E4."),ie=p(),U=f("p"),Ce=i("\uD638\uCD9C\uD558\uC5EC \uC774\uBBF8\uC9C0\uB97C \uC800\uC7A5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),ae=p(),B(D.$$.fragment),fe=p(),J=f("p"),We=i("\uC544\uB798 \uC2A4\uD398\uC774\uC2A4\uB97C \uC0AC\uC6A9\uD574\uBCF4\uACE0 \uC548\uB0B4 \uBC30\uC728 \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC790\uC720\uB86D\uAC8C \uC870\uC815\uD558\uC5EC \uC774\uBBF8\uC9C0 \uD488\uC9C8\uC5D0 \uC5B4\uB5A4 \uC601\uD5A5\uC744 \uBBF8\uCE58\uB294\uC9C0 \uD655\uC778\uD574 \uBCF4\uC138\uC694!"),re=p(),d=f("iframe"),this.h()},l(e){const l=ot('[data-svelte="svelte-1phssyn"]',document.head);g=r(l,"META",{name:!0,content:!0}),l.forEach(t),L=m(e),$=r(e,"H1",{id:!0});var Be=n($);ce=a(Be,"\uC870\uAC74\uBD80 \uC774\uBBF8\uC9C0 \uC0DD\uC131"),Be.forEach(t),X=m(e),S(y.$$.fragment,e),Q=m(e),G=r(e,"P",{});var Se=n(G);be=a(Se,"\uC870\uAC74\uBD80 \uC774\uBBF8\uC9C0 \uC0DD\uC131\uC744 \uC0AC\uC6A9\uD558\uBA74 \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD14D\uC2A4\uD2B8\uB294 \uC784\uBCA0\uB529\uC73C\uB85C \uBCC0\uD658\uB418\uBA70, \uC784\uBCA0\uB529\uC740 \uB178\uC774\uC988\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB3C4\uB85D \uBAA8\uB378\uC744 \uC870\uAC74\uD654\uD558\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),Se.forEach(t),Y=m(e),v=r(e,"P",{});var qe=n(v);C=r(qe,"CODE",{});var Fe=n(C);de=a(Fe,"DiffusionPipeline"),Fe.forEach(t),ge=a(qe,"\uC740 \uCD94\uB860\uC744 \uC704\uD574 \uC0AC\uC804 \uD6C8\uB828\uB41C diffusion \uC2DC\uC2A4\uD15C\uC744 \uC0AC\uC6A9\uD558\uB294 \uAC00\uC7A5 \uC26C\uC6B4 \uBC29\uBC95\uC785\uB2C8\uB2E4."),qe.forEach(t),z=m(e),c=r(e,"P",{});var I=n(c);_e=a(I,"\uBA3C\uC800 "),W=r(I,"CODE",{});var Ae=n(W);he=a(Ae,"DiffusionPipeline"),Ae.forEach(t),$e=a(I,"\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD558\uACE0 \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uD30C\uC774\uD504\uB77C\uC778 "),w=r(I,"A",{href:!0,rel:!0});var Oe=n(w);ye=a(Oe,"\uCCB4\uD06C\uD3EC\uC778\uD2B8"),Oe.forEach(t),ve=a(I,"\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4."),I.forEach(t),H=m(e),b=r(e,"P",{});var T=n(b);we=a(T,"\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 "),P=r(T,"A",{href:!0,rel:!0});var Re=n(P);Pe=a(Re,"\uC7A0\uC7AC Diffusion"),Re.forEach(t),Ee=a(T,"\uACFC \uD568\uAED8 \uD14D\uC2A4\uD2B8-\uC774\uBBF8\uC9C0 \uC0DD\uC131\uC5D0 "),q=r(T,"CODE",{});var Le=n(q);ke=a(Le,"DiffusionPipeline"),Le.forEach(t),Me=a(T,"\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4:"),T.forEach(t),K=m(e),S(E.$$.fragment,e),ee=m(e),k=r(e,"P",{});var Ve=n(k);V=r(Ve,"CODE",{});var Xe=n(V);Ze=a(Xe,"DiffusionPipeline"),Xe.forEach(t),je=a(Ve,`\uC740 \uBAA8\uB4E0 \uBAA8\uB378\uB9C1, \uD1A0\uD070\uD654, \uC2A4\uCF00\uC904\uB9C1 \uAD6C\uC131 \uC694\uC18C\uB97C \uB2E4\uC6B4\uB85C\uB4DC\uD558\uACE0 \uCE90\uC2DC\uD569\uB2C8\uB2E4.
\uC774 \uBAA8\uB378\uC740 \uC57D 14\uC5B5 \uAC1C\uC758 \uD30C\uB77C\uBBF8\uD130\uB85C \uAD6C\uC131\uB418\uC5B4 \uC788\uAE30 \uB54C\uBB38\uC5D0 GPU\uC5D0\uC11C \uC2E4\uD589\uD560 \uAC83\uC744 \uAC15\uB825\uD788 \uAD8C\uC7A5\uD569\uB2C8\uB2E4.
PyTorch\uC5D0\uC11C\uC640 \uB9C8\uCC2C\uAC00\uC9C0\uB85C \uC0DD\uC131\uAE30 \uAC1D\uCCB4\uB97C GPU\uB85C \uC774\uB3D9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:`),Ve.forEach(t),te=m(e),S(M.$$.fragment,e),le=m(e),_=r(e,"P",{});var pe=n(_);De=a(pe,"\uC774\uC81C \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C "),x=r(pe,"CODE",{});var Qe=n(x);Ge=a(Qe,"\uC0DD\uC131\uAE30"),Qe.forEach(t),Ue=a(pe,"\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),pe.forEach(t),oe=m(e),S(Z.$$.fragment,e),se=m(e),h=r(e,"P",{});var me=n(h);Je=a(me,"\uCD9C\uB825\uAC12\uC740 \uAE30\uBCF8\uC801\uC73C\uB85C "),j=r(me,"A",{href:!0,rel:!0});var Ye=n(j);N=r(Ye,"CODE",{});var ze=n(N);Ie=a(ze,"PIL.Image"),ze.forEach(t),Ye.forEach(t),Te=a(me," \uAC1D\uCCB4\uB85C \uB798\uD551\uB429\uB2C8\uB2E4."),me.forEach(t),ie=m(e),U=r(e,"P",{});var He=n(U);Ce=a(He,"\uD638\uCD9C\uD558\uC5EC \uC774\uBBF8\uC9C0\uB97C \uC800\uC7A5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),He.forEach(t),ae=m(e),S(D.$$.fragment,e),fe=m(e),J=r(e,"P",{});var Ke=n(J);We=a(Ke,"\uC544\uB798 \uC2A4\uD398\uC774\uC2A4\uB97C \uC0AC\uC6A9\uD574\uBCF4\uACE0 \uC548\uB0B4 \uBC30\uC728 \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC790\uC720\uB86D\uAC8C \uC870\uC815\uD558\uC5EC \uC774\uBBF8\uC9C0 \uD488\uC9C8\uC5D0 \uC5B4\uB5A4 \uC601\uD5A5\uC744 \uBBF8\uCE58\uB294\uC9C0 \uD655\uC778\uD574 \uBCF4\uC138\uC694!"),Ke.forEach(t),re=m(e),d=r(e,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0}),n(d).forEach(t),this.h()},h(){u(g,"name","hf:doc:metadata"),u(g,"content",JSON.stringify(nt)),u($,"id",""),u(w,"href","https://huggingface.co/models?library=diffusers&sort=downloads"),u(w,"rel","nofollow"),u(P,"href","https://huggingface.co/CompVis/ldm-text2im-large-256"),u(P,"rel","nofollow"),u(j,"href","https://pillow.readthedocs.io/en/stable/reference/Image.html?highlight=image#the-image-class"),u(j,"rel","nofollow"),st(d.src,Ne="https://stabilityai-stable-diffusion.hf.space")||u(d,"src",Ne),u(d,"frameborder","0"),u(d,"width","850"),u(d,"height","500")},m(e,l){o(document.head,g),s(e,L,l),s(e,$,l),o($,ce),s(e,X,l),F(y,e,l),s(e,Q,l),s(e,G,l),o(G,be),s(e,Y,l),s(e,v,l),o(v,C),o(C,de),o(v,ge),s(e,z,l),s(e,c,l),o(c,_e),o(c,W),o(W,he),o(c,$e),o(c,w),o(w,ye),o(c,ve),s(e,H,l),s(e,b,l),o(b,we),o(b,P),o(P,Pe),o(b,Ee),o(b,q),o(q,ke),o(b,Me),s(e,K,l),F(E,e,l),s(e,ee,l),s(e,k,l),o(k,V),o(V,Ze),o(k,je),s(e,te,l),F(M,e,l),s(e,le,l),s(e,_,l),o(_,De),o(_,x),o(x,Ge),o(_,Ue),s(e,oe,l),F(Z,e,l),s(e,se,l),s(e,h,l),o(h,Je),o(h,j),o(j,N),o(N,Ie),o(h,Te),s(e,ie,l),s(e,U,l),o(U,Ce),s(e,ae,l),F(D,e,l),s(e,fe,l),s(e,J,l),o(J,We),s(e,re,l),s(e,d,l),ne=!0},p:it,i(e){ne||(A(y.$$.fragment,e),A(E.$$.fragment,e),A(M.$$.fragment,e),A(Z.$$.fragment,e),A(D.$$.fragment,e),ne=!0)},o(e){O(y.$$.fragment,e),O(E.$$.fragment,e),O(M.$$.fragment,e),O(Z.$$.fragment,e),O(D.$$.fragment,e),ne=!1},d(e){t(g),e&&t(L),e&&t($),e&&t(X),R(y,e),e&&t(Q),e&&t(G),e&&t(Y),e&&t(v),e&&t(z),e&&t(c),e&&t(H),e&&t(b),e&&t(K),R(E,e),e&&t(ee),e&&t(k),e&&t(te),R(M,e),e&&t(le),e&&t(_),e&&t(oe),R(Z,e),e&&t(se),e&&t(h),e&&t(ie),e&&t(U),e&&t(ae),R(D,e),e&&t(fe),e&&t(J),e&&t(re),e&&t(d)}}}const nt={local:"",title:"\uC870\uAC74\uBD80 \uC774\uBBF8\uC9C0 \uC0DD\uC131"};function pt(xe){return at(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bt extends et{constructor(g){super();tt(this,g,pt,rt,lt,{})}}export{bt as default,nt as metadata};
