import{S as Ut,i as jt,s as Ct,e as n,k as f,t as o,w as fe,M as Wt,c as a,d as l,m,a as i,h as s,x as me,b as u,G as t,g as c,y as ue,L as Gt,q as he,o as _e,B as be,v as Jt}from"../../chunks/vendor-hf-doc-builder.js";import{I as $t}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as tt}from"../../chunks/CodeBlock-hf-doc-builder.js";function Tt(lt){let b,Y,U,ye,z,D,ve,L,M,Me,N,we,Ee,H,y,w,k,j,Ze,x,Ue,K,p,V,je,Ce,C,We,Ge,W,g,Je,$e,X,Te,De,ee,G,te,E,Be,J,Q,Ne,ke,le,$,oe,Z,xe,R,Ve,ge,se,d,Xe,S,Qe,Re,I,Se,Ie,P,Pe,qe,q,Fe,Oe,F,Ae,Ye,ne,T,ae,_,ze,O,Le,He,A,Ke,et,ie;return j=new $t({}),G=new tt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIpJTBBcGlwZWxpbmUudW5ldC5jb25maWclNUIlMjJpbl9jaGFubmVscyUyMiU1RCUwQTQ=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipeline = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
pipeline.unet.config[<span class="hljs-string">&quot;in_channels&quot;</span>]
<span class="hljs-number">4</span>`}}),$=new tt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLWlucGFpbnRpbmclMjIpJTBBcGlwZWxpbmUudW5ldC5jb25maWclNUIlMjJpbl9jaGFubmVscyUyMiU1RCUwQTk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipeline = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-inpainting&quot;</span>)
pipeline.unet.config[<span class="hljs-string">&quot;in_channels&quot;</span>]
<span class="hljs-number">9</span>`}}),T=new tt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXVuZXQlMjAlM0QlMjBVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyJTJDJTIwaW5fY2hhbm5lbHMlM0Q5JTJDJTIwbG93X2NwdV9tZW1fdXNhZ2UlM0RGYWxzZSUyQyUyMGlnbm9yZV9taXNtYXRjaGVkX3NpemVzJTNEVHJ1ZSUwQSk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
unet = UNet2DConditionModel.from_pretrained(
    model_id, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, in_channels=<span class="hljs-number">9</span>, low_cpu_mem_usage=<span class="hljs-literal">False</span>, ignore_mismatched_sizes=<span class="hljs-literal">True</span>
)`}}),{c(){b=n("meta"),Y=f(),U=n("h1"),ye=o("\uC0C8\uB85C\uC6B4 \uC791\uC5C5\uC5D0 \uB300\uD55C \uBAA8\uB378\uC744 \uC801\uC6A9\uD558\uAE30"),z=f(),D=n("p"),ve=o("\uB9CE\uC740 diffusion \uC2DC\uC2A4\uD15C\uC740 \uAC19\uC740 \uAD6C\uC131 \uC694\uC18C\uB4E4\uC744 \uACF5\uC720\uD558\uBBC0\uB85C \uD55C \uC791\uC5C5\uC5D0 \uB300\uD574 \uC0AC\uC804\uD559\uC2B5\uB41C \uBAA8\uB378\uC744 \uC644\uC804\uD788 \uB2E4\uB978 \uC791\uC5C5\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),L=f(),M=n("p"),Me=o("\uC774 \uC778\uD398\uC778\uD305\uC744 \uC704\uD55C \uAC00\uC774\uB4DC\uB294 \uC0AC\uC804\uD559\uC2B5\uB41C "),N=n("code"),we=o("UNet2DConditionModel"),Ee=o("\uC758 \uC544\uD0A4\uD14D\uCC98\uB97C \uCD08\uAE30\uD654\uD558\uACE0 \uC218\uC815\uD558\uC5EC \uC0AC\uC804\uD559\uC2B5\uB41C text-to-image \uBAA8\uB378\uC744 \uC5B4\uB5BB\uAC8C \uC778\uD398\uC778\uD305\uC5D0 \uC801\uC6A9\uD558\uB294\uC9C0\uB97C \uC54C\uB824\uC904 \uAC83\uC785\uB2C8\uB2E4."),H=f(),y=n("h2"),w=n("a"),k=n("span"),fe(j.$$.fragment),Ze=f(),x=n("span"),Ue=o("UNet2DConditionModel \uD30C\uB77C\uBBF8\uD130 \uAD6C\uC131"),K=f(),p=n("p"),V=n("code"),je=o("UNet2DConditionModel"),Ce=o("\uC740 "),C=n("a"),We=o("input sample"),Ge=o("\uC5D0\uC11C 4\uAC1C\uC758 \uCC44\uB110\uC744 \uAE30\uBCF8\uC801\uC73C\uB85C \uD5C8\uC6A9\uD569\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4,  "),W=n("a"),g=n("code"),Je=o("runwayml/stable-diffusion-v1-5"),$e=o("\uC640 \uAC19\uC740 \uC0AC\uC804\uD559\uC2B5\uB41C text-to-image \uBAA8\uB378\uC744 \uBD88\uB7EC\uC624\uACE0 "),X=n("code"),Te=o("in_channels"),De=o("\uC758 \uC218\uB97C \uD655\uC778\uD569\uB2C8\uB2E4:"),ee=f(),fe(G.$$.fragment),te=f(),E=n("p"),Be=o("\uC778\uD398\uC778\uD305\uC740 \uC785\uB825 \uC0D8\uD50C\uC5D0 9\uAC1C\uC758 \uCC44\uB110\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. "),J=n("a"),Q=n("code"),Ne=o("runwayml/stable-diffusion-inpainting"),ke=o("\uC640 \uAC19\uC740 \uC0AC\uC804\uD559\uC2B5\uB41C \uC778\uD398\uC778\uD305 \uBAA8\uB378\uC5D0\uC11C \uC774 \uAC12\uC744 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),le=f(),fe($.$$.fragment),oe=f(),Z=n("p"),xe=o("\uC778\uD398\uC778\uD305\uC5D0 \uB300\uD55C text-to-image \uBAA8\uB378\uC744 \uC801\uC6A9\uD558\uAE30 \uC704\uD574, "),R=n("code"),Ve=o("in_channels"),ge=o(" \uC218\uB97C 4\uC5D0\uC11C 9\uB85C \uC218\uC815\uD574\uC57C \uD560 \uAC83\uC785\uB2C8\uB2E4."),se=f(),d=n("p"),Xe=o("\uC0AC\uC804\uD559\uC2B5\uB41C text-to-image \uBAA8\uB378\uC758 \uAC00\uC911\uCE58\uC640 "),S=n("code"),Qe=o("UNet2DConditionModel"),Re=o("\uC744 \uCD08\uAE30\uD654\uD558\uACE0 "),I=n("code"),Se=o("in_channels"),Ie=o("\uB97C 9\uB85C \uC218\uC815\uD574 \uC8FC\uC138\uC694. "),P=n("code"),Pe=o("in_channels"),qe=o("\uC758 \uC218\uB97C \uC218\uC815\uD558\uBA74 \uD06C\uAE30\uAC00 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC5D0 \uD06C\uAE30\uAC00 \uC548 \uB9DE\uB294 \uC624\uB958\uB97C \uD53C\uD558\uAE30 \uC704\uD574 "),q=n("code"),Fe=o("ignore_mismatched_sizes=True"),Oe=o(" \uBC0F "),F=n("code"),Ae=o("low_cpu_mem_usage=False"),Ye=o("\uB97C \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4."),ne=f(),fe(T.$$.fragment),ae=f(),_=n("p"),ze=o("Text-to-image \uBAA8\uB378\uB85C\uBD80\uD130 \uB2E4\uB978 \uAD6C\uC131 \uC694\uC18C\uC758 \uC0AC\uC804\uD559\uC2B5\uB41C \uAC00\uC911\uCE58\uB294 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB85C\uBD80\uD130 \uCD08\uAE30\uD654\uB418\uC9C0\uB9CC "),O=n("code"),Le=o("unet"),He=o("\uC758 \uC785\uB825 \uCC44\uB110 \uAC00\uC911\uCE58 ("),A=n("code"),Ke=o("conv_in.weight"),et=o(")\uB294 \uB79C\uB364\uD558\uAC8C \uCD08\uAE30\uD654\uB429\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 \uBAA8\uB378\uC774 \uB178\uC774\uC988\uB97C \uB9AC\uD134\uD558\uAE30 \uB54C\uBB38\uC5D0 \uC778\uD398\uC778\uD305\uC758 \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD \uD560 \uB54C \uC911\uC694\uD569\uB2C8\uB2E4."),this.h()},l(e){const r=Wt('[data-svelte="svelte-1phssyn"]',document.head);b=a(r,"META",{name:!0,content:!0}),r.forEach(l),Y=m(e),U=a(e,"H1",{id:!0});var ot=i(U);ye=s(ot,"\uC0C8\uB85C\uC6B4 \uC791\uC5C5\uC5D0 \uB300\uD55C \uBAA8\uB378\uC744 \uC801\uC6A9\uD558\uAE30"),ot.forEach(l),z=m(e),D=a(e,"P",{});var st=i(D);ve=s(st,"\uB9CE\uC740 diffusion \uC2DC\uC2A4\uD15C\uC740 \uAC19\uC740 \uAD6C\uC131 \uC694\uC18C\uB4E4\uC744 \uACF5\uC720\uD558\uBBC0\uB85C \uD55C \uC791\uC5C5\uC5D0 \uB300\uD574 \uC0AC\uC804\uD559\uC2B5\uB41C \uBAA8\uB378\uC744 \uC644\uC804\uD788 \uB2E4\uB978 \uC791\uC5C5\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),st.forEach(l),L=m(e),M=a(e,"P",{});var re=i(M);Me=s(re,"\uC774 \uC778\uD398\uC778\uD305\uC744 \uC704\uD55C \uAC00\uC774\uB4DC\uB294 \uC0AC\uC804\uD559\uC2B5\uB41C "),N=a(re,"CODE",{});var nt=i(N);we=s(nt,"UNet2DConditionModel"),nt.forEach(l),Ee=s(re,"\uC758 \uC544\uD0A4\uD14D\uCC98\uB97C \uCD08\uAE30\uD654\uD558\uACE0 \uC218\uC815\uD558\uC5EC \uC0AC\uC804\uD559\uC2B5\uB41C text-to-image \uBAA8\uB378\uC744 \uC5B4\uB5BB\uAC8C \uC778\uD398\uC778\uD305\uC5D0 \uC801\uC6A9\uD558\uB294\uC9C0\uB97C \uC54C\uB824\uC904 \uAC83\uC785\uB2C8\uB2E4."),re.forEach(l),H=m(e),y=a(e,"H2",{class:!0});var ce=i(y);w=a(ce,"A",{id:!0,class:!0,href:!0});var at=i(w);k=a(at,"SPAN",{});var it=i(k);me(j.$$.fragment,it),it.forEach(l),at.forEach(l),Ze=m(ce),x=a(ce,"SPAN",{});var rt=i(x);Ue=s(rt,"UNet2DConditionModel \uD30C\uB77C\uBBF8\uD130 \uAD6C\uC131"),rt.forEach(l),ce.forEach(l),K=m(e),p=a(e,"P",{});var v=i(p);V=a(v,"CODE",{});var ct=i(V);je=s(ct,"UNet2DConditionModel"),ct.forEach(l),Ce=s(v,"\uC740 "),C=a(v,"A",{href:!0,rel:!0});var dt=i(C);We=s(dt,"input sample"),dt.forEach(l),Ge=s(v,"\uC5D0\uC11C 4\uAC1C\uC758 \uCC44\uB110\uC744 \uAE30\uBCF8\uC801\uC73C\uB85C \uD5C8\uC6A9\uD569\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4,  "),W=a(v,"A",{href:!0,rel:!0});var pt=i(W);g=a(pt,"CODE",{});var ft=i(g);Je=s(ft,"runwayml/stable-diffusion-v1-5"),ft.forEach(l),pt.forEach(l),$e=s(v,"\uC640 \uAC19\uC740 \uC0AC\uC804\uD559\uC2B5\uB41C text-to-image \uBAA8\uB378\uC744 \uBD88\uB7EC\uC624\uACE0 "),X=a(v,"CODE",{});var mt=i(X);Te=s(mt,"in_channels"),mt.forEach(l),De=s(v,"\uC758 \uC218\uB97C \uD655\uC778\uD569\uB2C8\uB2E4:"),v.forEach(l),ee=m(e),me(G.$$.fragment,e),te=m(e),E=a(e,"P",{});var de=i(E);Be=s(de,"\uC778\uD398\uC778\uD305\uC740 \uC785\uB825 \uC0D8\uD50C\uC5D0 9\uAC1C\uC758 \uCC44\uB110\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. "),J=a(de,"A",{href:!0,rel:!0});var ut=i(J);Q=a(ut,"CODE",{});var ht=i(Q);Ne=s(ht,"runwayml/stable-diffusion-inpainting"),ht.forEach(l),ut.forEach(l),ke=s(de,"\uC640 \uAC19\uC740 \uC0AC\uC804\uD559\uC2B5\uB41C \uC778\uD398\uC778\uD305 \uBAA8\uB378\uC5D0\uC11C \uC774 \uAC12\uC744 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),de.forEach(l),le=m(e),me($.$$.fragment,e),oe=m(e),Z=a(e,"P",{});var pe=i(Z);xe=s(pe,"\uC778\uD398\uC778\uD305\uC5D0 \uB300\uD55C text-to-image \uBAA8\uB378\uC744 \uC801\uC6A9\uD558\uAE30 \uC704\uD574, "),R=a(pe,"CODE",{});var _t=i(R);Ve=s(_t,"in_channels"),_t.forEach(l),ge=s(pe," \uC218\uB97C 4\uC5D0\uC11C 9\uB85C \uC218\uC815\uD574\uC57C \uD560 \uAC83\uC785\uB2C8\uB2E4."),pe.forEach(l),se=m(e),d=a(e,"P",{});var h=i(d);Xe=s(h,"\uC0AC\uC804\uD559\uC2B5\uB41C text-to-image \uBAA8\uB378\uC758 \uAC00\uC911\uCE58\uC640 "),S=a(h,"CODE",{});var bt=i(S);Qe=s(bt,"UNet2DConditionModel"),bt.forEach(l),Re=s(h,"\uC744 \uCD08\uAE30\uD654\uD558\uACE0 "),I=a(h,"CODE",{});var yt=i(I);Se=s(yt,"in_channels"),yt.forEach(l),Ie=s(h,"\uB97C 9\uB85C \uC218\uC815\uD574 \uC8FC\uC138\uC694. "),P=a(h,"CODE",{});var vt=i(P);Pe=s(vt,"in_channels"),vt.forEach(l),qe=s(h,"\uC758 \uC218\uB97C \uC218\uC815\uD558\uBA74 \uD06C\uAE30\uAC00 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC5D0 \uD06C\uAE30\uAC00 \uC548 \uB9DE\uB294 \uC624\uB958\uB97C \uD53C\uD558\uAE30 \uC704\uD574 "),q=a(h,"CODE",{});var Mt=i(q);Fe=s(Mt,"ignore_mismatched_sizes=True"),Mt.forEach(l),Oe=s(h," \uBC0F "),F=a(h,"CODE",{});var wt=i(F);Ae=s(wt,"low_cpu_mem_usage=False"),wt.forEach(l),Ye=s(h,"\uB97C \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4."),h.forEach(l),ne=m(e),me(T.$$.fragment,e),ae=m(e),_=a(e,"P",{});var B=i(_);ze=s(B,"Text-to-image \uBAA8\uB378\uB85C\uBD80\uD130 \uB2E4\uB978 \uAD6C\uC131 \uC694\uC18C\uC758 \uC0AC\uC804\uD559\uC2B5\uB41C \uAC00\uC911\uCE58\uB294 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB85C\uBD80\uD130 \uCD08\uAE30\uD654\uB418\uC9C0\uB9CC "),O=a(B,"CODE",{});var Et=i(O);Le=s(Et,"unet"),Et.forEach(l),He=s(B,"\uC758 \uC785\uB825 \uCC44\uB110 \uAC00\uC911\uCE58 ("),A=a(B,"CODE",{});var Zt=i(A);Ke=s(Zt,"conv_in.weight"),Zt.forEach(l),et=s(B,")\uB294 \uB79C\uB364\uD558\uAC8C \uCD08\uAE30\uD654\uB429\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 \uBAA8\uB378\uC774 \uB178\uC774\uC988\uB97C \uB9AC\uD134\uD558\uAE30 \uB54C\uBB38\uC5D0 \uC778\uD398\uC778\uD305\uC758 \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD \uD560 \uB54C \uC911\uC694\uD569\uB2C8\uB2E4."),B.forEach(l),this.h()},h(){u(b,"name","hf:doc:metadata"),u(b,"content",JSON.stringify(Dt)),u(U,"id",""),u(w,"id","unet2dconditionmodel"),u(w,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(w,"href","#unet2dconditionmodel"),u(y,"class","relative group"),u(C,"href","https://huggingface.co/docs/diffusers/v0.16.0/en/api/models#diffusers.UNet2DConditionModel.in_channels"),u(C,"rel","nofollow"),u(W,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),u(W,"rel","nofollow"),u(J,"href","https://huggingface.co/runwayml/stable-diffusion-inpainting"),u(J,"rel","nofollow")},m(e,r){t(document.head,b),c(e,Y,r),c(e,U,r),t(U,ye),c(e,z,r),c(e,D,r),t(D,ve),c(e,L,r),c(e,M,r),t(M,Me),t(M,N),t(N,we),t(M,Ee),c(e,H,r),c(e,y,r),t(y,w),t(w,k),ue(j,k,null),t(y,Ze),t(y,x),t(x,Ue),c(e,K,r),c(e,p,r),t(p,V),t(V,je),t(p,Ce),t(p,C),t(C,We),t(p,Ge),t(p,W),t(W,g),t(g,Je),t(p,$e),t(p,X),t(X,Te),t(p,De),c(e,ee,r),ue(G,e,r),c(e,te,r),c(e,E,r),t(E,Be),t(E,J),t(J,Q),t(Q,Ne),t(E,ke),c(e,le,r),ue($,e,r),c(e,oe,r),c(e,Z,r),t(Z,xe),t(Z,R),t(R,Ve),t(Z,ge),c(e,se,r),c(e,d,r),t(d,Xe),t(d,S),t(S,Qe),t(d,Re),t(d,I),t(I,Se),t(d,Ie),t(d,P),t(P,Pe),t(d,qe),t(d,q),t(q,Fe),t(d,Oe),t(d,F),t(F,Ae),t(d,Ye),c(e,ne,r),ue(T,e,r),c(e,ae,r),c(e,_,r),t(_,ze),t(_,O),t(O,Le),t(_,He),t(_,A),t(A,Ke),t(_,et),ie=!0},p:Gt,i(e){ie||(he(j.$$.fragment,e),he(G.$$.fragment,e),he($.$$.fragment,e),he(T.$$.fragment,e),ie=!0)},o(e){_e(j.$$.fragment,e),_e(G.$$.fragment,e),_e($.$$.fragment,e),_e(T.$$.fragment,e),ie=!1},d(e){l(b),e&&l(Y),e&&l(U),e&&l(z),e&&l(D),e&&l(L),e&&l(M),e&&l(H),e&&l(y),be(j),e&&l(K),e&&l(p),e&&l(ee),be(G,e),e&&l(te),e&&l(E),e&&l(le),be($,e),e&&l(oe),e&&l(Z),e&&l(se),e&&l(d),e&&l(ne),be(T,e),e&&l(ae),e&&l(_)}}}const Dt={local:"",sections:[{local:"unet2dconditionmodel",title:"UNet2DConditionModel \uD30C\uB77C\uBBF8\uD130 \uAD6C\uC131"}],title:"\uC0C8\uB85C\uC6B4 \uC791\uC5C5\uC5D0 \uB300\uD55C \uBAA8\uB378\uC744 \uC801\uC6A9\uD558\uAE30"};function Bt(lt){return Jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vt extends Ut{constructor(b){super();jt(this,b,Bt,Tt,Ct,{})}}export{Vt as default,Dt as metadata};
