import{S as kp,i as Gp,s as Np,e as i,k as c,t as a,w as U,M as Qp,c as m,d as l,m as r,a as o,h as n,x as j,b as w,N as Rp,G as e,g as p,y as J,q as h,o as b,B as y,v as Wp,L as Dp}from"../../chunks/vendor-hf-doc-builder.js";import{T as bn}from"../../chunks/Tip-hf-doc-builder.js";import{I as Xp}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as g}from"../../chunks/CodeBlock-hf-doc-builder.js";function Bp(A){let f,_,u,V,E;return{c(){f=i("p"),_=a("\u{1F4A1} VAE, UNet \uBC0F \uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354 \uBAA8\uB378\uC758 \uC791\uB3D9\uBC29\uC2DD\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),u=i("a"),V=a("How does Stable Diffusion work?"),E=a(" \uBE14\uB85C\uADF8\uB97C \uCC38\uC870\uD558\uC138\uC694."),this.h()},l(T){f=m(T,"P",{});var M=o(f);_=n(M,"\u{1F4A1} VAE, UNet \uBC0F \uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354 \uBAA8\uB378\uC758 \uC791\uB3D9\uBC29\uC2DD\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),u=m(M,"A",{href:!0,rel:!0});var Z=o(u);V=n(Z,"How does Stable Diffusion work?"),Z.forEach(l),E=n(M," \uBE14\uB85C\uADF8\uB97C \uCC38\uC870\uD558\uC138\uC694."),M.forEach(l),this.h()},h(){w(u,"href","https://huggingface.co/blog/stable_diffusion#how-does-stable-diffusion-work"),w(u,"rel","nofollow")},m(T,M){p(T,f,M),e(f,_),e(f,u),e(u,V),e(f,E)},d(T){T&&l(f)}}}function Sp(A){let f,_,u,V,E;return{c(){f=i("p"),_=a("\u{1F4A1} "),u=i("code"),V=a("guidance_scale"),E=a(" \uB9E4\uAC1C\uBCC0\uC218\uB294 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uB54C \uD504\uB86C\uD504\uD2B8\uC5D0 \uC5BC\uB9C8\uB098 \uB9CE\uC740 \uAC00\uC911\uCE58\uB97C \uBD80\uC5EC\uD560\uC9C0 \uACB0\uC815\uD569\uB2C8\uB2E4.")},l(T){f=m(T,"P",{});var M=o(f);_=n(M,"\u{1F4A1} "),u=m(M,"CODE",{});var Z=o(u);V=n(Z,"guidance_scale"),Z.forEach(l),E=n(M," \uB9E4\uAC1C\uBCC0\uC218\uB294 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uB54C \uD504\uB86C\uD504\uD2B8\uC5D0 \uC5BC\uB9C8\uB098 \uB9CE\uC740 \uAC00\uC911\uCE58\uB97C \uBD80\uC5EC\uD560\uC9C0 \uACB0\uC815\uD569\uB2C8\uB2E4."),M.forEach(l)},m(T,M){p(T,f,M),e(f,_),e(f,u),e(u,V),e(f,E)},d(T){T&&l(f)}}}function Fp(A){let f,_,u,V,E,T,M,Z;return M=new g({props:{code:"MiUyMCoqJTIwKGxlbih2YWUuY29uZmlnLmJsb2NrX291dF9jaGFubmVscyklMjAtJTIwMSklMjAlM0QlM0QlMjA4",highlighted:'<span class="hljs-number">2</span> ** (<span class="hljs-built_in">len</span>(vae.config.block_out_channels) - <span class="hljs-number">1</span>) == <span class="hljs-number">8</span>'}}),{c(){f=i("p"),_=a("\u{1F4A1} "),u=i("code"),V=a("vae"),E=a(" \uBAA8\uB378\uC5D0\uB294 3\uAC1C\uC758 \uB2E4\uC6B4 \uC0D8\uD50C\uB9C1 \uB808\uC774\uC5B4\uAC00 \uC788\uAE30 \uB54C\uBB38\uC5D0 \uB192\uC774\uC640 \uB108\uBE44\uAC00 8\uB85C \uB098\uB269\uB2C8\uB2E4. \uB2E4\uC74C\uC744 \uC2E4\uD589\uD558\uC5EC \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),T=c(),U(M.$$.fragment)},l(d){f=m(d,"P",{});var $=o(f);_=n($,"\u{1F4A1} "),u=m($,"CODE",{});var Y=o(u);V=n(Y,"vae"),Y.forEach(l),E=n($," \uBAA8\uB378\uC5D0\uB294 3\uAC1C\uC758 \uB2E4\uC6B4 \uC0D8\uD50C\uB9C1 \uB808\uC774\uC5B4\uAC00 \uC788\uAE30 \uB54C\uBB38\uC5D0 \uB192\uC774\uC640 \uB108\uBE44\uAC00 8\uB85C \uB098\uB269\uB2C8\uB2E4. \uB2E4\uC74C\uC744 \uC2E4\uD589\uD558\uC5EC \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),$.forEach(l),T=r(d),j(M.$$.fragment,d)},m(d,$){p(d,f,$),e(f,_),e(f,u),e(u,V),e(f,E),p(d,T,$),J(M,d,$),Z=!0},p:Dp,i(d){Z||(h(M.$$.fragment,d),Z=!0)},o(d){b(M.$$.fragment,d),Z=!1},d(d){d&&l(f),d&&l(T),y(M,d)}}}function zp(A){let f,_,u,V,E,T,M,Z,d,$,Y,ot,ct,Ll,Bs,rt,Ol,as,ft,ql,Ss,ut,Kl,ns,se,ps,Fs,yn,le,zs,Mt,ee,R,dt,cl,Ut,jt,rl,Jt,ht,fl,bt,yt,te,As,wt,ae,C,is,ul,Tt,gt,ms,_t,os,Ml,Et,Ct,cs,Vt,rs,dl,Zt,vt,fs,It,us,Ul,$t,Rt,Ms,kt,F,G,Gt,jl,Nt,Qt,Jl,Wt,Dt,hl,Xt,Bt,St,ds,Ft,bl,zt,At,Us,yl,Yt,xt,js,ne,v,Ht,wl,Pt,Lt,Tl,Ot,qt,gl,Kt,sa,_l,la,ea,pe,Ys,ta,ie,z,x,El,Js,aa,Cl,na,me,H,pa,Vl,ia,ma,oe,xs,oa,ce,P,re,N,ca,Zl,ra,fa,hs,vl,ua,Ma,fe,bs,ue,Q,da,Il,Ua,ja,$l,Ja,ha,Me,ys,de,Hs,ba,Ue,ws,je,Ts,ya,Je,Ps,wa,he,L,be,Ls,Ta,ye,gs,we,Os,ga,Te,_s,ge,I,_a,Rl,Ea,Ca,kl,Va,Za,Gl,va,Ia,Nl,$a,Ra,_e,Es,Ee,qs,ka,Ce,Cs,Ve,Vs,Ga,Ze,O,Na,Ql,Qa,Wa,ve,q,Ie,Zs,$e,vs,Da,Re,W,Xa,Wl,Ba,Sa,Dl,Fa,za,ke,Is,Ge,K,Aa,Xl,Ya,xa,Ne,D,Bl,Ha,Pa,Sl,La,Oa,Fl,qa,Qe,$s,We,Rs,Ka,De,X,sn,zl,ln,en,Al,tn,an,Xe,ks,Be,ss,nn,Yl,pn,mn,Se,Gs,Fe,Ns,xl,wn,ze,Qs,on,Ae,Ks,cn,Ye,sl,rn,xe,ll,fn,He,ls,Ws,un,el,Mn,dn,Un,Ds,jn,tl,Jn,hn,Pe;return ns=new g({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEREUE1QaXBlbGluZSUwQSUwQWRkcG0lMjAlM0QlMjBERFBNUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmRkcG0tY2F0LTI1NiUyMikudG8oJTIyY3VkYSUyMiklMEFpbWFnZSUyMCUzRCUyMGRkcG0obnVtX2luZmVyZW5jZV9zdGVwcyUzRDI1KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDPMPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>ddpm = DDPMPipeline.from_pretrained(<span class="hljs-string">&quot;google/ddpm-cat-256&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = ddpm(num_inference_steps=<span class="hljs-number">25</span>).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image`}}),ms=new g({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEREUE1TY2hlZHVsZXIlMkMlMjBVTmV0MkRNb2RlbCUwQSUwQXNjaGVkdWxlciUyMCUzRCUyMEREUE1TY2hlZHVsZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmRkcG0tY2F0LTI1NiUyMiklMEFtb2RlbCUyMCUzRCUyMFVOZXQyRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZkZHBtLWNhdC0yNTYlMjIpLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDPMScheduler, UNet2DModel

<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler = DDPMScheduler.from_pretrained(<span class="hljs-string">&quot;google/ddpm-cat-256&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UNet2DModel.from_pretrained(<span class="hljs-string">&quot;google/ddpm-cat-256&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)`}}),cs=new g({props:{code:"c2NoZWR1bGVyLnNldF90aW1lc3RlcHMoNTAp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler.set_timesteps(<span class="hljs-number">50</span>)'}}),fs=new g({props:{code:"c2NoZWR1bGVyLnRpbWVzdGVwcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler.timesteps
tensor([<span class="hljs-number">980</span>, <span class="hljs-number">960</span>, <span class="hljs-number">940</span>, <span class="hljs-number">920</span>, <span class="hljs-number">900</span>, <span class="hljs-number">880</span>, <span class="hljs-number">860</span>, <span class="hljs-number">840</span>, <span class="hljs-number">820</span>, <span class="hljs-number">800</span>, <span class="hljs-number">780</span>, <span class="hljs-number">760</span>, <span class="hljs-number">740</span>, <span class="hljs-number">720</span>,
    <span class="hljs-number">700</span>, <span class="hljs-number">680</span>, <span class="hljs-number">660</span>, <span class="hljs-number">640</span>, <span class="hljs-number">620</span>, <span class="hljs-number">600</span>, <span class="hljs-number">580</span>, <span class="hljs-number">560</span>, <span class="hljs-number">540</span>, <span class="hljs-number">520</span>, <span class="hljs-number">500</span>, <span class="hljs-number">480</span>, <span class="hljs-number">460</span>, <span class="hljs-number">440</span>,
    <span class="hljs-number">420</span>, <span class="hljs-number">400</span>, <span class="hljs-number">380</span>, <span class="hljs-number">360</span>, <span class="hljs-number">340</span>, <span class="hljs-number">320</span>, <span class="hljs-number">300</span>, <span class="hljs-number">280</span>, <span class="hljs-number">260</span>, <span class="hljs-number">240</span>, <span class="hljs-number">220</span>, <span class="hljs-number">200</span>, <span class="hljs-number">180</span>, <span class="hljs-number">160</span>,
    <span class="hljs-number">140</span>, <span class="hljs-number">120</span>, <span class="hljs-number">100</span>,  <span class="hljs-number">80</span>,  <span class="hljs-number">60</span>,  <span class="hljs-number">40</span>,  <span class="hljs-number">20</span>,   <span class="hljs-number">0</span>])`}}),Ms=new g({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFzYW1wbGVfc2l6ZSUyMCUzRCUyMG1vZGVsLmNvbmZpZy5zYW1wbGVfc2l6ZSUwQW5vaXNlJTIwJTNEJTIwdG9yY2gucmFuZG4oKDElMkMlMjAzJTJDJTIwc2FtcGxlX3NpemUlMkMlMjBzYW1wbGVfc2l6ZSkpLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>sample_size = model.config.sample_size
<span class="hljs-meta">&gt;&gt;&gt; </span>noise = torch.randn((<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, sample_size, sample_size)).to(<span class="hljs-string">&quot;cuda&quot;</span>)`}}),ds=new g({props:{code:"aW5wdXQlMjAlM0QlMjBub2lzZSUwQSUwQWZvciUyMHQlMjBpbiUyMHNjaGVkdWxlci50aW1lc3RlcHMlM0ElMEElMjAlMjAlMjAlMjB3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbm9pc3lfcmVzaWR1YWwlMjAlM0QlMjBtb2RlbChpbnB1dCUyQyUyMHQpLnNhbXBsZSUwQSUyMCUyMCUyMCUyMHByZXZpb3VzX25vaXN5X3NhbXBsZSUyMCUzRCUyMHNjaGVkdWxlci5zdGVwKG5vaXN5X3Jlc2lkdWFsJTJDJTIwdCUyQyUyMGlucHV0KS5wcmV2X3NhbXBsZSUwQSUyMCUyMCUyMCUyMGlucHV0JTIwJTNEJTIwcHJldmlvdXNfbm9pc3lfc2FtcGxl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">input</span> = noise

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> scheduler.timesteps:
<span class="hljs-meta">... </span>    <span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>        noisy_residual = model(<span class="hljs-built_in">input</span>, t).sample
<span class="hljs-meta">... </span>    previous_noisy_sample = scheduler.step(noisy_residual, t, <span class="hljs-built_in">input</span>).prev_sample
<span class="hljs-meta">... </span>    <span class="hljs-built_in">input</span> = previous_noisy_sample`}}),js=new g({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBaW1hZ2UlMjAlM0QlMjAoaW5wdXQlMjAlMkYlMjAyJTIwJTJCJTIwMC41KS5jbGFtcCgwJTJDJTIwMSklMEFpbWFnZSUyMCUzRCUyMGltYWdlLmNwdSgpLnBlcm11dGUoMCUyQyUyMDIlMkMlMjAzJTJDJTIwMSkubnVtcHkoKSU1QjAlNUQlMEFpbWFnZSUyMCUzRCUyMEltYWdlLmZyb21hcnJheSgoaW1hZ2UlMjAqJTIwMjU1KS5yb3VuZCgpLmFzdHlwZSglMjJ1aW50OCUyMikpJTBBaW1hZ2U=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span>image = (<span class="hljs-built_in">input</span> / <span class="hljs-number">2</span> + <span class="hljs-number">0.5</span>).clamp(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = image.cpu().permute(<span class="hljs-number">0</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">1</span>).numpy()[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.fromarray((image * <span class="hljs-number">255</span>).<span class="hljs-built_in">round</span>().astype(<span class="hljs-string">&quot;uint8&quot;</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>image`}}),Js=new Xp({}),P=new bn({props:{$$slots:{default:[Bp]},$$scope:{ctx:A}}}),bs=new g({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ0xJUFRleHRNb2RlbCUyQyUyMENMSVBUb2tlbml6ZXIlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b2VuY29kZXJLTCUyQyUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTJDJTIwUE5ETVNjaGVkdWxlciUwQSUwQXZhZSUyMCUzRCUyMEF1dG9lbmNvZGVyS0wuZnJvbV9wcmV0cmFpbmVkKCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ2YWUlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQ0xJUFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnRva2VuaXplciUyMiklMEF0ZXh0X2VuY29kZXIlMjAlM0QlMjBDTElQVGV4dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJDb21wVmlzJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS00JTIyJTJDJTIwc3ViZm9sZGVyJTNEJTIydGV4dF9lbmNvZGVyJTIyKSUwQXVuZXQlMjAlM0QlMjBVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTextModel, CLIPTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKL, UNet2DConditionModel, PNDMScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span>vae = AutoencoderKL.from_pretrained(<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, subfolder=<span class="hljs-string">&quot;vae&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = CLIPTokenizer.from_pretrained(<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, subfolder=<span class="hljs-string">&quot;tokenizer&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_encoder = CLIPTextModel.from_pretrained(<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, subfolder=<span class="hljs-string">&quot;text_encoder&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)`}}),ys=new g({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBJTBBc2NoZWR1bGVyJTIwJTNEJTIwVW5pUENNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9wcmV0cmFpbmVkKCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJzY2hlZHVsZXIlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniPCMultistepScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler = UniPCMultistepScheduler.from_pretrained(<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)`}}),ws=new g({props:{code:"dG9yY2hfZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUwQXZhZS50byh0b3JjaF9kZXZpY2UpJTBBdGV4dF9lbmNvZGVyLnRvKHRvcmNoX2RldmljZSklMEF1bmV0LnRvKHRvcmNoX2RldmljZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>torch_device = <span class="hljs-string">&quot;cuda&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>vae.to(torch_device)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_encoder.to(torch_device)
<span class="hljs-meta">&gt;&gt;&gt; </span>unet.to(torch_device)`}}),L=new bn({props:{$$slots:{default:[Sp]},$$scope:{ctx:A}}}),gs=new g({props:{code:"cHJvbXB0JTIwJTNEJTIwJTVCJTIyYSUyMHBob3RvZ3JhcGglMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIyJTVEJTBBaGVpZ2h0JTIwJTNEJTIwNTEyJTIwJTIwJTIzJTIwU3RhYmxlJTIwRGlmZnVzaW9uJUVDJTlEJTk4JTIwJUVBJUI4JUIwJUVCJUIzJUI4JTIwJUVCJTg2JTkyJUVDJTlEJUI0JTBBd2lkdGglMjAlM0QlMjA1MTIlMjAlMjAlMjMlMjBTdGFibGUlMjBEaWZmdXNpb24lRUMlOUQlOTglMjAlRUElQjglQjAlRUIlQjMlQjglMjAlRUIlODQlODglRUIlQjklODQlMEFudW1faW5mZXJlbmNlX3N0ZXBzJTIwJTNEJTIwMjUlMjAlMjAlMjMlMjAlRUIlODUlQjglRUMlOUQlQjQlRUMlQTYlODglMjAlRUMlQTAlOUMlRUElQjElQjAlMjAlRUMlOEElQTQlRUQlODUlOUQlMjAlRUMlODglOTglMEFndWlkYW5jZV9zY2FsZSUyMCUzRCUyMDcuNSUyMCUyMCUyMyUyMGNsYXNzaWZpZXItZnJlZSUyMGd1aWRhbmNlJUVCJUE1JUJDJTIwJUVDJTlDJTg0JUVEJTk1JTlDJTIwc2NhbGUlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCgwKSUyMCUyMCUyMyUyMCVFQyVCNCU4OCVFQSVCOCVCMCUyMCVFQyU5RSVBMCVFQyU5RSVBQyUyMCVFQiU4NSVCOCVFQyU5RCVCNCVFQyVBNiU4OCVFQiVBNSVCQyUyMCVFQyU4MyU5RCVFQyU4NCVCMSVFRCU5NSU5OCVFQiU4QSU5NCUyMHNlZWQlMjBnZW5lcmF0b3IlMEFiYXRjaF9zaXplJTIwJTNEJTIwbGVuKHByb21wdCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = [<span class="hljs-string">&quot;a photograph of an astronaut riding a horse&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>height = <span class="hljs-number">512</span>  <span class="hljs-comment"># Stable Diffusion\uC758 \uAE30\uBCF8 \uB192\uC774</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>width = <span class="hljs-number">512</span>  <span class="hljs-comment"># Stable Diffusion\uC758 \uAE30\uBCF8 \uB108\uBE44</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_inference_steps = <span class="hljs-number">25</span>  <span class="hljs-comment"># \uB178\uC774\uC988 \uC81C\uAC70 \uC2A4\uD15D \uC218</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>guidance_scale = <span class="hljs-number">7.5</span>  <span class="hljs-comment"># classifier-free guidance\uB97C \uC704\uD55C scale</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.manual_seed(<span class="hljs-number">0</span>)  <span class="hljs-comment"># \uCD08\uAE30 \uC7A0\uC7AC \uB178\uC774\uC988\uB97C \uC0DD\uC131\uD558\uB294 seed generator</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>batch_size = <span class="hljs-built_in">len</span>(prompt)`}}),_s=new g({props:{code:"dGV4dF9pbnB1dCUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjBwcm9tcHQlMkMlMjBwYWRkaW5nJTNEJTIybWF4X2xlbmd0aCUyMiUyQyUyMG1heF9sZW5ndGglM0R0b2tlbml6ZXIubW9kZWxfbWF4X2xlbmd0aCUyQyUyMHRydW5jYXRpb24lM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwdGV4dF9lbWJlZGRpbmdzJTIwJTNEJTIwdGV4dF9lbmNvZGVyKHRleHRfaW5wdXQuaW5wdXRfaWRzLnRvKHRvcmNoX2RldmljZSkpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>text_input = tokenizer(
<span class="hljs-meta">... </span>    prompt, padding=<span class="hljs-string">&quot;max_length&quot;</span>, max_length=tokenizer.model_max_length, truncation=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    text_embeddings = text_encoder(text_input.input_ids.to(torch_device))[<span class="hljs-number">0</span>]`}}),Es=new g({props:{code:"bWF4X2xlbmd0aCUyMCUzRCUyMHRleHRfaW5wdXQuaW5wdXRfaWRzLnNoYXBlJTVCLTElNUQlMEF1bmNvbmRfaW5wdXQlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyJTIyJTVEJTIwKiUyMGJhdGNoX3NpemUlMkMlMjBwYWRkaW5nJTNEJTIybWF4X2xlbmd0aCUyMiUyQyUyMG1heF9sZW5ndGglM0RtYXhfbGVuZ3RoJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF1bmNvbmRfZW1iZWRkaW5ncyUyMCUzRCUyMHRleHRfZW5jb2Rlcih1bmNvbmRfaW5wdXQuaW5wdXRfaWRzLnRvKHRvcmNoX2RldmljZSkpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>max_length = text_input.input_ids.shape[-<span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>uncond_input = tokenizer([<span class="hljs-string">&quot;&quot;</span>] * batch_size, padding=<span class="hljs-string">&quot;max_length&quot;</span>, max_length=max_length, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>uncond_embeddings = text_encoder(uncond_input.input_ids.to(torch_device))[<span class="hljs-number">0</span>]`}}),Cs=new g({props:{code:"dGV4dF9lbWJlZGRpbmdzJTIwJTNEJTIwdG9yY2guY2F0KCU1QnVuY29uZF9lbWJlZGRpbmdzJTJDJTIwdGV4dF9lbWJlZGRpbmdzJTVEKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>text_embeddings = torch.cat([uncond_embeddings, text_embeddings])'}}),q=new bn({props:{$$slots:{default:[Fp]},$$scope:{ctx:A}}}),Zs=new g({props:{code:"bGF0ZW50cyUyMCUzRCUyMHRvcmNoLnJhbmRuKCUwQSUyMCUyMCUyMCUyMChiYXRjaF9zaXplJTJDJTIwdW5ldC5pbl9jaGFubmVscyUyQyUyMGhlaWdodCUyMCUyRiUyRiUyMDglMkMlMjB3aWR0aCUyMCUyRiUyRiUyMDgpJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBKSUwQWxhdGVudHMlMjAlM0QlMjBsYXRlbnRzLnRvKHRvcmNoX2RldmljZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>latents = torch.randn(
<span class="hljs-meta">... </span>    (batch_size, unet.in_channels, height // <span class="hljs-number">8</span>, width // <span class="hljs-number">8</span>),
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>latents = latents.to(torch_device)`}}),Is=new g({props:{code:"bGF0ZW50cyUyMCUzRCUyMGxhdGVudHMlMjAqJTIwc2NoZWR1bGVyLmluaXRfbm9pc2Vfc2lnbWE=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>latents = latents * scheduler.init_noise_sigma'}}),$s=new g({props:{code:"ZnJvbSUyMHRxZG0uYXV0byUyMGltcG9ydCUyMHRxZG0lMEElMEFzY2hlZHVsZXIuc2V0X3RpbWVzdGVwcyhudW1faW5mZXJlbmNlX3N0ZXBzKSUwQSUwQWZvciUyMHQlMjBpbiUyMHRxZG0oc2NoZWR1bGVyLnRpbWVzdGVwcyklM0ElMEElMjAlMjAlMjAlMjAlMjMlMjBjbGFzc2lmaWVyLWZyZWUlMjBndWlkYW5jZSVFQiVBNSVCQyUyMCVFQyU4OCU5OCVFRCU5NiU4OSVFRCU5NSU5OCVFQiU4QSU5NCUyMCVFQSVCMiVCRCVFQyU5QSVCMCUyMCVFQiU5MSU5MCVFQiVCMiU4OCVFQyU5RCU5OCUyMGZvcndhcmQlMjBwYXNzJUVCJUE1JUJDJTIwJUVDJTg4JTk4JUVEJTk2JTg5JUVEJTk1JTk4JUVDJUE3JTgwJTIwJUVDJTk1JThBJUVCJThGJTg0JUVCJUExJTlEJTIwbGF0ZW50JUVCJUE1JUJDJTIwJUVEJTk5JTk1JUVDJTlFJUE1LiUwQSUyMCUyMCUyMCUyMGxhdGVudF9tb2RlbF9pbnB1dCUyMCUzRCUyMHRvcmNoLmNhdCglNUJsYXRlbnRzJTVEJTIwKiUyMDIpJTBBJTBBJTIwJTIwJTIwJTIwbGF0ZW50X21vZGVsX2lucHV0JTIwJTNEJTIwc2NoZWR1bGVyLnNjYWxlX21vZGVsX2lucHV0KGxhdGVudF9tb2RlbF9pbnB1dCUyQyUyMHRpbWVzdGVwJTNEdCklMEElMEElMjAlMjAlMjAlMjAlMjMlMjBub2lzZSUyMHJlc2lkdWFsJTIwJUVDJTk4JTg4JUVDJUI4JUExJTBBJTIwJTIwJTIwJTIwd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG5vaXNlX3ByZWQlMjAlM0QlMjB1bmV0KGxhdGVudF9tb2RlbF9pbnB1dCUyQyUyMHQlMkMlMjBlbmNvZGVyX2hpZGRlbl9zdGF0ZXMlM0R0ZXh0X2VtYmVkZGluZ3MpLnNhbXBsZSUwQSUwQSUyMCUyMCUyMCUyMCUyMyUyMGd1aWRhbmNlJTIwJUVDJTg4JTk4JUVEJTk2JTg5JTBBJTIwJTIwJTIwJTIwbm9pc2VfcHJlZF91bmNvbmQlMkMlMjBub2lzZV9wcmVkX3RleHQlMjAlM0QlMjBub2lzZV9wcmVkLmNodW5rKDIpJTBBJTIwJTIwJTIwJTIwbm9pc2VfcHJlZCUyMCUzRCUyMG5vaXNlX3ByZWRfdW5jb25kJTIwJTJCJTIwZ3VpZGFuY2Vfc2NhbGUlMjAqJTIwKG5vaXNlX3ByZWRfdGV4dCUyMC0lMjBub2lzZV9wcmVkX3VuY29uZCklMEElMEElMjAlMjAlMjAlMjAlMjMlMjAlRUMlOUQlQjQlRUMlQTAlODQlMjAlRUIlODUlQjglRUMlOUQlQjQlRUMlQTYlODglMjAlRUMlODMlOTglRUQlOTQlOEMlRUMlOUQlODQlMjAlRUElQjMlODQlRUMlODIlQjAlMjB4X3QlMjAtJTNFJTIweF90LTElMEElMjAlMjAlMjAlMjBsYXRlbnRzJTIwJTNEJTIwc2NoZWR1bGVyLnN0ZXAobm9pc2VfcHJlZCUyQyUyMHQlMkMlMjBsYXRlbnRzKS5wcmV2X3NhbXBsZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> tqdm.auto <span class="hljs-keyword">import</span> tqdm

<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler.set_timesteps(num_inference_steps)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> tqdm(scheduler.timesteps):
<span class="hljs-meta">... </span>    <span class="hljs-comment"># classifier-free guidance\uB97C \uC218\uD589\uD558\uB294 \uACBD\uC6B0 \uB450\uBC88\uC758 forward pass\uB97C \uC218\uD589\uD558\uC9C0 \uC54A\uB3C4\uB85D latent\uB97C \uD655\uC7A5.</span>
<span class="hljs-meta">... </span>    latent_model_input = torch.cat([latents] * <span class="hljs-number">2</span>)

<span class="hljs-meta">... </span>    latent_model_input = scheduler.scale_model_input(latent_model_input, timestep=t)

<span class="hljs-meta">... </span>    <span class="hljs-comment"># noise residual \uC608\uCE21</span>
<span class="hljs-meta">... </span>    <span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>        noise_pred = unet(latent_model_input, t, encoder_hidden_states=text_embeddings).sample

<span class="hljs-meta">... </span>    <span class="hljs-comment"># guidance \uC218\uD589</span>
<span class="hljs-meta">... </span>    noise_pred_uncond, noise_pred_text = noise_pred.chunk(<span class="hljs-number">2</span>)
<span class="hljs-meta">... </span>    noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)

<span class="hljs-meta">... </span>    <span class="hljs-comment"># \uC774\uC804 \uB178\uC774\uC988 \uC0D8\uD50C\uC744 \uACC4\uC0B0 x_t -&gt; x_t-1</span>
<span class="hljs-meta">... </span>    latents = scheduler.step(noise_pred, t, latents).prev_sample`}}),ks=new g({props:{code:"JTIzJTIwbGF0ZW50JUVCJUE1JUJDJTIwJUVDJThBJUE0JUVDJUJDJTgwJUVDJTlEJUJDJUVCJUE3JTgxJUVEJTk1JTk4JUVBJUIzJUEwJTIwdmFlJUVCJUExJTlDJTIwJUVDJTlEJUI0JUVCJUFGJUI4JUVDJUE3JTgwJTIwJUVCJTk0JTk0JUVDJUJEJTk0JUVCJTk0JUE5JTBBbGF0ZW50cyUyMCUzRCUyMDElMjAlMkYlMjAwLjE4MjE1JTIwKiUyMGxhdGVudHMlMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwaW1hZ2UlMjAlM0QlMjB2YWUuZGVjb2RlKGxhdGVudHMpLnNhbXBsZQ==",highlighted:`<span class="hljs-comment"># latent\uB97C \uC2A4\uCF00\uC77C\uB9C1\uD558\uACE0 vae\uB85C \uC774\uBBF8\uC9C0 \uB514\uCF54\uB529</span>
latents = <span class="hljs-number">1</span> / <span class="hljs-number">0.18215</span> * latents
<span class="hljs-keyword">with</span> torch.no_grad():
    image = vae.decode(latents).sample`}}),Gs=new g({props:{code:"aW1hZ2UlMjAlM0QlMjAoaW1hZ2UlMjAlMkYlMjAyJTIwJTJCJTIwMC41KS5jbGFtcCgwJTJDJTIwMSklMEFpbWFnZSUyMCUzRCUyMGltYWdlLmRldGFjaCgpLmNwdSgpLnBlcm11dGUoMCUyQyUyMDIlMkMlMjAzJTJDJTIwMSkubnVtcHkoKSUwQWltYWdlcyUyMCUzRCUyMChpbWFnZSUyMColMjAyNTUpLnJvdW5kKCkuYXN0eXBlKCUyMnVpbnQ4JTIyKSUwQXBpbF9pbWFnZXMlMjAlM0QlMjAlNUJJbWFnZS5mcm9tYXJyYXkoaW1hZ2UpJTIwZm9yJTIwaW1hZ2UlMjBpbiUyMGltYWdlcyU1RCUwQXBpbF9pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>image = (image / <span class="hljs-number">2</span> + <span class="hljs-number">0.5</span>).clamp(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = image.detach().cpu().permute(<span class="hljs-number">0</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">1</span>).numpy()
<span class="hljs-meta">&gt;&gt;&gt; </span>images = (image * <span class="hljs-number">255</span>).<span class="hljs-built_in">round</span>().astype(<span class="hljs-string">&quot;uint8&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pil_images = [Image.fromarray(image) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> images]
<span class="hljs-meta">&gt;&gt;&gt; </span>pil_images[<span class="hljs-number">0</span>]`}}),{c(){f=i("meta"),_=c(),u=i("h1"),V=a("\uD30C\uC774\uD504\uB77C\uC778, \uBAA8\uB378 \uBC0F \uC2A4\uCF00\uC904\uB7EC \uC774\uD574\uD558\uAE30"),E=c(),T=i("p"),M=a("[[colab\uC5D0\uC11C \uC5F4\uAE30]]"),Z=c(),d=i("p"),$=a("\u{1F9E8} Diffusers\uB294 \uC0AC\uC6A9\uC790 \uCE5C\uD654\uC801\uC774\uBA70 \uC720\uC5F0\uD55C \uB3C4\uAD6C \uC0C1\uC790\uB85C, \uC0AC\uC6A9\uC0AC\uB840\uC5D0 \uB9DE\uAC8C diffusion \uC2DC\uC2A4\uD15C\uC744 \uAD6C\uCD95 \uD560 \uC218 \uC788\uB3C4\uB85D \uC124\uACC4\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774 \uB3C4\uAD6C \uC0C1\uC790\uC758 \uD575\uC2EC\uC740 \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uC785\uB2C8\uB2E4. "),Y=i("code"),ot=a("DiffusionPipeline"),ct=a("\uC740 \uD3B8\uC758\uB97C \uC704\uD574 \uC774\uB7EC\uD55C \uAD6C\uC131 \uC694\uC18C\uB97C \uBC88\uB4E4\uB85C \uC81C\uACF5\uD558\uC9C0\uB9CC, \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD84\uB9AC\uD558\uACE0 \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uAC1C\uBCC4\uC801\uC73C\uB85C \uC0AC\uC6A9\uD574 \uC0C8\uB85C\uC6B4 diffusion \uC2DC\uC2A4\uD15C\uC744 \uB9CC\uB4E4 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),Ll=c(),Bs=i("p"),rt=a("\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C\uB294 \uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778\uBD80\uD130 \uC2DC\uC791\uD574 Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778\uAE4C\uC9C0 \uC9C4\uD589\uD558\uBA70 \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uC0AC\uC6A9\uD574 \uCD94\uB860\uC744 \uC704\uD55C diffusion \uC2DC\uC2A4\uD15C\uC744 \uC870\uB9BD\uD558\uB294 \uBC29\uBC95\uC744 \uBC30\uC6C1\uB2C8\uB2E4."),Ol=c(),as=i("h2"),ft=a("\uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778 \uD574\uCCB4\uD558\uAE30"),ql=c(),Ss=i("p"),ut=a("\uD30C\uC774\uD504\uB77C\uC778\uC740 \uCD94\uB860\uC744 \uC704\uD574 \uBAA8\uB378\uC744 \uC2E4\uD589\uD558\uB294 \uBE60\uB974\uACE0 \uC26C\uC6B4 \uBC29\uBC95\uC73C\uB85C, \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uCF54\uB4DC\uAC00 4\uC904 \uC774\uC0C1 \uD544\uC694\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4:"),Kl=c(),U(ns.$$.fragment),se=c(),ps=i("div"),Fs=i("img"),le=c(),zs=i("p"),Mt=a("\uC815\uB9D0 \uC27D\uC2B5\uB2C8\uB2E4. \uADF8\uB7F0\uB370 \uD30C\uC774\uD504\uB77C\uC778\uC740 \uC5B4\uB5BB\uAC8C \uC774\uB807\uAC8C \uD560 \uC218 \uC788\uC5C8\uC744\uAE4C\uC694? \uD30C\uC774\uD504\uB77C\uC778\uC744 \uC138\uBD84\uD654\uD558\uC5EC \uB0B4\uBD80\uC5D0\uC11C \uC5B4\uB5A4 \uC77C\uC774 \uC77C\uC5B4\uB098\uACE0 \uC788\uB294\uC9C0 \uC0B4\uD3B4\uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),ee=c(),R=i("p"),dt=a("\uC704 \uC608\uC2DC\uC5D0\uC11C \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uB294 "),cl=i("code"),Ut=a("UNet2DModel"),jt=a(" \uBAA8\uB378\uACFC "),rl=i("code"),Jt=a("DDPMScheduler"),ht=a("\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC740 \uC6D0\uD558\uB294 \uCD9C\uB825 \uD06C\uAE30\uC758 \uB79C\uB364 \uB178\uC774\uC988\uB97C \uBC1B\uC544 \uBAA8\uB378\uC744 \uC5EC\uB7EC\uBC88 \uD1B5\uACFC\uC2DC\uCF1C \uC774\uBBF8\uC9C0\uC758 \uB178\uC774\uC988\uB97C \uC81C\uAC70\uD569\uB2C8\uB2E4. \uAC01 timestep\uC5D0\uC11C \uBAA8\uB378\uC740 "),fl=i("em"),bt=a("noise residual"),yt=a("\uC744 \uC608\uCE21\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uB294 \uC774\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB178\uC774\uC988\uAC00 \uC801\uC740 \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC740 \uC9C0\uC815\uB41C \uCD94\uB860 \uC2A4\uD15D\uC218\uC5D0 \uB3C4\uB2EC\uD560 \uB54C\uAE4C\uC9C0 \uC774 \uACFC\uC815\uC744 \uBC18\uBCF5\uD569\uB2C8\uB2E4."),te=c(),As=i("p"),wt=a("\uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uBCC4\uB3C4\uB85C \uC0AC\uC6A9\uD558\uC5EC \uD30C\uC774\uD504\uB77C\uC778\uC744 \uB2E4\uC2DC \uC0DD\uC131\uD558\uAE30 \uC704\uD574 \uC790\uCCB4\uC801\uC778 \uB178\uC774\uC988 \uC81C\uAC70 \uD504\uB85C\uC138\uC2A4\uB97C \uC791\uC131\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),ae=c(),C=i("ol"),is=i("li"),ul=i("p"),Tt=a("\uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uBD88\uB7EC\uC635\uB2C8\uB2E4:"),gt=c(),U(ms.$$.fragment),_t=c(),os=i("li"),Ml=i("p"),Et=a("\uB178\uC774\uC988 \uC81C\uAC70 \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD589\uD560 timestep \uC218\uB97C \uC124\uC815\uD569\uB2C8\uB2E4:"),Ct=c(),U(cs.$$.fragment),Vt=c(),rs=i("li"),dl=i("p"),Zt=a("\uC2A4\uCF00\uC904\uB7EC\uC758 timestep\uC744 \uC124\uC815\uD558\uBA74 \uADE0\uB4F1\uD55C \uAC04\uACA9\uC758 \uAD6C\uC131 \uC694\uC18C\uB97C \uAC00\uC9C4 \uD150\uC11C\uAC00 \uC0DD\uC131\uB429\uB2C8\uB2E4.(\uC774 \uC608\uC2DC\uC5D0\uC11C\uB294 50\uAC1C) \uAC01 \uC694\uC18C\uB294 \uBAA8\uB378\uC774 \uC774\uBBF8\uC9C0\uC758 \uB178\uC774\uC988\uB97C \uC81C\uAC70\uD558\uB294 \uC2DC\uAC04 \uAC04\uACA9\uC5D0 \uD574\uB2F9\uD569\uB2C8\uB2E4. \uB098\uC911\uC5D0 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB97C \uB9CC\uB4E4 \uB54C \uC774 \uD150\uC11C\uB97C \uBC18\uBCF5\uD558\uC5EC \uC774\uBBF8\uC9C0\uC758 \uB178\uC774\uC988\uB97C \uC81C\uAC70\uD569\uB2C8\uB2E4:"),vt=c(),U(fs.$$.fragment),It=c(),us=i("li"),Ul=i("p"),$t=a("\uC6D0\uD558\uB294 \uCD9C\uB825\uACFC \uAC19\uC740 \uBAA8\uC591\uC744 \uAC00\uC9C4 \uB79C\uB364 \uB178\uC774\uC988\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4:"),Rt=c(),U(Ms.$$.fragment),kt=c(),F=i("li"),G=i("p"),Gt=a("\uC774\uC81C timestep\uC744 \uBC18\uBCF5\uD558\uB294 \uB8E8\uD504\uB97C \uC791\uC131\uD569\uB2C8\uB2E4. \uAC01 timestep\uC5D0\uC11C \uBAA8\uB378\uC740 "),jl=i("code"),Nt=a("UNet2DModel.forward()"),Qt=a("\uB97C \uD1B5\uD574 noisy residual\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4. \uC2A4\uCF00\uC904\uB7EC\uC758 "),Jl=i("code"),Wt=a("step()"),Dt=a(" \uBA54\uC11C\uB4DC\uB294 noisy residual, timestep, \uADF8\uB9AC\uACE0 \uC785\uB825\uC744 \uBC1B\uC544 \uC774\uC804 timestep\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uC774 \uCD9C\uB825\uC740 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uC758 \uBAA8\uB378\uC5D0 \uB300\uD55C \uB2E4\uC74C \uC785\uB825\uC774 \uB418\uBA70, "),hl=i("code"),Xt=a("timesteps"),Bt=a(" \uBC30\uC5F4\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD560 \uB54C\uAE4C\uC9C0 \uBC18\uBCF5\uB429\uB2C8\uB2E4."),St=c(),U(ds.$$.fragment),Ft=c(),bl=i("p"),zt=a("\uC774\uAC83\uC774 \uC804\uCCB4 \uB178\uC774\uC988 \uC81C\uAC70 \uD504\uB85C\uC138\uC2A4\uC774\uBA70, \uB3D9\uC77C\uD55C \uD328\uD134\uC744 \uC0AC\uC6A9\uD574 \uBAA8\uB4E0 diffusion \uC2DC\uC2A4\uD15C\uC744 \uC791\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),At=c(),Us=i("li"),yl=i("p"),Yt=a("\uB9C8\uC9C0\uB9C9 \uB2E8\uACC4\uB294 \uB178\uC774\uC988\uAC00 \uC81C\uAC70\uB41C \uCD9C\uB825\uC744 \uC774\uBBF8\uC9C0\uB85C \uBCC0\uD658\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4:"),xt=c(),U(js.$$.fragment),ne=c(),v=i("p"),Ht=a("\uB2E4\uC74C \uC139\uC158\uC5D0\uC11C\uB294 \uC5EC\uB7EC\uBD84\uC758 \uAE30\uC220\uC744 \uC2DC\uD5D8\uD574\uBCF4\uACE0 \uC880 \uB354 \uBCF5\uC7A1\uD55C Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD84\uC11D\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4. \uBC29\uBC95\uC740 \uAC70\uC758 \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uD544\uC694\uD55C \uAD6C\uC131\uC694\uC18C\uB4E4\uC744 \uCD08\uAE30\uD654\uD558\uACE0 timestep\uC218\uB97C \uC124\uC815\uD558\uC5EC "),wl=i("code"),Pt=a("timestep"),Lt=a(" \uBC30\uC5F4\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4. \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uC5D0\uC11C "),Tl=i("code"),Ot=a("timestep"),qt=a(" \uBC30\uC5F4\uC774 \uC0AC\uC6A9\uB418\uBA70, \uC774 \uBC30\uC5F4\uC758 \uAC01 \uC694\uC18C\uC5D0 \uB300\uD574 \uBAA8\uB378\uC740 \uB178\uC774\uC988\uAC00 \uC801\uC740 \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB294 "),gl=i("code"),Kt=a("timestep"),sa=a("\uC744 \uBC18\uBCF5\uD558\uACE0 \uAC01 timestep\uC5D0\uC11C noise residual\uC744 \uCD9C\uB825\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uB294 \uC774\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774\uC804 timestep\uC5D0\uC11C \uB178\uC774\uC988\uAC00 \uB35C\uD55C \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uC774 \uD504\uB85C\uC138\uC2A4\uB294 "),_l=i("code"),la=a("timestep"),ea=a(" \uBC30\uC5F4\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD560 \uB54C\uAE4C\uC9C0 \uBC18\uBCF5\uB429\uB2C8\uB2E4."),pe=c(),Ys=i("p"),ta=a("\uD55C\uBC88 \uC0AC\uC6A9\uD574 \uBD05\uC2DC\uB2E4!"),ie=c(),z=i("h2"),x=i("a"),El=i("span"),U(Js.$$.fragment),aa=c(),Cl=i("span"),na=a("Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778 \uD574\uCCB4\uD558\uAE30"),me=c(),H=i("p"),pa=a("Stable Diffusion \uC740 text-to-image "),Vl=i("em"),ia=a("latent diffusion"),ma=a(" \uBAA8\uB378\uC785\uB2C8\uB2E4. latent diffusion \uBAA8\uB378\uC774\uB77C\uACE0 \uBD88\uB9AC\uB294 \uC774\uC720\uB294 \uC2E4\uC81C \uD53D\uC140 \uACF5\uAC04 \uB300\uC2E0 \uC774\uBBF8\uC9C0\uC758 \uC800\uCC28\uC6D0\uC758 \uD45C\uD604\uC73C\uB85C \uC791\uC5C5\uD558\uAE30 \uB54C\uBB38\uC774\uACE0, \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC774 \uB354 \uB192\uC2B5\uB2C8\uB2E4. \uC778\uCF54\uB354\uB294 \uC774\uBBF8\uC9C0\uB97C \uB354 \uC791\uC740 \uD45C\uD604\uC73C\uB85C \uC555\uCD95\uD558\uACE0, \uB514\uCF54\uB354\uB294 \uC555\uCD95\uB41C \uD45C\uD604\uC744 \uB2E4\uC2DC \uC774\uBBF8\uC9C0\uB85C \uBCC0\uD658\uD569\uB2C8\uB2E4. text-to-image \uBAA8\uB378\uC758 \uACBD\uC6B0 \uD14D\uC2A4\uD2B8 \uC784\uBCA0\uB529\uC744 \uC0DD\uC131\uD558\uAE30 \uC704\uD574 tokenizer\uC640 \uC778\uCF54\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC774\uC804 \uC608\uC81C\uC5D0\uC11C \uC774\uBBF8 UNet \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uAC00 \uD544\uC694\uD558\uB2E4\uB294 \uAC83\uC740 \uC54C\uACE0 \uACC4\uC168\uC744 \uAC83\uC785\uB2C8\uB2E4."),oe=c(),xs=i("p"),oa=a("\uBCF4\uC2DC\uB2E4\uC2DC\uD53C, \uC774\uAC83\uC740 UNet \uBAA8\uB378\uB9CC \uD3EC\uD568\uB41C DDPM \uD30C\uC774\uD504\uB77C\uC778\uBCF4\uB2E4 \uB354 \uBCF5\uC7A1\uD569\uB2C8\uB2E4. Stable Diffusion \uBAA8\uB378\uC5D0\uB294 \uC138 \uAC1C\uC758 \uAC1C\uBCC4 \uC0AC\uC804\uD559\uC2B5\uB41C \uBAA8\uB378\uC774 \uC788\uC2B5\uB2C8\uB2E4."),ce=c(),U(P.$$.fragment),re=c(),N=i("p"),ca=a("\uC774\uC81C Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778\uC5D0 \uD544\uC694\uD55C \uAD6C\uC131\uC694\uC18C\uB4E4\uC774 \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC558\uC73C\uB2C8, "),Zl=i("code"),ra=a("from_pretrained()"),fa=a(" \uBA54\uC11C\uB4DC\uB97C \uC0AC\uC6A9\uD574 \uBAA8\uB4E0 \uAD6C\uC131\uC694\uC18C\uB97C \uBD88\uB7EC\uC635\uB2C8\uB2E4. \uC0AC\uC804\uD559\uC2B5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8 "),hs=i("a"),vl=i("code"),ua=a("runwayml/stable-diffusion-v1-5"),Ma=a("\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC73C\uBA70, \uAC01 \uAD6C\uC131\uC694\uC18C\uB4E4\uC740 \uBCC4\uB3C4\uC758 \uD558\uC704 \uD3F4\uB354\uC5D0 \uC800\uC7A5\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4:"),fe=c(),U(bs.$$.fragment),ue=c(),Q=i("p"),da=a("\uAE30\uBCF8 "),Il=i("code"),Ua=a("PNDMScheduler"),ja=a(" \uB300\uC2E0, "),$l=i("code"),Ja=a("UniPCMultistepScheduler"),ha=a("\uB85C \uAD50\uCCB4\uD558\uC5EC \uB2E4\uB978 \uC2A4\uCF00\uC904\uB7EC\uB97C \uC5BC\uB9C8\uB098 \uC27D\uAC8C \uC5F0\uACB0\uD560 \uC218 \uC788\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4:"),Me=c(),U(ys.$$.fragment),de=c(),Hs=i("p"),ba=a("\uCD94\uB860 \uC18D\uB3C4\uB97C \uB192\uC774\uB824\uBA74 \uC2A4\uCF00\uC904\uB7EC\uC640 \uB2EC\uB9AC \uD559\uC2B5 \uAC00\uB2A5\uD55C \uAC00\uC911\uCE58\uAC00 \uC788\uC73C\uBBC0\uB85C \uBAA8\uB378\uC744 GPU\uB85C \uC62E\uAE30\uC138\uC694:"),Ue=c(),U(ws.$$.fragment),je=c(),Ts=i("h3"),ya=a("\uD14D\uC2A4\uD2B8 \uC784\uBCA0\uB529 \uC0DD\uC131\uD558\uAE30"),Je=c(),Ps=i("p"),wa=a("\uB2E4\uC74C \uB2E8\uACC4\uB294 \uC784\uBCA0\uB529\uC744 \uC0DD\uC131\uD558\uAE30 \uC704\uD574 \uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD070\uD654\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC774 \uD14D\uC2A4\uD2B8\uB294 UNet \uBAA8\uB378\uC5D0\uC11C condition\uC73C\uB85C \uC0AC\uC6A9\uB418\uACE0 \uC785\uB825 \uD504\uB86C\uD504\uD2B8\uC640 \uC720\uC0AC\uD55C \uBC29\uD5A5\uC73C\uB85C diffusion \uD504\uB85C\uC138\uC2A4\uB97C \uC870\uC815\uD558\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),he=c(),U(L.$$.fragment),be=c(),Ls=i("p"),Ta=a("\uB2E4\uB978 \uD504\uB86C\uD504\uD2B8\uB97C \uC0DD\uC131\uD558\uACE0 \uC2F6\uB2E4\uBA74 \uC6D0\uD558\uB294 \uD504\uB86C\uD504\uD2B8\uB97C \uC790\uC720\uB86D\uAC8C \uC120\uD0DD\uD558\uC138\uC694!"),ye=c(),U(gs.$$.fragment),we=c(),Os=i("p"),ga=a("\uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD070\uD654\uD558\uACE0 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C \uC784\uBCA0\uB529\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4:"),Te=c(),U(_s.$$.fragment),ge=c(),I=i("p"),_a=a("\uB610\uD55C \uD328\uB529 \uD1A0\uD070\uC758 \uC784\uBCA0\uB529\uC778 "),Rl=i("em"),Ea=a("unconditional \uD14D\uC2A4\uD2B8 \uC784\uBCA0\uB529"),Ca=a("\uC744 \uC0DD\uC131\uD574\uC57C \uD569\uB2C8\uB2E4. \uC774 \uC784\uBCA0\uB529\uC740 \uC870\uAC74\uBD80 "),kl=i("code"),Va=a("text_embeddings"),Za=a("\uACFC \uB3D9\uC77C\uD55C shape("),Gl=i("code"),va=a("batch_size"),Ia=a(" \uADF8\uB9AC\uACE0 "),Nl=i("code"),$a=a("seq_length"),Ra=a(")\uC744 \uAC00\uC838\uC57C \uD569\uB2C8\uB2E4:"),_e=c(),U(Es.$$.fragment),Ee=c(),qs=i("p"),ka=a("\uB450\uBC88\uC758 forward pass\uB97C \uD53C\uD558\uAE30 \uC704\uD574 conditional \uC784\uBCA0\uB529\uACFC unconditional \uC784\uBCA0\uB529\uC744 \uBC30\uCE58(batch)\uB85C \uC5F0\uACB0\uD558\uACA0\uC2B5\uB2C8\uB2E4:"),Ce=c(),U(Cs.$$.fragment),Ve=c(),Vs=i("h3"),Ga=a("\uB79C\uB364 \uB178\uC774\uC988 \uC0DD\uC131"),Ze=c(),O=i("p"),Na=a("\uADF8\uB2E4\uC74C diffusion \uD504\uB85C\uC138\uC2A4\uC758 \uC2DC\uC791\uC810\uC73C\uB85C \uCD08\uAE30 \uB79C\uB364 \uB178\uC774\uC988\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC774\uAC83\uC774 \uC774\uBBF8\uC9C0\uC758 \uC7A0\uC7AC\uC801 \uD45C\uD604\uC774\uBA70 \uC810\uCC28\uC801\uC73C\uB85C \uB178\uC774\uC988\uAC00 \uC81C\uAC70\uB429\uB2C8\uB2E4. \uC774 \uC2DC\uC810\uC5D0\uC11C "),Ql=i("code"),Qa=a("latent"),Wa=a(" \uC774\uBBF8\uC9C0\uB294 \uCD5C\uC885 \uC774\uBBF8\uC9C0 \uD06C\uAE30\uBCF4\uB2E4 \uC791\uC9C0\uB9CC \uB098\uC911\uC5D0 \uBAA8\uB378\uC774 \uC774\uB97C 512x512 \uC774\uBBF8\uC9C0 \uD06C\uAE30\uB85C \uBCC0\uD658\uD558\uBBC0\uB85C \uAD1C\uCC2E\uC2B5\uB2C8\uB2E4."),ve=c(),U(q.$$.fragment),Ie=c(),U(Zs.$$.fragment),$e=c(),vs=i("h3"),Da=a("\uC774\uBBF8\uC9C0 \uB178\uC774\uC988 \uC81C\uAC70"),Re=c(),W=i("p"),Xa=a("\uBA3C\uC800 "),Wl=i("code"),Ba=a("UniPCMultistepScheduler"),Sa=a("\uC640 \uAC19\uC740 \uD5A5\uC0C1\uB41C \uC2A4\uCF00\uC904\uB7EC\uC5D0 \uD544\uC694\uD55C \uB178\uC774\uC988 \uC2A4\uCF00\uC77C \uAC12\uC778 \uCD08\uAE30 \uB178\uC774\uC988 \uBD84\uD3EC "),Dl=i("em"),Fa=a("sigma"),za=a(" \uB85C \uC785\uB825\uC744 \uC2A4\uCF00\uC77C\uB9C1 \uD558\uB294 \uAC83\uBD80\uD130 \uC2DC\uC791\uD569\uB2C8\uB2E4:"),ke=c(),U(Is.$$.fragment),Ge=c(),K=i("p"),Aa=a("\uB9C8\uC9C0\uB9C9 \uB2E8\uACC4\uB294 "),Xl=i("code"),Ya=a("latent"),xa=a("\uC758 \uC21C\uC218\uD55C \uB178\uC774\uC988\uB97C \uC810\uC9C4\uC801\uC73C\uB85C \uD504\uB86C\uD504\uD2B8\uC5D0 \uC124\uBA85\uB41C \uC774\uBBF8\uC9C0\uB85C \uBCC0\uD658\uD558\uB294 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB97C \uC0DD\uC131\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB294 \uC138 \uAC00\uC9C0 \uC791\uC5C5\uC744 \uC218\uD589\uD574\uC57C \uD55C\uB2E4\uB294 \uC810\uC744 \uAE30\uC5B5\uD558\uC138\uC694:"),Ne=c(),D=i("ol"),Bl=i("li"),Ha=a("\uB178\uC774\uC988 \uC81C\uAC70 \uC911\uC5D0 \uC0AC\uC6A9\uD560 \uC2A4\uCF00\uC904\uB7EC\uC758 timesteps\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."),Pa=c(),Sl=i("li"),La=a("timestep\uC744 \uB530\uB77C \uBC18\uBCF5\uD569\uB2C8\uB2E4."),Oa=c(),Fl=i("li"),qa=a("\uAC01 timestep\uC5D0\uC11C UNet \uBAA8\uB378\uC744 \uD638\uCD9C\uD558\uC5EC noise residual\uC744 \uC608\uCE21\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uC5D0 \uC804\uB2EC\uD558\uC5EC \uC774\uC804 \uB178\uC774\uC988 \uC0D8\uD50C\uC744 \uACC4\uC0B0\uD569\uB2C8\uB2E4."),Qe=c(),U($s.$$.fragment),We=c(),Rs=i("h3"),Ka=a("\uC774\uBBF8\uC9C0 \uB514\uCF54\uB529"),De=c(),X=i("p"),sn=a("\uB9C8\uC9C0\uB9C9 \uB2E8\uACC4\uB294 "),zl=i("code"),ln=a("vae"),en=a("\uB97C \uC774\uC6A9\uD558\uC5EC \uC7A0\uC7AC \uD45C\uD604\uC744 \uC774\uBBF8\uC9C0\uB85C \uB514\uCF54\uB529\uD558\uACE0 "),Al=i("code"),tn=a("sample"),an=a("\uACFC \uD568\uAED8 \uB514\uCF54\uB529\uB41C \uCD9C\uB825\uC744 \uC5BB\uB294 \uAC83\uC785\uB2C8\uB2E4:"),Xe=c(),U(ks.$$.fragment),Be=c(),ss=i("p"),nn=a("\uB9C8\uC9C0\uB9C9\uC73C\uB85C \uC774\uBBF8\uC9C0\uB97C "),Yl=i("code"),pn=a("PIL.Image"),mn=a("\uB85C \uBCC0\uD658\uD558\uBA74 \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uB97C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),Se=c(),U(Gs.$$.fragment),Fe=c(),Ns=i("div"),xl=i("img"),ze=c(),Qs=i("h2"),on=a("\uB2E4\uC74C \uB2E8\uACC4"),Ae=c(),Ks=i("p"),cn=a("\uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778\uBD80\uD130 \uBCF5\uC7A1\uD55C \uD30C\uC774\uD504\uB77C\uC778\uAE4C\uC9C0, \uC790\uC2E0\uB9CC\uC758 diffusion \uC2DC\uC2A4\uD15C\uC744 \uC791\uC131\uD558\uB294 \uB370 \uD544\uC694\uD55C \uAC83\uC740 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uBFD0\uC774\uB77C\uB294 \uAC83\uC744 \uC54C \uC218 \uC788\uC5C8\uC2B5\uB2C8\uB2E4. \uC774 \uB8E8\uD504\uB294 \uC2A4\uCF00\uC904\uB7EC\uC758 timesteps\uB97C \uC124\uC815\uD558\uACE0, \uC774\uB97C \uBC18\uBCF5\uD558\uBA70, UNet \uBAA8\uB378\uC744 \uD638\uCD9C\uD558\uC5EC noise residual\uC744 \uC608\uCE21\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uC5D0 \uC804\uB2EC\uD558\uC5EC \uC774\uC804 \uB178\uC774\uC988 \uC0D8\uD50C\uC744 \uACC4\uC0B0\uD558\uB294 \uACFC\uC815\uC744 \uBC88\uAC08\uC544 \uAC00\uBA70 \uC218\uD589\uD574\uC57C \uD569\uB2C8\uB2E4."),Ye=c(),sl=i("p"),rn=a("\uC774\uAC83\uC774 \uBC14\uB85C \u{1F9E8} Diffusers\uAC00 \uC124\uACC4\uB41C \uBAA9\uC801\uC785\uB2C8\uB2E4: \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uC0AC\uC6A9\uD574 \uC790\uC2E0\uB9CC\uC758 diffusion \uC2DC\uC2A4\uD15C\uC744 \uC9C1\uAD00\uC801\uC774\uACE0 \uC27D\uAC8C \uC791\uC131\uD560 \uC218 \uC788\uB3C4\uB85D \uD558\uAE30 \uC704\uD574\uC11C\uC785\uB2C8\uB2E4."),xe=c(),ll=i("p"),fn=a("\uB2E4\uC74C \uB2E8\uACC4\uB97C \uC790\uC720\uB86D\uAC8C \uC9C4\uD589\uD558\uC138\uC694:"),He=c(),ls=i("ul"),Ws=i("li"),un=a("\u{1F9E8} Diffusers\uC5D0 "),el=i("a"),Mn=a("\uD30C\uC774\uD504\uB77C\uC778 \uAD6C\uCD95 \uBC0F \uAE30\uC5EC"),dn=a("\uD558\uB294 \uBC29\uBC95\uC744 \uC54C\uC544\uBCF4\uC138\uC694. \uC5EC\uB7EC\uBD84\uC774 \uC5B4\uB5A4 \uC544\uC774\uB514\uC5B4\uB97C \uB0B4\uB193\uC744\uC9C0 \uAE30\uB300\uB429\uB2C8\uB2E4!"),Un=c(),Ds=i("li"),jn=a("\uB77C\uC774\uBE0C\uB7EC\uB9AC\uC5D0\uC11C "),tl=i("a"),Jn=a("\uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778"),hn=a("\uC744 \uC0B4\uD3B4\uBCF4\uACE0, \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uBCC4\uB3C4\uB85C \uC0AC\uC6A9\uD558\uC5EC \uD30C\uC774\uD504\uB77C\uC778\uC744 \uCC98\uC74C\uBD80\uD130 \uD574\uCCB4\uD558\uACE0 \uBE4C\uB4DC\uD560 \uC218 \uC788\uB294\uC9C0 \uD655\uC778\uD574 \uBCF4\uC138\uC694."),this.h()},l(s){const t=Qp('[data-svelte="svelte-1phssyn"]',document.head);f=m(t,"META",{name:!0,content:!0}),t.forEach(l),_=r(s),u=m(s,"H1",{id:!0});var Hl=o(u);V=n(Hl,"\uD30C\uC774\uD504\uB77C\uC778, \uBAA8\uB378 \uBC0F \uC2A4\uCF00\uC904\uB7EC \uC774\uD574\uD558\uAE30"),Hl.forEach(l),E=r(s),T=m(s,"P",{});var Pl=o(T);M=n(Pl,"[[colab\uC5D0\uC11C \uC5F4\uAE30]]"),Pl.forEach(l),Z=r(s),d=m(s,"P",{});var Xs=o(d);$=n(Xs,"\u{1F9E8} Diffusers\uB294 \uC0AC\uC6A9\uC790 \uCE5C\uD654\uC801\uC774\uBA70 \uC720\uC5F0\uD55C \uB3C4\uAD6C \uC0C1\uC790\uB85C, \uC0AC\uC6A9\uC0AC\uB840\uC5D0 \uB9DE\uAC8C diffusion \uC2DC\uC2A4\uD15C\uC744 \uAD6C\uCD95 \uD560 \uC218 \uC788\uB3C4\uB85D \uC124\uACC4\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774 \uB3C4\uAD6C \uC0C1\uC790\uC758 \uD575\uC2EC\uC740 \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uC785\uB2C8\uB2E4. "),Y=m(Xs,"CODE",{});var Tn=o(Y);ot=n(Tn,"DiffusionPipeline"),Tn.forEach(l),ct=n(Xs,"\uC740 \uD3B8\uC758\uB97C \uC704\uD574 \uC774\uB7EC\uD55C \uAD6C\uC131 \uC694\uC18C\uB97C \uBC88\uB4E4\uB85C \uC81C\uACF5\uD558\uC9C0\uB9CC, \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD84\uB9AC\uD558\uACE0 \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uAC1C\uBCC4\uC801\uC73C\uB85C \uC0AC\uC6A9\uD574 \uC0C8\uB85C\uC6B4 diffusion \uC2DC\uC2A4\uD15C\uC744 \uB9CC\uB4E4 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),Xs.forEach(l),Ll=r(s),Bs=m(s,"P",{});var gn=o(Bs);rt=n(gn,"\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C\uB294 \uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778\uBD80\uD130 \uC2DC\uC791\uD574 Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778\uAE4C\uC9C0 \uC9C4\uD589\uD558\uBA70 \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uC0AC\uC6A9\uD574 \uCD94\uB860\uC744 \uC704\uD55C diffusion \uC2DC\uC2A4\uD15C\uC744 \uC870\uB9BD\uD558\uB294 \uBC29\uBC95\uC744 \uBC30\uC6C1\uB2C8\uB2E4."),gn.forEach(l),Ol=r(s),as=m(s,"H2",{id:!0});var _n=o(as);ft=n(_n,"\uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778 \uD574\uCCB4\uD558\uAE30"),_n.forEach(l),ql=r(s),Ss=m(s,"P",{});var En=o(Ss);ut=n(En,"\uD30C\uC774\uD504\uB77C\uC778\uC740 \uCD94\uB860\uC744 \uC704\uD574 \uBAA8\uB378\uC744 \uC2E4\uD589\uD558\uB294 \uBE60\uB974\uACE0 \uC26C\uC6B4 \uBC29\uBC95\uC73C\uB85C, \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uCF54\uB4DC\uAC00 4\uC904 \uC774\uC0C1 \uD544\uC694\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4:"),En.forEach(l),Kl=r(s),j(ns.$$.fragment,s),se=r(s),ps=m(s,"DIV",{class:!0});var Cn=o(ps);Fs=m(Cn,"IMG",{src:!0,alt:!0}),Cn.forEach(l),le=r(s),zs=m(s,"P",{});var Vn=o(zs);Mt=n(Vn,"\uC815\uB9D0 \uC27D\uC2B5\uB2C8\uB2E4. \uADF8\uB7F0\uB370 \uD30C\uC774\uD504\uB77C\uC778\uC740 \uC5B4\uB5BB\uAC8C \uC774\uB807\uAC8C \uD560 \uC218 \uC788\uC5C8\uC744\uAE4C\uC694? \uD30C\uC774\uD504\uB77C\uC778\uC744 \uC138\uBD84\uD654\uD558\uC5EC \uB0B4\uBD80\uC5D0\uC11C \uC5B4\uB5A4 \uC77C\uC774 \uC77C\uC5B4\uB098\uACE0 \uC788\uB294\uC9C0 \uC0B4\uD3B4\uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),Vn.forEach(l),ee=r(s),R=m(s,"P",{});var es=o(R);dt=n(es,"\uC704 \uC608\uC2DC\uC5D0\uC11C \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uB294 "),cl=m(es,"CODE",{});var Zn=o(cl);Ut=n(Zn,"UNet2DModel"),Zn.forEach(l),jt=n(es," \uBAA8\uB378\uACFC "),rl=m(es,"CODE",{});var vn=o(rl);Jt=n(vn,"DDPMScheduler"),vn.forEach(l),ht=n(es,"\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC740 \uC6D0\uD558\uB294 \uCD9C\uB825 \uD06C\uAE30\uC758 \uB79C\uB364 \uB178\uC774\uC988\uB97C \uBC1B\uC544 \uBAA8\uB378\uC744 \uC5EC\uB7EC\uBC88 \uD1B5\uACFC\uC2DC\uCF1C \uC774\uBBF8\uC9C0\uC758 \uB178\uC774\uC988\uB97C \uC81C\uAC70\uD569\uB2C8\uB2E4. \uAC01 timestep\uC5D0\uC11C \uBAA8\uB378\uC740 "),fl=m(es,"EM",{});var In=o(fl);bt=n(In,"noise residual"),In.forEach(l),yt=n(es,"\uC744 \uC608\uCE21\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uB294 \uC774\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB178\uC774\uC988\uAC00 \uC801\uC740 \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC740 \uC9C0\uC815\uB41C \uCD94\uB860 \uC2A4\uD15D\uC218\uC5D0 \uB3C4\uB2EC\uD560 \uB54C\uAE4C\uC9C0 \uC774 \uACFC\uC815\uC744 \uBC18\uBCF5\uD569\uB2C8\uB2E4."),es.forEach(l),te=r(s),As=m(s,"P",{});var $n=o(As);wt=n($n,"\uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uBCC4\uB3C4\uB85C \uC0AC\uC6A9\uD558\uC5EC \uD30C\uC774\uD504\uB77C\uC778\uC744 \uB2E4\uC2DC \uC0DD\uC131\uD558\uAE30 \uC704\uD574 \uC790\uCCB4\uC801\uC778 \uB178\uC774\uC988 \uC81C\uAC70 \uD504\uB85C\uC138\uC2A4\uB97C \uC791\uC131\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),$n.forEach(l),ae=r(s),C=m(s,"OL",{});var k=o(C);is=m(k,"LI",{});var Le=o(is);ul=m(Le,"P",{});var Rn=o(ul);Tt=n(Rn,"\uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uBD88\uB7EC\uC635\uB2C8\uB2E4:"),Rn.forEach(l),gt=r(Le),j(ms.$$.fragment,Le),Le.forEach(l),_t=r(k),os=m(k,"LI",{});var Oe=o(os);Ml=m(Oe,"P",{});var kn=o(Ml);Et=n(kn,"\uB178\uC774\uC988 \uC81C\uAC70 \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD589\uD560 timestep \uC218\uB97C \uC124\uC815\uD569\uB2C8\uB2E4:"),kn.forEach(l),Ct=r(Oe),j(cs.$$.fragment,Oe),Oe.forEach(l),Vt=r(k),rs=m(k,"LI",{});var qe=o(rs);dl=m(qe,"P",{});var Gn=o(dl);Zt=n(Gn,"\uC2A4\uCF00\uC904\uB7EC\uC758 timestep\uC744 \uC124\uC815\uD558\uBA74 \uADE0\uB4F1\uD55C \uAC04\uACA9\uC758 \uAD6C\uC131 \uC694\uC18C\uB97C \uAC00\uC9C4 \uD150\uC11C\uAC00 \uC0DD\uC131\uB429\uB2C8\uB2E4.(\uC774 \uC608\uC2DC\uC5D0\uC11C\uB294 50\uAC1C) \uAC01 \uC694\uC18C\uB294 \uBAA8\uB378\uC774 \uC774\uBBF8\uC9C0\uC758 \uB178\uC774\uC988\uB97C \uC81C\uAC70\uD558\uB294 \uC2DC\uAC04 \uAC04\uACA9\uC5D0 \uD574\uB2F9\uD569\uB2C8\uB2E4. \uB098\uC911\uC5D0 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB97C \uB9CC\uB4E4 \uB54C \uC774 \uD150\uC11C\uB97C \uBC18\uBCF5\uD558\uC5EC \uC774\uBBF8\uC9C0\uC758 \uB178\uC774\uC988\uB97C \uC81C\uAC70\uD569\uB2C8\uB2E4:"),Gn.forEach(l),vt=r(qe),j(fs.$$.fragment,qe),qe.forEach(l),It=r(k),us=m(k,"LI",{});var Ke=o(us);Ul=m(Ke,"P",{});var Nn=o(Ul);$t=n(Nn,"\uC6D0\uD558\uB294 \uCD9C\uB825\uACFC \uAC19\uC740 \uBAA8\uC591\uC744 \uAC00\uC9C4 \uB79C\uB364 \uB178\uC774\uC988\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4:"),Nn.forEach(l),Rt=r(Ke),j(Ms.$$.fragment,Ke),Ke.forEach(l),kt=r(k),F=m(k,"LI",{});var al=o(F);G=m(al,"P",{});var ts=o(G);Gt=n(ts,"\uC774\uC81C timestep\uC744 \uBC18\uBCF5\uD558\uB294 \uB8E8\uD504\uB97C \uC791\uC131\uD569\uB2C8\uB2E4. \uAC01 timestep\uC5D0\uC11C \uBAA8\uB378\uC740 "),jl=m(ts,"CODE",{});var Qn=o(jl);Nt=n(Qn,"UNet2DModel.forward()"),Qn.forEach(l),Qt=n(ts,"\uB97C \uD1B5\uD574 noisy residual\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4. \uC2A4\uCF00\uC904\uB7EC\uC758 "),Jl=m(ts,"CODE",{});var Wn=o(Jl);Wt=n(Wn,"step()"),Wn.forEach(l),Dt=n(ts," \uBA54\uC11C\uB4DC\uB294 noisy residual, timestep, \uADF8\uB9AC\uACE0 \uC785\uB825\uC744 \uBC1B\uC544 \uC774\uC804 timestep\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uC774 \uCD9C\uB825\uC740 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uC758 \uBAA8\uB378\uC5D0 \uB300\uD55C \uB2E4\uC74C \uC785\uB825\uC774 \uB418\uBA70, "),hl=m(ts,"CODE",{});var Dn=o(hl);Xt=n(Dn,"timesteps"),Dn.forEach(l),Bt=n(ts," \uBC30\uC5F4\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD560 \uB54C\uAE4C\uC9C0 \uBC18\uBCF5\uB429\uB2C8\uB2E4."),ts.forEach(l),St=r(al),j(ds.$$.fragment,al),Ft=r(al),bl=m(al,"P",{});var Xn=o(bl);zt=n(Xn,"\uC774\uAC83\uC774 \uC804\uCCB4 \uB178\uC774\uC988 \uC81C\uAC70 \uD504\uB85C\uC138\uC2A4\uC774\uBA70, \uB3D9\uC77C\uD55C \uD328\uD134\uC744 \uC0AC\uC6A9\uD574 \uBAA8\uB4E0 diffusion \uC2DC\uC2A4\uD15C\uC744 \uC791\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Xn.forEach(l),al.forEach(l),At=r(k),Us=m(k,"LI",{});var st=o(Us);yl=m(st,"P",{});var Bn=o(yl);Yt=n(Bn,"\uB9C8\uC9C0\uB9C9 \uB2E8\uACC4\uB294 \uB178\uC774\uC988\uAC00 \uC81C\uAC70\uB41C \uCD9C\uB825\uC744 \uC774\uBBF8\uC9C0\uB85C \uBCC0\uD658\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4:"),Bn.forEach(l),xt=r(st),j(js.$$.fragment,st),st.forEach(l),k.forEach(l),ne=r(s),v=m(s,"P",{});var B=o(v);Ht=n(B,"\uB2E4\uC74C \uC139\uC158\uC5D0\uC11C\uB294 \uC5EC\uB7EC\uBD84\uC758 \uAE30\uC220\uC744 \uC2DC\uD5D8\uD574\uBCF4\uACE0 \uC880 \uB354 \uBCF5\uC7A1\uD55C Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD84\uC11D\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4. \uBC29\uBC95\uC740 \uAC70\uC758 \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uD544\uC694\uD55C \uAD6C\uC131\uC694\uC18C\uB4E4\uC744 \uCD08\uAE30\uD654\uD558\uACE0 timestep\uC218\uB97C \uC124\uC815\uD558\uC5EC "),wl=m(B,"CODE",{});var Sn=o(wl);Pt=n(Sn,"timestep"),Sn.forEach(l),Lt=n(B," \uBC30\uC5F4\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4. \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uC5D0\uC11C "),Tl=m(B,"CODE",{});var Fn=o(Tl);Ot=n(Fn,"timestep"),Fn.forEach(l),qt=n(B," \uBC30\uC5F4\uC774 \uC0AC\uC6A9\uB418\uBA70, \uC774 \uBC30\uC5F4\uC758 \uAC01 \uC694\uC18C\uC5D0 \uB300\uD574 \uBAA8\uB378\uC740 \uB178\uC774\uC988\uAC00 \uC801\uC740 \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB294 "),gl=m(B,"CODE",{});var zn=o(gl);Kt=n(zn,"timestep"),zn.forEach(l),sa=n(B,"\uC744 \uBC18\uBCF5\uD558\uACE0 \uAC01 timestep\uC5D0\uC11C noise residual\uC744 \uCD9C\uB825\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uB294 \uC774\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774\uC804 timestep\uC5D0\uC11C \uB178\uC774\uC988\uAC00 \uB35C\uD55C \uC774\uBBF8\uC9C0\uB97C \uC608\uCE21\uD569\uB2C8\uB2E4. \uC774 \uD504\uB85C\uC138\uC2A4\uB294 "),_l=m(B,"CODE",{});var An=o(_l);la=n(An,"timestep"),An.forEach(l),ea=n(B," \uBC30\uC5F4\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD560 \uB54C\uAE4C\uC9C0 \uBC18\uBCF5\uB429\uB2C8\uB2E4."),B.forEach(l),pe=r(s),Ys=m(s,"P",{});var Yn=o(Ys);ta=n(Yn,"\uD55C\uBC88 \uC0AC\uC6A9\uD574 \uBD05\uC2DC\uB2E4!"),Yn.forEach(l),ie=r(s),z=m(s,"H2",{class:!0});var lt=o(z);x=m(lt,"A",{id:!0,class:!0,href:!0});var xn=o(x);El=m(xn,"SPAN",{});var Hn=o(El);j(Js.$$.fragment,Hn),Hn.forEach(l),xn.forEach(l),aa=r(lt),Cl=m(lt,"SPAN",{});var Pn=o(Cl);na=n(Pn,"Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778 \uD574\uCCB4\uD558\uAE30"),Pn.forEach(l),lt.forEach(l),me=r(s),H=m(s,"P",{});var et=o(H);pa=n(et,"Stable Diffusion \uC740 text-to-image "),Vl=m(et,"EM",{});var Ln=o(Vl);ia=n(Ln,"latent diffusion"),Ln.forEach(l),ma=n(et," \uBAA8\uB378\uC785\uB2C8\uB2E4. latent diffusion \uBAA8\uB378\uC774\uB77C\uACE0 \uBD88\uB9AC\uB294 \uC774\uC720\uB294 \uC2E4\uC81C \uD53D\uC140 \uACF5\uAC04 \uB300\uC2E0 \uC774\uBBF8\uC9C0\uC758 \uC800\uCC28\uC6D0\uC758 \uD45C\uD604\uC73C\uB85C \uC791\uC5C5\uD558\uAE30 \uB54C\uBB38\uC774\uACE0, \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC774 \uB354 \uB192\uC2B5\uB2C8\uB2E4. \uC778\uCF54\uB354\uB294 \uC774\uBBF8\uC9C0\uB97C \uB354 \uC791\uC740 \uD45C\uD604\uC73C\uB85C \uC555\uCD95\uD558\uACE0, \uB514\uCF54\uB354\uB294 \uC555\uCD95\uB41C \uD45C\uD604\uC744 \uB2E4\uC2DC \uC774\uBBF8\uC9C0\uB85C \uBCC0\uD658\uD569\uB2C8\uB2E4. text-to-image \uBAA8\uB378\uC758 \uACBD\uC6B0 \uD14D\uC2A4\uD2B8 \uC784\uBCA0\uB529\uC744 \uC0DD\uC131\uD558\uAE30 \uC704\uD574 tokenizer\uC640 \uC778\uCF54\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC774\uC804 \uC608\uC81C\uC5D0\uC11C \uC774\uBBF8 UNet \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uAC00 \uD544\uC694\uD558\uB2E4\uB294 \uAC83\uC740 \uC54C\uACE0 \uACC4\uC168\uC744 \uAC83\uC785\uB2C8\uB2E4."),et.forEach(l),oe=r(s),xs=m(s,"P",{});var On=o(xs);oa=n(On,"\uBCF4\uC2DC\uB2E4\uC2DC\uD53C, \uC774\uAC83\uC740 UNet \uBAA8\uB378\uB9CC \uD3EC\uD568\uB41C DDPM \uD30C\uC774\uD504\uB77C\uC778\uBCF4\uB2E4 \uB354 \uBCF5\uC7A1\uD569\uB2C8\uB2E4. Stable Diffusion \uBAA8\uB378\uC5D0\uB294 \uC138 \uAC1C\uC758 \uAC1C\uBCC4 \uC0AC\uC804\uD559\uC2B5\uB41C \uBAA8\uB378\uC774 \uC788\uC2B5\uB2C8\uB2E4."),On.forEach(l),ce=r(s),j(P.$$.fragment,s),re=r(s),N=m(s,"P",{});var nl=o(N);ca=n(nl,"\uC774\uC81C Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778\uC5D0 \uD544\uC694\uD55C \uAD6C\uC131\uC694\uC18C\uB4E4\uC774 \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC558\uC73C\uB2C8, "),Zl=m(nl,"CODE",{});var qn=o(Zl);ra=n(qn,"from_pretrained()"),qn.forEach(l),fa=n(nl," \uBA54\uC11C\uB4DC\uB97C \uC0AC\uC6A9\uD574 \uBAA8\uB4E0 \uAD6C\uC131\uC694\uC18C\uB97C \uBD88\uB7EC\uC635\uB2C8\uB2E4. \uC0AC\uC804\uD559\uC2B5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8 "),hs=m(nl,"A",{href:!0,rel:!0});var Kn=o(hs);vl=m(Kn,"CODE",{});var sp=o(vl);ua=n(sp,"runwayml/stable-diffusion-v1-5"),sp.forEach(l),Kn.forEach(l),Ma=n(nl,"\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC73C\uBA70, \uAC01 \uAD6C\uC131\uC694\uC18C\uB4E4\uC740 \uBCC4\uB3C4\uC758 \uD558\uC704 \uD3F4\uB354\uC5D0 \uC800\uC7A5\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4:"),nl.forEach(l),fe=r(s),j(bs.$$.fragment,s),ue=r(s),Q=m(s,"P",{});var pl=o(Q);da=n(pl,"\uAE30\uBCF8 "),Il=m(pl,"CODE",{});var lp=o(Il);Ua=n(lp,"PNDMScheduler"),lp.forEach(l),ja=n(pl," \uB300\uC2E0, "),$l=m(pl,"CODE",{});var ep=o($l);Ja=n(ep,"UniPCMultistepScheduler"),ep.forEach(l),ha=n(pl,"\uB85C \uAD50\uCCB4\uD558\uC5EC \uB2E4\uB978 \uC2A4\uCF00\uC904\uB7EC\uB97C \uC5BC\uB9C8\uB098 \uC27D\uAC8C \uC5F0\uACB0\uD560 \uC218 \uC788\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4:"),pl.forEach(l),Me=r(s),j(ys.$$.fragment,s),de=r(s),Hs=m(s,"P",{});var tp=o(Hs);ba=n(tp,"\uCD94\uB860 \uC18D\uB3C4\uB97C \uB192\uC774\uB824\uBA74 \uC2A4\uCF00\uC904\uB7EC\uC640 \uB2EC\uB9AC \uD559\uC2B5 \uAC00\uB2A5\uD55C \uAC00\uC911\uCE58\uAC00 \uC788\uC73C\uBBC0\uB85C \uBAA8\uB378\uC744 GPU\uB85C \uC62E\uAE30\uC138\uC694:"),tp.forEach(l),Ue=r(s),j(ws.$$.fragment,s),je=r(s),Ts=m(s,"H3",{id:!0});var ap=o(Ts);ya=n(ap,"\uD14D\uC2A4\uD2B8 \uC784\uBCA0\uB529 \uC0DD\uC131\uD558\uAE30"),ap.forEach(l),Je=r(s),Ps=m(s,"P",{});var np=o(Ps);wa=n(np,"\uB2E4\uC74C \uB2E8\uACC4\uB294 \uC784\uBCA0\uB529\uC744 \uC0DD\uC131\uD558\uAE30 \uC704\uD574 \uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD070\uD654\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC774 \uD14D\uC2A4\uD2B8\uB294 UNet \uBAA8\uB378\uC5D0\uC11C condition\uC73C\uB85C \uC0AC\uC6A9\uB418\uACE0 \uC785\uB825 \uD504\uB86C\uD504\uD2B8\uC640 \uC720\uC0AC\uD55C \uBC29\uD5A5\uC73C\uB85C diffusion \uD504\uB85C\uC138\uC2A4\uB97C \uC870\uC815\uD558\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),np.forEach(l),he=r(s),j(L.$$.fragment,s),be=r(s),Ls=m(s,"P",{});var pp=o(Ls);Ta=n(pp,"\uB2E4\uB978 \uD504\uB86C\uD504\uD2B8\uB97C \uC0DD\uC131\uD558\uACE0 \uC2F6\uB2E4\uBA74 \uC6D0\uD558\uB294 \uD504\uB86C\uD504\uD2B8\uB97C \uC790\uC720\uB86D\uAC8C \uC120\uD0DD\uD558\uC138\uC694!"),pp.forEach(l),ye=r(s),j(gs.$$.fragment,s),we=r(s),Os=m(s,"P",{});var ip=o(Os);ga=n(ip,"\uD14D\uC2A4\uD2B8\uB97C \uD1A0\uD070\uD654\uD558\uACE0 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C \uC784\uBCA0\uB529\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4:"),ip.forEach(l),Te=r(s),j(_s.$$.fragment,s),ge=r(s),I=m(s,"P",{});var S=o(I);_a=n(S,"\uB610\uD55C \uD328\uB529 \uD1A0\uD070\uC758 \uC784\uBCA0\uB529\uC778 "),Rl=m(S,"EM",{});var mp=o(Rl);Ea=n(mp,"unconditional \uD14D\uC2A4\uD2B8 \uC784\uBCA0\uB529"),mp.forEach(l),Ca=n(S,"\uC744 \uC0DD\uC131\uD574\uC57C \uD569\uB2C8\uB2E4. \uC774 \uC784\uBCA0\uB529\uC740 \uC870\uAC74\uBD80 "),kl=m(S,"CODE",{});var op=o(kl);Va=n(op,"text_embeddings"),op.forEach(l),Za=n(S,"\uACFC \uB3D9\uC77C\uD55C shape("),Gl=m(S,"CODE",{});var cp=o(Gl);va=n(cp,"batch_size"),cp.forEach(l),Ia=n(S," \uADF8\uB9AC\uACE0 "),Nl=m(S,"CODE",{});var rp=o(Nl);$a=n(rp,"seq_length"),rp.forEach(l),Ra=n(S,")\uC744 \uAC00\uC838\uC57C \uD569\uB2C8\uB2E4:"),S.forEach(l),_e=r(s),j(Es.$$.fragment,s),Ee=r(s),qs=m(s,"P",{});var fp=o(qs);ka=n(fp,"\uB450\uBC88\uC758 forward pass\uB97C \uD53C\uD558\uAE30 \uC704\uD574 conditional \uC784\uBCA0\uB529\uACFC unconditional \uC784\uBCA0\uB529\uC744 \uBC30\uCE58(batch)\uB85C \uC5F0\uACB0\uD558\uACA0\uC2B5\uB2C8\uB2E4:"),fp.forEach(l),Ce=r(s),j(Cs.$$.fragment,s),Ve=r(s),Vs=m(s,"H3",{id:!0});var up=o(Vs);Ga=n(up,"\uB79C\uB364 \uB178\uC774\uC988 \uC0DD\uC131"),up.forEach(l),Ze=r(s),O=m(s,"P",{});var tt=o(O);Na=n(tt,"\uADF8\uB2E4\uC74C diffusion \uD504\uB85C\uC138\uC2A4\uC758 \uC2DC\uC791\uC810\uC73C\uB85C \uCD08\uAE30 \uB79C\uB364 \uB178\uC774\uC988\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC774\uAC83\uC774 \uC774\uBBF8\uC9C0\uC758 \uC7A0\uC7AC\uC801 \uD45C\uD604\uC774\uBA70 \uC810\uCC28\uC801\uC73C\uB85C \uB178\uC774\uC988\uAC00 \uC81C\uAC70\uB429\uB2C8\uB2E4. \uC774 \uC2DC\uC810\uC5D0\uC11C "),Ql=m(tt,"CODE",{});var Mp=o(Ql);Qa=n(Mp,"latent"),Mp.forEach(l),Wa=n(tt," \uC774\uBBF8\uC9C0\uB294 \uCD5C\uC885 \uC774\uBBF8\uC9C0 \uD06C\uAE30\uBCF4\uB2E4 \uC791\uC9C0\uB9CC \uB098\uC911\uC5D0 \uBAA8\uB378\uC774 \uC774\uB97C 512x512 \uC774\uBBF8\uC9C0 \uD06C\uAE30\uB85C \uBCC0\uD658\uD558\uBBC0\uB85C \uAD1C\uCC2E\uC2B5\uB2C8\uB2E4."),tt.forEach(l),ve=r(s),j(q.$$.fragment,s),Ie=r(s),j(Zs.$$.fragment,s),$e=r(s),vs=m(s,"H3",{id:!0});var dp=o(vs);Da=n(dp,"\uC774\uBBF8\uC9C0 \uB178\uC774\uC988 \uC81C\uAC70"),dp.forEach(l),Re=r(s),W=m(s,"P",{});var il=o(W);Xa=n(il,"\uBA3C\uC800 "),Wl=m(il,"CODE",{});var Up=o(Wl);Ba=n(Up,"UniPCMultistepScheduler"),Up.forEach(l),Sa=n(il,"\uC640 \uAC19\uC740 \uD5A5\uC0C1\uB41C \uC2A4\uCF00\uC904\uB7EC\uC5D0 \uD544\uC694\uD55C \uB178\uC774\uC988 \uC2A4\uCF00\uC77C \uAC12\uC778 \uCD08\uAE30 \uB178\uC774\uC988 \uBD84\uD3EC "),Dl=m(il,"EM",{});var jp=o(Dl);Fa=n(jp,"sigma"),jp.forEach(l),za=n(il," \uB85C \uC785\uB825\uC744 \uC2A4\uCF00\uC77C\uB9C1 \uD558\uB294 \uAC83\uBD80\uD130 \uC2DC\uC791\uD569\uB2C8\uB2E4:"),il.forEach(l),ke=r(s),j(Is.$$.fragment,s),Ge=r(s),K=m(s,"P",{});var at=o(K);Aa=n(at,"\uB9C8\uC9C0\uB9C9 \uB2E8\uACC4\uB294 "),Xl=m(at,"CODE",{});var Jp=o(Xl);Ya=n(Jp,"latent"),Jp.forEach(l),xa=n(at,"\uC758 \uC21C\uC218\uD55C \uB178\uC774\uC988\uB97C \uC810\uC9C4\uC801\uC73C\uB85C \uD504\uB86C\uD504\uD2B8\uC5D0 \uC124\uBA85\uB41C \uC774\uBBF8\uC9C0\uB85C \uBCC0\uD658\uD558\uB294 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB97C \uC0DD\uC131\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uB294 \uC138 \uAC00\uC9C0 \uC791\uC5C5\uC744 \uC218\uD589\uD574\uC57C \uD55C\uB2E4\uB294 \uC810\uC744 \uAE30\uC5B5\uD558\uC138\uC694:"),at.forEach(l),Ne=r(s),D=m(s,"OL",{});var ml=o(D);Bl=m(ml,"LI",{});var hp=o(Bl);Ha=n(hp,"\uB178\uC774\uC988 \uC81C\uAC70 \uC911\uC5D0 \uC0AC\uC6A9\uD560 \uC2A4\uCF00\uC904\uB7EC\uC758 timesteps\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."),hp.forEach(l),Pa=r(ml),Sl=m(ml,"LI",{});var bp=o(Sl);La=n(bp,"timestep\uC744 \uB530\uB77C \uBC18\uBCF5\uD569\uB2C8\uB2E4."),bp.forEach(l),Oa=r(ml),Fl=m(ml,"LI",{});var yp=o(Fl);qa=n(yp,"\uAC01 timestep\uC5D0\uC11C UNet \uBAA8\uB378\uC744 \uD638\uCD9C\uD558\uC5EC noise residual\uC744 \uC608\uCE21\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uC5D0 \uC804\uB2EC\uD558\uC5EC \uC774\uC804 \uB178\uC774\uC988 \uC0D8\uD50C\uC744 \uACC4\uC0B0\uD569\uB2C8\uB2E4."),yp.forEach(l),ml.forEach(l),Qe=r(s),j($s.$$.fragment,s),We=r(s),Rs=m(s,"H3",{id:!0});var wp=o(Rs);Ka=n(wp,"\uC774\uBBF8\uC9C0 \uB514\uCF54\uB529"),wp.forEach(l),De=r(s),X=m(s,"P",{});var ol=o(X);sn=n(ol,"\uB9C8\uC9C0\uB9C9 \uB2E8\uACC4\uB294 "),zl=m(ol,"CODE",{});var Tp=o(zl);ln=n(Tp,"vae"),Tp.forEach(l),en=n(ol,"\uB97C \uC774\uC6A9\uD558\uC5EC \uC7A0\uC7AC \uD45C\uD604\uC744 \uC774\uBBF8\uC9C0\uB85C \uB514\uCF54\uB529\uD558\uACE0 "),Al=m(ol,"CODE",{});var gp=o(Al);tn=n(gp,"sample"),gp.forEach(l),an=n(ol,"\uACFC \uD568\uAED8 \uB514\uCF54\uB529\uB41C \uCD9C\uB825\uC744 \uC5BB\uB294 \uAC83\uC785\uB2C8\uB2E4:"),ol.forEach(l),Xe=r(s),j(ks.$$.fragment,s),Be=r(s),ss=m(s,"P",{});var nt=o(ss);nn=n(nt,"\uB9C8\uC9C0\uB9C9\uC73C\uB85C \uC774\uBBF8\uC9C0\uB97C "),Yl=m(nt,"CODE",{});var _p=o(Yl);pn=n(_p,"PIL.Image"),_p.forEach(l),mn=n(nt,"\uB85C \uBCC0\uD658\uD558\uBA74 \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uB97C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),nt.forEach(l),Se=r(s),j(Gs.$$.fragment,s),Fe=r(s),Ns=m(s,"DIV",{class:!0});var Ep=o(Ns);xl=m(Ep,"IMG",{src:!0}),Ep.forEach(l),ze=r(s),Qs=m(s,"H2",{id:!0});var Cp=o(Qs);on=n(Cp,"\uB2E4\uC74C \uB2E8\uACC4"),Cp.forEach(l),Ae=r(s),Ks=m(s,"P",{});var Vp=o(Ks);cn=n(Vp,"\uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778\uBD80\uD130 \uBCF5\uC7A1\uD55C \uD30C\uC774\uD504\uB77C\uC778\uAE4C\uC9C0, \uC790\uC2E0\uB9CC\uC758 diffusion \uC2DC\uC2A4\uD15C\uC744 \uC791\uC131\uD558\uB294 \uB370 \uD544\uC694\uD55C \uAC83\uC740 \uB178\uC774\uC988 \uC81C\uAC70 \uB8E8\uD504\uBFD0\uC774\uB77C\uB294 \uAC83\uC744 \uC54C \uC218 \uC788\uC5C8\uC2B5\uB2C8\uB2E4. \uC774 \uB8E8\uD504\uB294 \uC2A4\uCF00\uC904\uB7EC\uC758 timesteps\uB97C \uC124\uC815\uD558\uACE0, \uC774\uB97C \uBC18\uBCF5\uD558\uBA70, UNet \uBAA8\uB378\uC744 \uD638\uCD9C\uD558\uC5EC noise residual\uC744 \uC608\uCE21\uD558\uACE0 \uC2A4\uCF00\uC904\uB7EC\uC5D0 \uC804\uB2EC\uD558\uC5EC \uC774\uC804 \uB178\uC774\uC988 \uC0D8\uD50C\uC744 \uACC4\uC0B0\uD558\uB294 \uACFC\uC815\uC744 \uBC88\uAC08\uC544 \uAC00\uBA70 \uC218\uD589\uD574\uC57C \uD569\uB2C8\uB2E4."),Vp.forEach(l),Ye=r(s),sl=m(s,"P",{});var Zp=o(sl);rn=n(Zp,"\uC774\uAC83\uC774 \uBC14\uB85C \u{1F9E8} Diffusers\uAC00 \uC124\uACC4\uB41C \uBAA9\uC801\uC785\uB2C8\uB2E4: \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uC0AC\uC6A9\uD574 \uC790\uC2E0\uB9CC\uC758 diffusion \uC2DC\uC2A4\uD15C\uC744 \uC9C1\uAD00\uC801\uC774\uACE0 \uC27D\uAC8C \uC791\uC131\uD560 \uC218 \uC788\uB3C4\uB85D \uD558\uAE30 \uC704\uD574\uC11C\uC785\uB2C8\uB2E4."),Zp.forEach(l),xe=r(s),ll=m(s,"P",{});var vp=o(ll);fn=n(vp,"\uB2E4\uC74C \uB2E8\uACC4\uB97C \uC790\uC720\uB86D\uAC8C \uC9C4\uD589\uD558\uC138\uC694:"),vp.forEach(l),He=r(s),ls=m(s,"UL",{});var pt=o(ls);Ws=m(pt,"LI",{});var it=o(Ws);un=n(it,"\u{1F9E8} Diffusers\uC5D0 "),el=m(it,"A",{href:!0});var Ip=o(el);Mn=n(Ip,"\uD30C\uC774\uD504\uB77C\uC778 \uAD6C\uCD95 \uBC0F \uAE30\uC5EC"),Ip.forEach(l),dn=n(it,"\uD558\uB294 \uBC29\uBC95\uC744 \uC54C\uC544\uBCF4\uC138\uC694. \uC5EC\uB7EC\uBD84\uC774 \uC5B4\uB5A4 \uC544\uC774\uB514\uC5B4\uB97C \uB0B4\uB193\uC744\uC9C0 \uAE30\uB300\uB429\uB2C8\uB2E4!"),it.forEach(l),Un=r(pt),Ds=m(pt,"LI",{});var mt=o(Ds);jn=n(mt,"\uB77C\uC774\uBE0C\uB7EC\uB9AC\uC5D0\uC11C "),tl=m(mt,"A",{href:!0});var $p=o(tl);Jn=n($p,"\uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778"),$p.forEach(l),hn=n(mt,"\uC744 \uC0B4\uD3B4\uBCF4\uACE0, \uBAA8\uB378\uACFC \uC2A4\uCF00\uC904\uB7EC\uB97C \uBCC4\uB3C4\uB85C \uC0AC\uC6A9\uD558\uC5EC \uD30C\uC774\uD504\uB77C\uC778\uC744 \uCC98\uC74C\uBD80\uD130 \uD574\uCCB4\uD558\uACE0 \uBE4C\uB4DC\uD560 \uC218 \uC788\uB294\uC9C0 \uD655\uC778\uD574 \uBCF4\uC138\uC694."),mt.forEach(l),pt.forEach(l),this.h()},h(){w(f,"name","hf:doc:metadata"),w(f,"content",JSON.stringify(Ap)),w(u,"id",""),w(as,"id",""),Rp(Fs.src,yn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ddpm-cat.png")||w(Fs,"src",yn),w(Fs,"alt","Image of cat created from DDPMPipeline"),w(ps,"class","flex justify-center"),w(x,"id","stable-diffusion"),w(x,"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"),w(x,"href","#stable-diffusion"),w(z,"class","relative group"),w(hs,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),w(hs,"rel","nofollow"),w(Ts,"id",""),w(Vs,"id",""),w(vs,"id",""),w(Rs,"id",""),Rp(xl.src,wn="https://huggingface.co/blog/assets/98_stable_diffusion/stable_diffusion_k_lms.png")||w(xl,"src",wn),w(Ns,"class","flex justify-center"),w(Qs,"id",""),w(el,"href","using-diffusers/#contribute_pipeline"),w(tl,"href","./api/pipelines/overview")},m(s,t){e(document.head,f),p(s,_,t),p(s,u,t),e(u,V),p(s,E,t),p(s,T,t),e(T,M),p(s,Z,t),p(s,d,t),e(d,$),e(d,Y),e(Y,ot),e(d,ct),p(s,Ll,t),p(s,Bs,t),e(Bs,rt),p(s,Ol,t),p(s,as,t),e(as,ft),p(s,ql,t),p(s,Ss,t),e(Ss,ut),p(s,Kl,t),J(ns,s,t),p(s,se,t),p(s,ps,t),e(ps,Fs),p(s,le,t),p(s,zs,t),e(zs,Mt),p(s,ee,t),p(s,R,t),e(R,dt),e(R,cl),e(cl,Ut),e(R,jt),e(R,rl),e(rl,Jt),e(R,ht),e(R,fl),e(fl,bt),e(R,yt),p(s,te,t),p(s,As,t),e(As,wt),p(s,ae,t),p(s,C,t),e(C,is),e(is,ul),e(ul,Tt),e(is,gt),J(ms,is,null),e(C,_t),e(C,os),e(os,Ml),e(Ml,Et),e(os,Ct),J(cs,os,null),e(C,Vt),e(C,rs),e(rs,dl),e(dl,Zt),e(rs,vt),J(fs,rs,null),e(C,It),e(C,us),e(us,Ul),e(Ul,$t),e(us,Rt),J(Ms,us,null),e(C,kt),e(C,F),e(F,G),e(G,Gt),e(G,jl),e(jl,Nt),e(G,Qt),e(G,Jl),e(Jl,Wt),e(G,Dt),e(G,hl),e(hl,Xt),e(G,Bt),e(F,St),J(ds,F,null),e(F,Ft),e(F,bl),e(bl,zt),e(C,At),e(C,Us),e(Us,yl),e(yl,Yt),e(Us,xt),J(js,Us,null),p(s,ne,t),p(s,v,t),e(v,Ht),e(v,wl),e(wl,Pt),e(v,Lt),e(v,Tl),e(Tl,Ot),e(v,qt),e(v,gl),e(gl,Kt),e(v,sa),e(v,_l),e(_l,la),e(v,ea),p(s,pe,t),p(s,Ys,t),e(Ys,ta),p(s,ie,t),p(s,z,t),e(z,x),e(x,El),J(Js,El,null),e(z,aa),e(z,Cl),e(Cl,na),p(s,me,t),p(s,H,t),e(H,pa),e(H,Vl),e(Vl,ia),e(H,ma),p(s,oe,t),p(s,xs,t),e(xs,oa),p(s,ce,t),J(P,s,t),p(s,re,t),p(s,N,t),e(N,ca),e(N,Zl),e(Zl,ra),e(N,fa),e(N,hs),e(hs,vl),e(vl,ua),e(N,Ma),p(s,fe,t),J(bs,s,t),p(s,ue,t),p(s,Q,t),e(Q,da),e(Q,Il),e(Il,Ua),e(Q,ja),e(Q,$l),e($l,Ja),e(Q,ha),p(s,Me,t),J(ys,s,t),p(s,de,t),p(s,Hs,t),e(Hs,ba),p(s,Ue,t),J(ws,s,t),p(s,je,t),p(s,Ts,t),e(Ts,ya),p(s,Je,t),p(s,Ps,t),e(Ps,wa),p(s,he,t),J(L,s,t),p(s,be,t),p(s,Ls,t),e(Ls,Ta),p(s,ye,t),J(gs,s,t),p(s,we,t),p(s,Os,t),e(Os,ga),p(s,Te,t),J(_s,s,t),p(s,ge,t),p(s,I,t),e(I,_a),e(I,Rl),e(Rl,Ea),e(I,Ca),e(I,kl),e(kl,Va),e(I,Za),e(I,Gl),e(Gl,va),e(I,Ia),e(I,Nl),e(Nl,$a),e(I,Ra),p(s,_e,t),J(Es,s,t),p(s,Ee,t),p(s,qs,t),e(qs,ka),p(s,Ce,t),J(Cs,s,t),p(s,Ve,t),p(s,Vs,t),e(Vs,Ga),p(s,Ze,t),p(s,O,t),e(O,Na),e(O,Ql),e(Ql,Qa),e(O,Wa),p(s,ve,t),J(q,s,t),p(s,Ie,t),J(Zs,s,t),p(s,$e,t),p(s,vs,t),e(vs,Da),p(s,Re,t),p(s,W,t),e(W,Xa),e(W,Wl),e(Wl,Ba),e(W,Sa),e(W,Dl),e(Dl,Fa),e(W,za),p(s,ke,t),J(Is,s,t),p(s,Ge,t),p(s,K,t),e(K,Aa),e(K,Xl),e(Xl,Ya),e(K,xa),p(s,Ne,t),p(s,D,t),e(D,Bl),e(Bl,Ha),e(D,Pa),e(D,Sl),e(Sl,La),e(D,Oa),e(D,Fl),e(Fl,qa),p(s,Qe,t),J($s,s,t),p(s,We,t),p(s,Rs,t),e(Rs,Ka),p(s,De,t),p(s,X,t),e(X,sn),e(X,zl),e(zl,ln),e(X,en),e(X,Al),e(Al,tn),e(X,an),p(s,Xe,t),J(ks,s,t),p(s,Be,t),p(s,ss,t),e(ss,nn),e(ss,Yl),e(Yl,pn),e(ss,mn),p(s,Se,t),J(Gs,s,t),p(s,Fe,t),p(s,Ns,t),e(Ns,xl),p(s,ze,t),p(s,Qs,t),e(Qs,on),p(s,Ae,t),p(s,Ks,t),e(Ks,cn),p(s,Ye,t),p(s,sl,t),e(sl,rn),p(s,xe,t),p(s,ll,t),e(ll,fn),p(s,He,t),p(s,ls,t),e(ls,Ws),e(Ws,un),e(Ws,el),e(el,Mn),e(Ws,dn),e(ls,Un),e(ls,Ds),e(Ds,jn),e(Ds,tl),e(tl,Jn),e(Ds,hn),Pe=!0},p(s,[t]){const Hl={};t&2&&(Hl.$$scope={dirty:t,ctx:s}),P.$set(Hl);const Pl={};t&2&&(Pl.$$scope={dirty:t,ctx:s}),L.$set(Pl);const Xs={};t&2&&(Xs.$$scope={dirty:t,ctx:s}),q.$set(Xs)},i(s){Pe||(h(ns.$$.fragment,s),h(ms.$$.fragment,s),h(cs.$$.fragment,s),h(fs.$$.fragment,s),h(Ms.$$.fragment,s),h(ds.$$.fragment,s),h(js.$$.fragment,s),h(Js.$$.fragment,s),h(P.$$.fragment,s),h(bs.$$.fragment,s),h(ys.$$.fragment,s),h(ws.$$.fragment,s),h(L.$$.fragment,s),h(gs.$$.fragment,s),h(_s.$$.fragment,s),h(Es.$$.fragment,s),h(Cs.$$.fragment,s),h(q.$$.fragment,s),h(Zs.$$.fragment,s),h(Is.$$.fragment,s),h($s.$$.fragment,s),h(ks.$$.fragment,s),h(Gs.$$.fragment,s),Pe=!0)},o(s){b(ns.$$.fragment,s),b(ms.$$.fragment,s),b(cs.$$.fragment,s),b(fs.$$.fragment,s),b(Ms.$$.fragment,s),b(ds.$$.fragment,s),b(js.$$.fragment,s),b(Js.$$.fragment,s),b(P.$$.fragment,s),b(bs.$$.fragment,s),b(ys.$$.fragment,s),b(ws.$$.fragment,s),b(L.$$.fragment,s),b(gs.$$.fragment,s),b(_s.$$.fragment,s),b(Es.$$.fragment,s),b(Cs.$$.fragment,s),b(q.$$.fragment,s),b(Zs.$$.fragment,s),b(Is.$$.fragment,s),b($s.$$.fragment,s),b(ks.$$.fragment,s),b(Gs.$$.fragment,s),Pe=!1},d(s){l(f),s&&l(_),s&&l(u),s&&l(E),s&&l(T),s&&l(Z),s&&l(d),s&&l(Ll),s&&l(Bs),s&&l(Ol),s&&l(as),s&&l(ql),s&&l(Ss),s&&l(Kl),y(ns,s),s&&l(se),s&&l(ps),s&&l(le),s&&l(zs),s&&l(ee),s&&l(R),s&&l(te),s&&l(As),s&&l(ae),s&&l(C),y(ms),y(cs),y(fs),y(Ms),y(ds),y(js),s&&l(ne),s&&l(v),s&&l(pe),s&&l(Ys),s&&l(ie),s&&l(z),y(Js),s&&l(me),s&&l(H),s&&l(oe),s&&l(xs),s&&l(ce),y(P,s),s&&l(re),s&&l(N),s&&l(fe),y(bs,s),s&&l(ue),s&&l(Q),s&&l(Me),y(ys,s),s&&l(de),s&&l(Hs),s&&l(Ue),y(ws,s),s&&l(je),s&&l(Ts),s&&l(Je),s&&l(Ps),s&&l(he),y(L,s),s&&l(be),s&&l(Ls),s&&l(ye),y(gs,s),s&&l(we),s&&l(Os),s&&l(Te),y(_s,s),s&&l(ge),s&&l(I),s&&l(_e),y(Es,s),s&&l(Ee),s&&l(qs),s&&l(Ce),y(Cs,s),s&&l(Ve),s&&l(Vs),s&&l(Ze),s&&l(O),s&&l(ve),y(q,s),s&&l(Ie),y(Zs,s),s&&l($e),s&&l(vs),s&&l(Re),s&&l(W),s&&l(ke),y(Is,s),s&&l(Ge),s&&l(K),s&&l(Ne),s&&l(D),s&&l(Qe),y($s,s),s&&l(We),s&&l(Rs),s&&l(De),s&&l(X),s&&l(Xe),y(ks,s),s&&l(Be),s&&l(ss),s&&l(Se),y(Gs,s),s&&l(Fe),s&&l(Ns),s&&l(ze),s&&l(Qs),s&&l(Ae),s&&l(Ks),s&&l(Ye),s&&l(sl),s&&l(xe),s&&l(ll),s&&l(He),s&&l(ls)}}}const Ap={local:"",sections:[{local:"",title:"\uAE30\uBCF8 \uD30C\uC774\uD504\uB77C\uC778 \uD574\uCCB4\uD558\uAE30"},{local:"stable-diffusion",sections:[{local:"",title:"\uD14D\uC2A4\uD2B8 \uC784\uBCA0\uB529 \uC0DD\uC131\uD558\uAE30"},{local:"",title:"\uB79C\uB364 \uB178\uC774\uC988 \uC0DD\uC131"},{local:"",title:"\uC774\uBBF8\uC9C0 \uB178\uC774\uC988 \uC81C\uAC70"},{local:"",title:"\uC774\uBBF8\uC9C0 \uB514\uCF54\uB529"}],title:"Stable Diffusion \uD30C\uC774\uD504\uB77C\uC778 \uD574\uCCB4\uD558\uAE30"},{local:"",title:"\uB2E4\uC74C \uB2E8\uACC4"}],title:"\uD30C\uC774\uD504\uB77C\uC778, \uBAA8\uB378 \uBC0F \uC2A4\uCF00\uC904\uB7EC \uC774\uD574\uD558\uAE30"};function Yp(A){return Wp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Op extends kp{constructor(f){super();Gp(this,f,Yp,zp,Np,{})}}export{Op as default,Ap as metadata};
