import{S as mo,i as no,s as uo,e as o,k as c,w as d,t as i,M as Mo,c as p,d as e,m,a as f,x as y,h as a,b as n,N as Al,G as s,g as r,y as b,q as J,o as h,B as w,v as yo}from"../chunks/vendor-hf-doc-builder.js";import{T as co}from"../chunks/Tip-hf-doc-builder.js";import{I as bo}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as Z}from"../chunks/CodeBlock-hf-doc-builder.js";import{D as Jo}from"../chunks/DocNotebookDropdown-hf-doc-builder.js";function ho(Fl){let u,T,M,_;return{c(){u=o("p"),T=i("\u{1F4A1} GPU\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uB294 \uACBD\uC6B0 \uB2E4\uC74C\uACFC \uAC19\uC740 GPU \uC81C\uACF5\uC5C5\uCCB4\uC5D0\uC11C \uBB34\uB8CC\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!. "),M=o("a"),_=i("Colab"),this.h()},l(G){u=p(G,"P",{});var U=f(u);T=a(U,"\u{1F4A1} GPU\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uB294 \uACBD\uC6B0 \uB2E4\uC74C\uACFC \uAC19\uC740 GPU \uC81C\uACF5\uC5C5\uCCB4\uC5D0\uC11C \uBB34\uB8CC\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!. "),M=p(U,"A",{href:!0,rel:!0});var j=f(M);_=a(j,"Colab"),j.forEach(e),U.forEach(e),this.h()},h(){n(M,"href","https://colab.research.google.com/"),n(M,"rel","nofollow")},m(G,U){r(G,u,U),s(u,T),s(u,M),s(M,_)},d(G){G&&e(u)}}}function wo(Fl){let u,T,M,_,G;return{c(){u=o("p"),T=i("\u{1F4A1} \uD30C\uC774\uD504\uB77C\uC778\uC740 \uD56D\uC0C1 "),M=o("code"),_=i("float16"),G=i("\uC5D0\uC11C \uC2E4\uD589\uD560 \uAC83\uC744 \uAC15\uB825\uD788 \uAD8C\u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,Wi,Ne,ki,Bi,Xs,hl,Ns,le,Vi,gs,wl,Ds,Ul,ge,Ci,Ri,Ss,Zl,zs,V,Xi,De,Ni,gi,Se,Di,Si,Qs,_l,Hs,Q,zi,ze,Qi,Hi,Ps,Gl,As,jl,Qe,Aa,Fs,ee,Pi,Ys,Tl,Ai,xs,H,Fi,He,Yi,xi,Ls,vl,Li,qs,P,qi,El,Ki,Oi,Ks,C,la,Il,ea,sa,$l,ta,ia,Os,Wl,aa,lt,A,ra,kl,oa,pa,et,Bl,st,Vl,Pe,Fa,tt,Cl,fa,it,F,ca,Ae,ma,na,at,Y,Fe,ua,Ma,Ye,da,rt,se,ya,ot,Rl,pt,te,ba,ft,Xl,ct,Nl,xe,Ya,mt,R,Ja,Le,ha,wa,qe,Ua,Za,nt,gl,ut,Dl,Ke,xa,Mt,Sl,_a,dt,x,Ga,Oe,ja,Ta,yt,X,L,ie,va,Ea,zl,ls,Ia,$a,Wa,Ql,ka,ae,Ba,Va,Ca,Hl,Ra,re,Xa,Na,bt;return U=new bo({}),O=new Jo({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/stable_diffusion.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/stable_diffusion.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/stable_diffusion.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/stable_diffusion.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/stable_diffusion.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/stable_diffusion.ipynb"}]}}),sl=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXBpcGVsaW5lJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipeline = DiffusionPipeline.from_pretrained(model_id)`}}),tl=new Z({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIycG9ydHJhaXQlMjBwaG90byUyMG9mJTIwYSUyMG9sZCUyMHdhcnJpb3IlMjBjaGllZiUyMg==",highlighted:'prompt = <span class="hljs-string">&quot;portrait photo of a old warrior chief&quot;</span>'}}),D=new co({props:{$$slots:{default:[ho]},$$scope:{ctx:Fl}}}),al=new Z({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBwaXBlbGluZS50byglMjJjdWRhJTIyKQ==",highlighted:'pipeline = pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)'}}),ol=new Z({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoJTIyY3VkYSUyMikubWFudWFsX3NlZWQoMCk=",highlighted:`<span class="hljs-keyword">import</span> torch

generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)`}}),pl=new Z({props:{code:"aW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`}}),ml=new Z({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlbGluZSUyMCUzRCUyMHBpcGVsaW5lLnRvKCUyMmN1ZGElMjIpJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDApJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`<span class="hljs-keyword">import</span> torch

pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipeline = pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)
generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
image = pipeline(prompt, generator=generator).images[<span class="hljs-number">0</span>]
image`}}),S=new co({props:{$$slots:{default:[wo]},$$scope:{ctx:Fl}}}),ul=new Z({props:{code:"cGlwZWxpbmUuc2NoZWR1bGVyLmNvbXBhdGlibGVzJTBBJTVCJTBBJTIwJTIwJTIwJTIwZGlmZnVzZXJzLnNjaGVkdWxlcnMuc2NoZWR1bGluZ19sbXNfZGlzY3JldGUuTE1TRGlzY3JldGVTY2hlZHVsZXIlMkMlMEElMjAlMjAlMjAlMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX3VuaXBjX211bHRpc3RlcC5VbmlQQ011bHRpc3RlcFNjaGVkdWxlciUyQyUwQSUyMCUyMCUyMCUyMGRpZmZ1c2Vycy5zY2hlZHVsZXJzLnNjaGVkdWxpbmdfa19kcG1fMl9kaXNjcmV0ZS5LRFBNMkRpc2NyZX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YWxfZGlzY3JldGUuRXVsZXJBbmNlc3RyYWxEaXNjcmV0ZVNjaGVkdWxlciUyQyUwQSUyMCUyMCUyMCUyMGRpZmZ1c2Vycy5zY2hlZHVsZXJzLnNjaGVkdWxpbmdfZGRpbS5ERElNU2NoZWR1bGVyJTJDJTBBJTVE",highlighted:`pipeline.scheduler.compatibles
[
    diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler,
    diffusers.schedulers.scheduling_unipc_multistep.UniPCMultistepScheduler,
    diffusers.schedulers.scheduling_k_dpm_2_discrete.KDPM2DiscreteScheduler,
    diffusers.schedulers.scheduling_deis_multistep.DEISMultistepScheduler,
    diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteScheduler,
    diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler,
    diffusers.schedulers.scheduling_ddpm.DDPMScheduler,
    diffusers.schedulers.scheduling_dpmsolver_singlestep.DPMSolverSinglestepScheduler,
    diffusers.schedulers.scheduling_k_dpm_2_ancestral_discrete.KDPM2AncestralDiscreteScheduler,
    diffusers.schedulers.scheduling_heun_discrete.HeunDiscreteScheduler,
    diffusers.schedulers.scheduling_pndm.PNDMScheduler,
    diffusers.schedulers.scheduling_euler_ancestral_discrete.EulerAncestralDiscreteScheduler,
    diffusers.schedulers.scheduling_ddim.DDIMScheduler,
]`}}),Ml=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlciUwQSUwQXBpcGVsaW5lLnNjaGVkdWxlciUyMCUzRCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlbGluZS5zY2hlZHVsZXIuY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DPMSolverMultistepScheduler

pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)`}}),yl=new Z({props:{code:"Z2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDApJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
image = pipeline(prompt, generator=generator, num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
image`}}),hl=new Z({props:{code:"ZGVmJTIwZ2V0X2lucHV0cyhiYXRjaF9zaXplJTNEMSklM0ElMEElMjAlMjAlMjAlMjBnZW5lcmF0b3IlMjAlM0QlMjAlNUJ0b3JjaC5HZW5lcmF0b3IoJTIyY3VkYSUyMikubWFudWFsX3NlZWQoaSklMjBmb3IlMjBpJTIwaW4lMjByYW5nZShiYXRjaF9zaXplKSU1RCUwQSUyMCUyMCUyMCUyMHByb21wdHMlMjAlM0QlMjBiYXRjaF9zaXplJTIwKiUyMCU1QnByb21wdCU1RCUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlMjAlM0QlMjAyMCUwQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMCU3QiUyMnByb21wdCUyMiUzQSUyMHByb21wdHMlMkMlMjAlMjJnZW5lcmF0b3IlMjIlM0ElMjBnZW5lcmF0b3IlMkMlMjAlMjJudW1faW5mZXJlbmNlX3N0ZXBzJTIyJTNBJTIwbnVtX2luZmVyZW5jZV9zdGVwcyU3RA==",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">get_inputs</span>(<span class="hljs-params">batch_size=<span class="hljs-number">1</span></span>):
    generator = [torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(i) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(batch_size)]
    prompts = batch_size * [prompt]
    num_inference_steps = <span class="hljs-number">20</span>

    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;prompt&quot;</span>: prompts, <span class="hljs-string">&quot;generator&quot;</span>: generator, <span class="hljs-string">&quot;num_inference_steps&quot;</span>: num_inference_steps}`}}),wl=new Z({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBJTBBZGVmJTIwaW1hZ2VfZ3JpZChpbWdzJTJDJTIwcm93cyUzRDIlMkMlMjBjb2xzJTNEMiklM0ElMEElMjAlMjAlMjAlMjB3JTJDJTIwaCUyMCUzRCUyMGltZ3MlNUIwJTVELnNpemUlMEElMjAlMjAlMjAlMjBncmlkJTIwJTNEJTIwSW1hZ2UubmV3KCUyMlJHQiUyMiUyQyUyMHNpemUlM0QoY29scyUyMColMjB3JTJDJTIwcm93cyUyMColMjBoKSklMEElMEElMjAlMjAlMjAlMjBmb3IlMjBpJTJDJTIwaW1nJTIwaW4lMjBlbnVtZXJhdGUoaW1ncyklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBncmlkLnBhc3RlKGltZyUyQyUyMGJveCUzRChpJTIwJTI1JTIwY29scyUyMColMjB3JTJDJTIwaSUyMCUyRiUyRiUyMGNvbHMlMjAqJTIwaCkpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwZ3JpZA==",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image


<span class="hljs-keyword">def</span> <span class="hljs-title function_">image_grid</span>(<span class="hljs-params">imgs, rows=<span class="hljs-number">2</span>, cols=<span class="hljs-number">2</span></span>):
    w, h = imgs[<span class="hljs-number">0</span>].size
    grid = Image.new(<span class="hljs-string">&quot;RGB&quot;</span>, size=(cols * w, rows * h))

    <span class="hljs-keyword">for</span> i, img <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(imgs):
        grid.paste(img, box=(i % cols * w, i // cols * h))
    <span class="hljs-keyword">return</span> grid`}}),Zl=new Z({props:{code:"aW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUoKipnZXRfaW5wdXRzKGJhdGNoX3NpemUlM0Q0KSkuaW1hZ2VzJTBBaW1hZ2VfZ3JpZChpbWFnZXMp",highlighted:`images = pipeline(**get_inputs(batch_size=<span class="hljs-number">4</span>)).images
image_grid(images)`}}),_l=new Z({props:{code:"cGlwZWxpbmUuZW5hYmxlX2F0dGVudGlvbl9zbGljaW5nKCk=",highlighted:"pipeline.enable_attention_slicing()"}}),Gl=new Z({props:{code:"aW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUoKipnZXRfaW5wdXRzKGJhdGNoX3NpemUlM0Q4KSkuaW1hZ2VzJTBBaW1hZ2VfZ3JpZChpbWFnZXMlMkMlMjByb3dzJTNEMiUyQyUyMGNvbHMlM0Q0KQ==",highlighted:`images = pipeline(**get_inputs(batch_size=<span class="hljs-number">8</span>)).images
image_grid(images, rows=<span class="hljs-number">2</span>, cols=<span class="hljs-number">4</span>)`}}),Bl=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9lbmNvZGVyS0wlMEElMEF2YWUlMjAlM0QlMjBBdXRvZW5jb2RlcktMLmZyb21fcHJldHJhaW5lZCglMjJzdGFiaWxpdHlhaSUyRnNkLXZhZS1mdC1tc2UlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUudmFlJTIwJTNEJTIwdmFlJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUoKipnZXRfaW5wdXRzKGJhdGNoX3NpemUlM0Q4KSkuaW1hZ2VzJTBBaW1hZ2VfZ3JpZChpbWFnZXMlMkMlMjByb3dzJTNEMiUyQyUyMGNvbHMlM0Q0KQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKL

vae = AutoencoderKL.from_pretrained(<span class="hljs-string">&quot;stabilityai/sd-vae-ft-mse&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.vae = vae
images = pipeline(**get_inputs(batch_size=<span class="hljs-number">8</span>)).images
image_grid(images, rows=<span class="hljs-number">2</span>, cols=<span class="hljs-number">4</span>)`}}),Rl=new Z({props:{code:"cHJvbXB0JTIwJTJCJTNEJTIwJTIyJTJDJTIwdHJpYmFsJTIwcGFudGhlciUyMG1ha2UlMjB1cCUyQyUyMGJsdWUlMjBvbiUyMHJlZCUyQyUyMHNpZGUlMjBwcm9maWxlJTJDJTIwbG9va2luZyUyMGF3YXklMkMlMjBzZXJpb3VzJTIwZXllcyUyMiUwQXByb21wdCUyMCUyQiUzRCUyMCUyMiUyMDUwbW0lMjBwb3J0cmFpdCUyMHBob3RvZ3JhcGh5JTJDJTIwaGFyZCUyMHJpbSUyMGxpZ2h0aW5nJTIwcGhvdG9ncmFwaHktLWJldGElMjAtLWFyJTIwMiUzQTMlMjAlMjAtLWJldGElMjAtLXVwYmV0YSUyMg==",highlighted:`prompt += <span class="hljs-string">&quot;, tribal panther make up, blue on red, side profile, looking away, serious eyes&quot;</span>
prompt += <span class="hljs-string">&quot; 50mm portrait photography, hard rim lighting photography--beta --ar 2:3  --beta --upbeta&quot;</span>`}}),Xl=new Z({props:{code:"aW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUoKipnZXRfaW5wdXRzKGJhdGNoX3NpemUlM0Q4KSkuaW1hZ2VzJTBBaW1hZ2VfZ3JpZChpbWFnZXMlMkMlMjByb3dzJTNEMiUyQyUyMGNvbHMlM0Q0KQ==",highlighted:`images = pipeline(**get_inputs(batch_size=<span class="hljs-number">8</span>)).images
image_grid(images, rows=<span class="hljs-number">2</span>, cols=<span class="hljs-number">4</span>)`}}),gl=new Z({props:{code:"cHJvbXB0cyUyMCUzRCUyMCU1QiUwQSUyM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yMHBvcnRyYWl0JTIwcGhvdG9ncmFwaHklMkMlMjBoYXJkJTIwcmltJTIwbGlnaHRpbmclMjBwaG90b2dyYXBoeS0tYmV0YSUyMC0tYXIlMjAyJTNBMyUyMCUyMC0tYmV0YSUyMC0tdXBiZXRhJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIycG9ydHJhaXQlMjBwaG90byUyMG9mJTIwYSUyMHlvdW5nJTIwd2FycmlvciUyMGNoaWVmJTJDJTIwdHJpYmFsJTIwcGFudGhlciUyMG1ha2UlMjB1cCUyQyUyMGJsdWUlMjBvbiUyMHJlZCUyQyUyMHNpZGUlMjBwcm9maWxlJTJDJTIwbG9va2luZyUyMGF3YXklMkMlMjBzZXJpb3VzJTIwZXllcyUyMDUwbW0lMjBwb3J0cmFpdCUyMHBob3RvZ3JhcGh5JTJDJTIwaGFyZCUyMHJpbSUyMGxpZ2h0aW5nJTIwcGhvdG9ncmFwaHktLWJldGElMjAtLWFyJTIwMiUzQTMlMjAlMjAtLWJldGElMjAtLXVwYmV0YSUyMiUyQyUwQSU1RCUwQSUwQWdlbmVyYXRvciUyMCUzRCUyMCU1QnRvcmNoLkdlbmVyYXRvciglMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgxKSUyMGZvciUyMF8lMjBpbiUyMHJhbmdlKGxlbihwcm9tcHRzKSklNUQlMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlM0Rwcm9tcHRzJTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDI1KS5pbWFnZXMlMEFpbWFnZV9ncmlkKGltYWdlcyk=",highlighted:`prompts = [
    <span class="hljs-string">&quot;portrait photo of the oldest warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes 50mm portrait photography, hard rim lighting photography--beta --ar 2:3  --beta --upbeta&quot;</span>,
    <span class="hljs-string">&quot;portrait photo of a old warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes 50mm portrait photography, hard rim lighting photography--beta --ar 2:3  --beta --upbeta&quot;</span>,
    <span class="hljs-string">&quot;portrait photo of a warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes 50mm portrait photography, hard rim lighting photography--beta --ar 2:3  --beta --upbeta&quot;</span>,
    <span class="hljs-string">&quot;portrait photo of a young warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes 50mm portrait photography, hard rim lighting photography--beta --ar 2:3  --beta --upbeta&quot;</span>,
]

generator = [torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">1</span>) <span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-built_in">len</span>(prompts))]
images = pipeline(prompt=prompts, generator=generator, num_inference_steps=<span class="hljs-number">25</span>).images
image_grid(images)`}}),{c(){u=o("meta"),T=c(),M=o("h1"),_=o("a"),G=o("span"),d(U.$$.fragment),j=c(),N=o("span"),It=i("\uD6A8\uACFC\uC801\uC774\uACE0 \uD6A8\uC728\uC801\uC778 Diffusion"),ts=c(),d(O.$$.fragment),is=c(),I=o("p"),$t=i("\uD2B9\uC815 \uC2A4\uD0C0\uC77C\uB85C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uC6D0\uD558\uB294 \uB0B4\uC6A9\uC744 \uD3EC\uD568\uD558\uB3C4\uB85D"),ye=o("code"),Wt=i("DiffusionPipeline"),kt=i("\uC744 \uC124\uC815\uD558\uB294 \uAC83\uC740 \uAE4C\uB2E4\uB85C\uC6B8 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC885\uC885 \uB9CC\uC871\uC2A4\uB7EC\uC6B4 \uC774\uBBF8\uC9C0\uB97C \uC5BB\uAE30\uAE4C\uC9C0 "),be=o("code"),Bt=i("DiffusionPipeline"),Vt=i("\uC744 \uC5EC\uB7EC \uBC88 \uC2E4\uD589\uD574\uC57C \uD558\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uBB34\uC5D0\uC11C \uC720\uB97C \uCC3D\uC870\uD558\uB294 \uAC83\uC740 \uD2B9\uD788 \uCD94\uB860\uC744 \uBC18\uBCF5\uD574\uC11C \uC2E4\uD589\uD558\uB294 \uACBD\uC6B0 \uACC4\uC0B0 \uC9D1\uC57D\uC801\uC778 \uD504\uB85C\uC138\uC2A4\uC785\uB2C8\uB2E4."),as=c(),$=o("p"),Ct=i("\uADF8\uB807\uAE30 \uB54C\uBB38\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),Je=o("em"),Rt=i("\uACC4\uC0B0"),Xt=i("(\uC18D\uB3C4) \uBC0F "),he=o("em"),Nt=i("\uBA54\uBAA8\uB9AC"),gt=i("(GPU RAM) \uD6A8\uC728\uC131\uC744 \uADF9\uB300\uD654\uD558\uC5EC \uCD94\uB860 \uC8FC\uAE30 \uC0AC\uC774\uC758 \uC2DC\uAC04\uC744 \uB2E8\uCD95\uD558\uC5EC \uB354 \uBE60\uB974\uAC8C \uBC18\uBCF5\uD560 \uC218 \uC788\uB3C4\uB85D \uD558\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4."),rs=c(),g=o("p"),Dt=i("\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C\uB294 "),we=o("code"),St=i("DiffusionPipeline"),zt=i("\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB354 \uBE60\uB974\uACE0 \uD6A8\uACFC\uC801\uC73C\uB85C \uC0DD\uC131\uD558\uB294 \uBC29\uBC95\uC744 \uC548\uB0B4\uD569\uB2C8\uB2E4."),os=c(),ll=o("p"),el=o("a"),Ue=o("code"),Qt=i("runwayml/stable-diffusion-v1-5"),Ht=i(" \uBAA8\uB378\uC744 \uBD88\uB7EC\uC640\uC11C \uC2DC\uC791\uD569\uB2C8\uB2E4:"),ps=c(),d(sl.$$.fragment),fs=c(),Yl=o("p"),Pt=i("\uC608\uC81C \uD504\uB86C\uD504\uD2B8\uB294 \u201Cportrait of an old warrior chief\u201D \uC774\uC9C0\uB9CC, \uC790\uC720\uB86D\uAC8C \uC790\uC2E0\uB9CC\uC758 \uD504\uB86C\uD504\uD2B8\uB97C \uC0AC\uC6A9\uD574\uB3C4 \uB429\uB2C8\uB2E4:"),cs=c(),d(tl.$$.fragment),ms=c(),il=o("h2"),At=i("\uC18D\uB3C4"),ns=c(),d(D.$$.fragment),us=c(),xl=o("p"),Ft=i("\uCD94\uB860 \uC18D\uB3C4\uB97C \uB192\uC774\uB294 \uAC00\uC7A5 \uAC04\uB2E8\uD55C \uBC29\uBC95 \uC911 \uD558\uB098\uB294 Pytorch \uBAA8\uB4C8\uC744 \uC0AC\uC6A9\uD560 \uB54C\uC640 \uAC19\uC740 \uBC29\uC2DD\uC73C\uB85C GPU\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBC30\uCE58\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4:"),Ms=c(),d(al.$$.fragment),ds=c(),W=o("p"),Yt=i("\uB3D9\uC77C\uD55C \uC774\uBBF8\uC9C0\uB97C \uC0AC\uC6A9\uD558\uACE0 \uAC1C\uC120\uD560 \uC218 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uB824\uBA74 "),rl=o("a"),Ze=o("code"),xt=i("Generator"),Lt=i("\uB97C \uC0AC\uC6A9\uD558\uACE0 "),Ll=o("a"),qt=i("\uC7AC\uD604\uC131"),Kt=i("\uC5D0 \uB300\uD55C \uC2DC\uB4DC\uB97C \uC124\uC815\uD558\uC138\uC694:"),ys=c(),d(ol.$$.fragment),bs=c(),ql=o("p"),Ot=i("\uC774\uC81C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Js=c(),d(pl.$$.fragment),hs=c(),fl=o("div"),_e=o("img"),ws=c(),v=o("p"),li=i("\uC774 \uD504\uB85C\uC138\uC2A4\uB294 T4 GPU\uC5D0\uC11C \uC57D 30\uCD08\uAC00 \uC18C\uC694\uB418\uC5C8\uC2B5\uB2C8\uB2E4(\uD560\uB2F9\uB41C GPU\uAC00 T4\uBCF4\uB2E4 \uB098\uC740 \uACBD\uC6B0 \uB354 \uBE60\uB97C \uC218 \uC788\uC74C). \uAE30\uBCF8\uC801\uC73C\uB85C "),Ge=o("code"),ei=i("DiffusionPipeline"),si=i("\uC740 50\uAC1C\uC758 \uCD94\uB860 \uB2E8\uACC4\uC5D0 \uB300\uD574 \uC804\uCCB4 "),je=o("code"),ti=i("float32"),ii=i(" \uC815\uBC00\uB3C4\uB85C \uCD94\uB860\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4. "),Te=o("code"),ai=i("float16"),ri=i("\uACFC \uAC19\uC740 \uB354 \uB0AE\uC740 \uC815\uBC00\uB3C4\uB85C \uC804\uD658\uD558\uAC70\uB098 \uCD94\uB860 \uB2E8\uACC4\uB97C \uB354 \uC801\uAC8C \uC2E4\uD589\uD558\uC5EC \uC18D\uB3C4\uB97C \uB192\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Us=c(),cl=o("p"),ve=o("code"),oi=i("float16"),pi=i("\uC73C\uB85C \uBAA8\uB378\uC744 \uB85C\uB4DC\uD558\uACE0 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),Zs=c(),d(ml.$$.fragment),_s=c(),nl=o("div"),Ee=o("img"),Gs=c(),Kl=o("p"),fi=i("\uC774\uBC88\uC5D0\uB294 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uC57D 11\uCD08\uBC16\uC5D0 \uAC78\uB9AC\uC9C0 \uC54A\uC544 \uC774\uC804\uBCF4\uB2E4 3\uBC30 \uAC00\uAE4C\uC774 \uBE68\uB77C\uC84C\uC2B5\uB2C8\uB2E4!"),js=c(),d(S.$$.fragment),Ts=c(),k=o("p"),ci=i("\uB610 \uB2E4\uB978 \uC635\uC158\uC740 \uCD94\uB860 \uB2E8\uACC4\uC758 \uC218\uB97C \uC904\uC774\uB294 \uAC83\uC785\uB2C8\uB2E4. \uBCF4\uB2E4 \uD6A8\uC728\uC801\uC778 \uC2A4\uCF00\uC904\uB7EC\uB97C \uC120\uD0DD\uD558\uBA74 \uCD9C\uB825 \uD488\uC9C8 \uC800\uD558 \uC5C6\uC774 \uB2E8\uACC4 \uC218\uB97C \uC904\uC774\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD604\uC7AC \uBAA8\uB378\uACFC \uD638\uD658\uB418\uB294 \uC2A4\uCF00\uC904\uB7EC\uB294 "),Ie=o("code"),mi=i("compatibles"),ni=i(" \uBA54\uC11C\uB4DC\uB97C \uD638\uCD9C\uD558\uC5EC "),$e=o("code"),ui=i("DiffusionPipeline"),Mi=i("\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),vs=c(),d(ul.$$.fragment),Es=c(),E=o("p"),di=i("Stable Diffusion \uBAA8\uB378\uC740 \uC77C\uBC18\uC801\uC73C\uB85C \uC57D 50\uAC1C\uC758 \uCD94\uB860 \uB2E8\uACC4\uAC00 \uD544\uC694\uD55C "),We=o("code"),yi=i("PNDMScheduler"),bi=i("\uB97C \uAE30\uBCF8\uC73C\uB85C \uC0AC\uC6A9\uD558\uC9C0\uB9CC, "),ke=o("code"),Ji=i("DPMSolverMultistepScheduler"),hi=i("\uC640 \uAC19\uC774 \uC131\uB2A5\uC774 \uB354 \uB6F0\uC5B4\uB09C \uC2A4\uCF00\uC904\uB7EC\uB294 \uC57D 20\uAC1C \uB610\uB294 25\uAC1C\uC758 \uCD94\uB860 \uB2E8\uACC4\uB9CC \uD544\uC694\uB85C \uD569\uB2C8\uB2E4. \uC0C8 \uC2A4\uCF00\uC904\uB7EC\uB97C \uB85C\uB4DC\uD558\uB824\uBA74 "),Be=o("code"),wi=i("ConfigMixin.from_config()"),Ui=i(" \uBA54\uC11C\uB4DC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4:"),Is=c(),d(Ml.$$.fragment),$s=c(),dl=o("p"),Ve=o("code"),Zi=i("num_inference_steps"),_i=i("\uB97C 20\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4:"),Ws=c(),d(yl.$$.fragment),ks=c(),bl=o("div"),Ce=o("img"),Bs=c(),Ol=o("p"),Gi=i("\uCD94\uB860\uC2DC\uAC04\uC744 4\uCD08\uB85C \uB2E8\uCD95\uD560 \uC218 \uC788\uC5C8\uC2B5\uB2C8\uB2E4! \u26A1\uFE0F"),Vs=c(),Jl=o("h2"),ji=i("\uBA54\uBAA8\uB9AC"),Cs=c(),z=o("p"),Ti=i("\uD30C\uC774\uD504\uB77C\uC778 \uC131\uB2A5 \uD5A5\uC0C1\uC758 \uB610 \uB2E4\uB978 \uD575\uC2EC\uC740 \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC744 \uC904\uC774\uB294 \uAC83\uC778\uB370, \uCD08\uB2F9 \uC0DD\uC131\uB418\uB294 \uC774\uBBF8\uC9C0 \uC218\uB97C \uCD5C\uB300\uD654\uD558\uB824\uACE0 \uD558\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uAE30 \uB54C\uBB38\uC5D0 \uAC04\uC811\uC801\uC73C\uB85C \uB354 \uBE60\uB978 \uC18D\uB3C4\uB97C \uC758\uBBF8\uD569\uB2C8\uB2E4. \uD55C \uBC88\uC5D0 \uC0DD\uC131\uD560 \uC218 \uC788\uB294 \uC774\uBBF8\uC9C0 \uC218\uB97C \uD655\uC778\uD558\uB294 \uAC00\uC7A5 \uC26C\uC6B4 \uBC29\uBC95\uC740 "),Re=o("code"),vi=i("OutOfMemoryError"),Ei=i("(OOM)\uC774 \uBC1C\uC0DD\uD560 \uB54C\uAE4C\uC9C0 \uB2E4\uC591\uD55C \uBC30\uCE58 \uD06C\uAE30\uB97C \uC2DC\uB3C4\uD574 \uBCF4\uB294 \uAC83\uC785\uB2C8\uB2E4."),Rs=c(),B=o("p"),Ii=i("\uD504\uB86C\uD504\uD2B8 \uBAA9\uB85D\uACFC "),Xe=o("code"),$i=i("Generators"),Wi=i("\uC5D0\uC11C \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uC0DD\uC131\uD558\uB294 \uD568\uC218\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uC88B\uC740 \uACB0\uACFC\uB97C \uC0DD\uC131\uD558\uB294 \uACBD\uC6B0 \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D \uAC01 "),Ne=o("code"),ki=i("Generator"),Bi=i("\uC5D0 \uC2DC\uB4DC\uB97C \uD560\uB2F9\uD574\uC57C \uD569\uB2C8\uB2E4."),Xs=c(),d(hl.$$.fragment),Ns=c(),le=o("p"),Vi=i("\uB610\uD55C \uAC01 \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uBCF4\uC5EC\uC8FC\uB294 \uAE30\uB2A5\uC774 \uD544\uC694\uD569\uB2C8\uB2E4:"),gs=c(),d(wl.$$.fragment),Ds=c(),Ul=o("p"),ge=o("code"),Ci=i("batch_size=4"),Ri=i("\uBD80\uD130 \uC2DC\uC791\uD574 \uC5BC\uB9C8\uB098 \uB9CE\uC740 \uBA54\uBAA8\uB9AC\uB97C \uC18C\uBE44\uD588\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4:"),Ss=c(),d(Zl.$$.fragment),zs=c(),V=o("p"),Xi=i("RAM\uC774 \uB354 \uB9CE\uC740 GPU\uAC00 \uC544\uB2C8\uB77C\uBA74 \uC704\uC758 \uCF54\uB4DC\uC5D0\uC11C "),De=o("code"),Ni=i("OOM"),gi=i(" \uC624\uB958\uAC00 \uBC18\uD658\uB418\uC5C8\uC744 \uAC83\uC785\uB2C8\uB2E4! \uB300\uBD80\uBD84\uC758 \uBA54\uBAA8\uB9AC\uB294 cross-attention \uB808\uC774\uC5B4\uAC00 \uCC28\uC9C0\uD569\uB2C8\uB2E4. \uC774 \uC791\uC5C5\uC744 \uBC30\uCE58\uB85C \uC2E4\uD589\uD558\uB294 \uB300\uC2E0 \uC21C\uCC28\uC801\uC73C\uB85C \uC2E4\uD589\uD558\uBA74 \uC0C1\uB2F9\uD55C \uC591\uC758 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC744 \uAD6C\uC131\uD558\uC5EC "),Se=o("code"),Di=i("enable_attention_slicing()"),Si=i(" \uD568\uC218\uB97C \uC0AC\uC6A9\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4:"),Qs=c(),d(_l.$$.fragment),Hs=c(),Q=o("p"),zi=i("\uC774\uC81C "),ze=o("code"),Qi=i("batch_size"),Hi=i("\uB97C 8\uB85C \uB298\uB824\uBCF4\uC138\uC694!"),Ps=c(),d(Gl.$$.fragment),As=c(),jl=o("div"),Qe=o("img"),Fs=c(),ee=o("p"),Pi=i("\uC774\uC804\uC5D0\uB294 4\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uBC30\uCE58\uB85C \uC0DD\uC131\uD560 \uC218\uB3C4 \uC5C6\uC5C8\uC9C0\uB9CC, \uC774\uC81C\uB294 \uC774\uBBF8\uC9C0\uB2F9 \uC57D 3.5\uCD08 \uB9CC\uC5D0 8\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uBC30\uCE58\uB85C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4! \uC774\uB294 \uC544\uB9C8\uB3C4 \uD488\uC9C8 \uC800\uD558 \uC5C6\uC774 T4 GPU\uC5D0\uC11C \uAC00\uC7A5 \uBE60\uB978 \uC18D\uB3C4\uC77C \uAC83\uC785\uB2C8\uB2E4."),Ys=c(),Tl=o("h2"),Ai=i("\uD488\uC9C8"),xs=c(),H=o("p"),Fi=i("\uC9C0\uB09C \uB450 \uC139\uC158\uC5D0\uC11C\uB294 "),He=o("code"),Yi=i("fp16"),xi=i("\uC744 \uC0AC\uC6A9\uD558\uC5EC \uD30C\uC774\uD504\uB77C\uC778\uC758 \uC18D\uB3C4\uB97C \uCD5C\uC801\uD654\uD558\uACE0, \uB354 \uC131\uB2A5\uC774 \uC88B\uC740 \uC2A4\uCF00\uC904\uB7EC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860 \uB2E8\uACC4\uC758 \uC218\uB97C \uC904\uC774\uACE0, attention slicing\uC744 \uD65C\uC131\uD654\uD558\uC5EC \uBA54\uBAA8\uB9AC \uC18C\uBE44\uB97C \uC904\uC774\uB294 \uBC29\uBC95\uC744 \uBC30\uC6E0\uC2B5\uB2C8\uB2E4. \uC774\uC81C \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uC758 \uD488\uC9C8\uC744 \uAC1C\uC120\uD558\uB294 \uBC29\uBC95\uC5D0 \uB300\uD574 \uC9D1\uC911\uC801\uC73C\uB85C \uC54C\uC544\uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),Ls=c(),vl=o("h3"),Li=i("\uB354 \uB098\uC740 \uCCB4\uD06C\uD3EC\uC778\uD2B8"),qs=c(),P=o("p"),qi=i("\uAC00\uC7A5 \uD655\uC2E4\uD55C \uB2E8\uACC4\uB294 \uB354 \uB098\uC740 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. Stable Diffusion \uBAA8\uB378\uC740 \uC88B\uC740 \uCD9C\uBC1C\uC810\uC774\uBA70, \uACF5\uC2DD \uCD9C\uC2DC \uC774\uD6C4 \uBA87 \uAC00\uC9C0 \uAC1C\uC120\uB41C \uBC84\uC804\uB3C4 \uCD9C\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD558\uC9C0\uB9CC \uCD5C\uC2E0 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD55C\uB2E4\uACE0 \uD574\uC11C \uC790\uB3D9\uC73C\uB85C \uB354 \uB098\uC740 \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4. \uC5EC\uC804\uD788 \uB2E4\uC591\uD55C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC9C1\uC811 \uC2E4\uD5D8\uD574\uBCF4\uACE0, "),El=o("a"),Ki=i("negative prompts"),Oi=i(" \uC0AC\uC6A9 \uB4F1 \uC57D\uAC04\uC758 \uC870\uC0AC\uB97C \uD1B5\uD574 \uCD5C\uC0C1\uC758 \uACB0\uACFC\uB97C \uC5BB\uC5B4\uC57C \uD569\uB2C8\uB2E4."),Ks=c(),C=o("p"),la=i("\uC774 \uBD84\uC57C\uAC00 \uC131\uC7A5\uD568\uC5D0 \uB530\uB77C \uD2B9\uC815 \uC2A4\uD0C0\uC77C\uC744 \uC5F0\uCD9C\uD560 \uC218 \uC788\uB3C4\uB85D \uC138\uBC00\uD558\uAC8C \uC870\uC815\uB41C \uACE0\uD488\uC9C8 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uAC00 \uC810\uC810 \uB354 \uB9CE\uC544\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4. "),Il=o("a"),ea=i("Hub"),sa=i("\uC640 "),$l=o("a"),ta=i("Diffusers Gallery"),ia=i("\uB97C \uB458\uB7EC\uBCF4\uACE0 \uAD00\uC2EC \uC788\uB294 \uAC83\uC744 \uCC3E\uC544\uBCF4\uC138\uC694!"),Os=c(),Wl=o("h3"),aa=i("\uB354 \uB098\uC740 \uD30C\uC774\uD504\uB77C\uC778 \uAD6C\uC131 \uC694\uC18C"),lt=c(),A=o("p"),ra=i("\uD604\uC7AC \uD30C\uC774\uD504\uB77C\uC778 \uAD6C\uC131 \uC694\uC18C\uB97C \uCD5C\uC2E0 \uBC84\uC804\uC73C\uB85C \uAD50\uCCB4\uD574 \uBCFC \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. Stability AI\uC758 \uCD5C\uC2E0 "),kl=o("a"),oa=i("autodecoder"),pa=i("\uB97C \uD30C\uC774\uD504\uB77C\uC778\uC5D0 \uB85C\uB4DC\uD558\uACE0 \uBA87 \uAC00\uC9C0 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),et=c(),d(Bl.$$.fragment),st=c(),Vl=o("div"),Pe=o("img"),tt=c(),Cl=o("h3"),fa=i("\uB354 \uB098\uC740 \uD504\uB86C\uD504\uD2B8 \uC5D4\uC9C0\uB2C8\uC5B4\uB9C1"),it=c(),F=o("p"),ca=i("\uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uC0AC\uC6A9\uD558\uB294 \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uB294 "),Ae=o("em"),ma=i("prompt engineering"),na=i("\uC774\uB77C\uACE0 \uD560 \uC815\uB3C4\uB85C \uB9E4\uC6B0 \uC911\uC694\uD569\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8 \uC5D4\uC9C0\uB2C8\uC5B4\uB9C1 \uC2DC \uACE0\uB824\uD574\uC57C \uD560 \uBA87 \uAC00\uC9C0 \uC0AC\uD56D\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4:"),at=c(),Y=o("ul"),Fe=o("li"),ua=i("\uC0DD\uC131\uD558\uB824\uB294 \uC774\uBBF8\uC9C0 \uB610\uB294 \uC720\uC0AC\uD55C \uC774\uBBF8\uC9C0\uAC00 \uC778\uD130\uB137\uC5D0 \uC5B4\uB5BB\uAC8C \uC800\uC7A5\uB418\uC5B4 \uC788\uB294\uAC00?"),Ma=c(),Ye=o("li"),da=i("\uB0B4\uAC00 \uC6D0\uD558\uB294 \uC2A4\uD0C0\uC77C\uB85C \uBAA8\uB378\uC744 \uC720\uB3C4\uD558\uAE30 \uC704\uD574 \uC5B4\uB5A4 \uCD94\uAC00 \uC138\uBD80 \uC815\uBCF4\uB97C \uC81C\uACF5\uD560 \uC218 \uC788\uB294\uAC00?"),rt=c(),se=o("p"),ya=i("\uC774\uB97C \uC5FC\uB450\uC5D0 \uB450\uACE0 \uC0C9\uC0C1\uACFC \uB354 \uB192\uC740 \uD488\uC9C8\uC758 \uB514\uD14C\uC77C\uC744 \uD3EC\uD568\uD558\uB3C4\uB85D \uD504\uB86C\uD504\uD2B8\uB97C \uAC1C\uC120\uD574 \uBD05\uC2DC\uB2E4:"),ot=c(),d(Rl.$$.fragment),pt=c(),te=o("p"),ba=i("\uC0C8\uB85C\uC6B4 \uD504\uB86C\uD504\uD2B8\uB85C \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4:"),ft=c(),d(Xl.$$.fragment),ct=c(),Nl=o("div"),xe=o("img"),mt=c(),R=o("p"),Ja=i("\uAF64 \uC778\uC0C1\uC801\uC785\uB2C8\uB2E4! "),Le=o("code"),ha=i("1"),wa=i("\uC758 \uC2DC\uB4DC\uB97C \uAC00\uC9C4 "),qe=o("code"),Ua=i("Generator"),Za=i("\uC5D0 \uD574\uB2F9\uD558\uB294 \uB450 \uBC88\uC9F8 \uC774\uBBF8\uC9C0\uC5D0 \uD53C\uC0AC\uCCB4\uC758 \uB098\uC774\uC5D0 \uB300\uD55C \uD14D\uC2A4\uD2B8\uB97C \uCD94\uAC00\uD558\uC5EC \uC870\uAE08 \uB354 \uC870\uC815\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),nt=c(),d(gl.$$.fragment),ut=c(),Dl=o("div"),Ke=o("img"),Mt=c(),Sl=o("h2"),_a=i("\uB2E4\uC74C \uB2E8\uACC4"),dt=c(),x=o("p"),Ga=i("\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C\uB294 \uACC4\uC0B0 \uBC0F \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC744 \uB192\uC774\uACE0 \uC0DD\uC131\uB41C \uCD9C\uB825\uC758 \uD488\uC9C8\uC744 \uAC1C\uC120\uD558\uAE30 \uC704\uD574 "),Oe=o("code"),ja=i("DiffusionPipeline"),Ta=i("\uC744 \uCD5C\uC801\uD654\uD558\uB294 \uBC29\uBC95\uC744 \uBC30\uC6E0\uC2B5\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC744 \uB354 \uBE60\uB974\uAC8C \uB9CC\uB4DC\uB294 \uB370 \uAD00\uC2EC\uC774 \uC788\uB2E4\uBA74 \uB2E4\uC74C \uB9AC\uC18C\uC2A4\uB97C \uC0B4\uD3B4\uBCF4\uC138\uC694:"),yt=c(),X=o("ul"),L=o("li"),ie=o("a"),va=i("PyTorch 2.0"),Ea=i(" \uBC0F "),zl=o("a"),ls=o("code"),Ia=i("torch.compile"),$a=i("\uC774 \uC5B4\uB5BB\uAC8C \uCD94\uB860 \uC18D\uB3C4\uB97C 5~300% \uD5A5\uC0C1\uC2DC\uD0AC \uC218 \uC788\uB294\uC9C0 \uC54C\uC544\uBCF4\uC138\uC694. A100 GPU\uC5D0\uC11C\uB294 \uCD94\uB860 \uC18D\uB3C4\uAC00 \uCD5C\uB300 50%\uAE4C\uC9C0 \uBE68\uB77C\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),Wa=c(),Ql=o("li"),ka=i("PyTorch 2\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uB294 \uACBD\uC6B0, "),ae=o("a"),Ba=i("xFormers"),Va=i("\uB97C \uC124\uCE58\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC801\uC778 \uC5B4\uD150\uC158 \uBA54\uCEE4\uB2C8\uC998\uC740 PyTorch 1.13.1\uACFC \uD568\uAED8 \uC0AC\uC6A9\uD558\uBA74 \uC18D\uB3C4\uAC00 \uBE68\uB77C\uC9C0\uACE0 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uAC00 \uC904\uC5B4\uB4ED\uB2C8\uB2E4."),Ca=c(),Hl=o("li"),Ra=i("\uBAA8\uB378 \uC624\uD504\uB85C\uB529\uACFC \uAC19\uC740 \uB2E4\uB978 \uCD5C\uC801\uD654 \uAE30\uBC95\uC740 "),re=o("a"),Xa=i("\uC774 \uAC00\uC774\uB4DC"),Na=i("\uC5D0\uC11C \uB2E4\uB8E8\uACE0 \uC788\uC2B5\uB2C8\uB2E4."),this.h()},l(l){const t=Mo('[data-svelte="svelte-1phssyn"]',document.head);u=p(t,"META",{name:!0,content:!0}),t.forEach(e),T=m(l),M=p(l,"H1",{class:!0});var Pl=f(M);_=p(Pl,"A",{id:!0,class:!0,href:!0});var es=f(_);G=p(es,"SPAN",{});var La=f(G);y(U.$$.fragment,La),La.forEach(e),es.forEach(e),j=m(Pl),N=p(Pl,"SPAN",{});var qa=f(N);It=a(qa,"\uD6A8\uACFC\uC801\uC774\uACE0 \uD6A8\uC728\uC801\uC778 Diffusion"),qa.forEach(e),Pl.forEach(e),ts=m(l),y(O.$$.fragment,l),is=m(l),I=p(l,"P",{});var oe=f(I);$t=a(oe,"\uD2B9\uC815 \uC2A4\uD0C0\uC77C\uB85C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uC6D0\uD558\uB294 \uB0B4\uC6A9\uC744 \uD3EC\uD568\uD558\uB3C4\uB85D"),ye=p(oe,"CODE",{});var Ka=f(ye);Wt=a(Ka,"DiffusionPipeline"),Ka.forEach(e),kt=a(oe,"\uC744 \uC124\uC815\uD558\uB294 \uAC83\uC740 \uAE4C\uB2E4\uB85C\uC6B8 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC885\uC885 \uB9CC\uC871\uC2A4\uB7EC\uC6B4 \uC774\uBBF8\uC9C0\uB97C \uC5BB\uAE30\uAE4C\uC9C0 "),be=p(oe,"CODE",{});var Oa=f(be);Bt=a(Oa,"DiffusionPipeline"),Oa.forEach(e),Vt=a(oe,"\uC744 \uC5EC\uB7EC \uBC88 \uC2E4\uD589\uD574\uC57C \uD558\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uC2B5\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uBB34\uC5D0\uC11C \uC720\uB97C \uCC3D\uC870\uD558\uB294 \uAC83\uC740 \uD2B9\uD788 \uCD94\uB860\uC744 \uBC18\uBCF5\uD574\uC11C \uC2E4\uD589\uD558\uB294 \uACBD\uC6B0 \uACC4\uC0B0 \uC9D1\uC57D\uC801\uC778 \uD504\uB85C\uC138\uC2A4\uC785\uB2C8\uB2E4."),oe.forEach(e),as=m(l),$=p(l,"P",{});var pe=f($);Ct=a(pe,"\uADF8\uB807\uAE30 \uB54C\uBB38\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C "),Je=p(pe,"EM",{});var lr=f(Je);Rt=a(lr,"\uACC4\uC0B0"),lr.forEach(e),Xt=a(pe,"(\uC18D\uB3C4) \uBC0F "),he=p(pe,"EM",{});var er=f(he);Nt=a(er,"\uBA54\uBAA8\uB9AC"),er.forEach(e),gt=a(pe,"(GPU RAM) \uD6A8\uC728\uC131\uC744 \uADF9\uB300\uD654\uD558\uC5EC \uCD94\uB860 \uC8FC\uAE30 \uC0AC\uC774\uC758 \uC2DC\uAC04\uC744 \uB2E8\uCD95\uD558\uC5EC \uB354 \uBE60\uB974\uAC8C \uBC18\uBCF5\uD560 \uC218 \uC788\uB3C4\uB85D \uD558\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4."),pe.forEach(e),rs=m(l),g=p(l,"P",{});var Jt=f(g);Dt=a(Jt,"\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C\uB294 "),we=p(Jt,"CODE",{});var sr=f(we);St=a(sr,"DiffusionPipeline"),sr.forEach(e),zt=a(Jt,"\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB354 \uBE60\uB974\uACE0 \uD6A8\uACFC\uC801\uC73C\uB85C \uC0DD\uC131\uD558\uB294 \uBC29\uBC95\uC744 \uC548\uB0B4\uD569\uB2C8\uB2E4."),Jt.forEach(e),os=m(l),ll=p(l,"P",{});var ga=f(ll);el=p(ga,"A",{href:!0,rel:!0});var tr=f(el);Ue=p(tr,"CODE",{});var ir=f(Ue);Qt=a(ir,"runwayml/stable-diffusion-v1-5"),ir.forEach(e),tr.forEach(e),Ht=a(ga," \uBAA8\uB378\uC744 \uBD88\uB7EC\uC640\uC11C \uC2DC\uC791\uD569\uB2C8\uB2E4:"),ga.forEach(e),ps=m(l),y(sl.$$.fragment,l),fs=m(l),Yl=p(l,"P",{});var ar=f(Yl);Pt=a(ar,"\uC608\uC81C \uD504\uB86C\uD504\uD2B8\uB294 \u201Cportrait of an old warrior chief\u201D \uC774\uC9C0\uB9CC, \uC790\uC720\uB86D\uAC8C \uC790\uC2E0\uB9CC\uC758 \uD504\uB86C\uD504\uD2B8\uB97C \uC0AC\uC6A9\uD574\uB3C4 \uB429\uB2C8\uB2E4:"),ar.forEach(e),cs=m(l),y(tl.$$.fragment,l),ms=m(l),il=p(l,"H2",{id:!0});var rr=f(il);At=a(rr,"\uC18D\uB3C4"),rr.forEach(e),ns=m(l),y(D.$$.fragment,l),us=m(l),xl=p(l,"P",{});var or=f(xl);Ft=a(or,"\uCD94\uB860 \uC18D\uB3C4\uB97C \uB192\uC774\uB294 \uAC00\uC7A5 \uAC04\uB2E8\uD55C \uBC29\uBC95 \uC911 \uD558\uB098\uB294 Pytorch \uBAA8\uB4C8\uC744 \uC0AC\uC6A9\uD560 \uB54C\uC640 \uAC19\uC740 \uBC29\uC2DD\uC73C\uB85C GPU\uC5D0 \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBC30\uCE58\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4:"),or.forEach(e),Ms=m(l),y(al.$$.fragment,l),ds=m(l),W=p(l,"P",{});var fe=f(W);Yt=a(fe,"\uB3D9\uC77C\uD55C \uC774\uBBF8\uC9C0\uB97C \uC0AC\uC6A9\uD558\uACE0 \uAC1C\uC120\uD560 \uC218 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uB824\uBA74 "),rl=p(fe,"A",{href:!0,rel:!0});var pr=f(rl);Ze=p(pr,"CODE",{});var fr=f(Ze);xt=a(fr,"Generator"),fr.forEach(e),pr.forEach(e),Lt=a(fe,"\uB97C \uC0AC\uC6A9\uD558\uACE0 "),Ll=p(fe,"A",{href:!0});var cr=f(Ll);qt=a(cr,"\uC7AC\uD604\uC131"),cr.forEach(e),Kt=a(fe,"\uC5D0 \uB300\uD55C \uC2DC\uB4DC\uB97C \uC124\uC815\uD558\uC138\uC694:"),fe.forEach(e),ys=m(l),y(ol.$$.fragment,l),bs=m(l),ql=p(l,"P",{});var mr=f(ql);Ot=a(mr,"\uC774\uC81C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),mr.forEach(e),Js=m(l),y(pl.$$.fragment,l),hs=m(l),fl=p(l,"DIV",{class:!0});var nr=f(fl);_e=p(nr,"IMG",{src:!0}),nr.forEach(e),ws=m(l),v=p(l,"P",{});var q=f(v);li=a(q,"\uC774 \uD504\uB85C\uC138\uC2A4\uB294 T4 GPU\uC5D0\uC11C \uC57D 30\uCD08\uAC00 \uC18C\uC694\uB418\uC5C8\uC2B5\uB2C8\uB2E4(\uD560\uB2F9\uB41C GPU\uAC00 T4\uBCF4\uB2E4 \uB098\uC740 \uACBD\uC6B0 \uB354 \uBE60\uB97C \uC218 \uC788\uC74C). \uAE30\uBCF8\uC801\uC73C\uB85C "),Ge=p(q,"CODE",{});var ur=f(Ge);ei=a(ur,"DiffusionPipeline"),ur.forEach(e),si=a(q,"\uC740 50\uAC1C\uC758 \uCD94\uB860 \uB2E8\uACC4\uC5D0 \uB300\uD574 \uC804\uCCB4 "),je=p(q,"CODE",{});var Mr=f(je);ti=a(Mr,"float32"),Mr.forEach(e),ii=a(q," \uC815\uBC00\uB3C4\uB85C \uCD94\uB860\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4. "),Te=p(q,"CODE",{});var dr=f(Te);ai=a(dr,"float16"),dr.forEach(e),ri=a(q,"\uACFC \uAC19\uC740 \uB354 \uB0AE\uC740 \uC815\uBC00\uB3C4\uB85C \uC804\uD658\uD558\uAC70\uB098 \uCD94\uB860 \uB2E8\uACC4\uB97C \uB354 \uC801\uAC8C \uC2E4\uD589\uD558\uC5EC \uC18D\uB3C4\uB97C \uB192\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4."),q.forEach(e),Us=m(l),cl=p(l,"P",{});var Da=f(cl);ve=p(Da,"CODE",{});var yr=f(ve);oi=a(yr,"float16"),yr.forEach(e),pi=a(Da,"\uC73C\uB85C \uBAA8\uB378\uC744 \uB85C\uB4DC\uD558\uACE0 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),Da.forEach(e),Zs=m(l),y(ml.$$.fragment,l),_s=m(l),nl=p(l,"DIV",{class:!0});var br=f(nl);Ee=p(br,"IMG",{src:!0}),br.forEach(e),Gs=m(l),Kl=p(l,"P",{});var Jr=f(Kl);fi=a(Jr,"\uC774\uBC88\uC5D0\uB294 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uC57D 11\uCD08\uBC16\uC5D0 \uAC78\uB9AC\uC9C0 \uC54A\uC544 \uC774\uC804\uBCF4\uB2E4 3\uBC30 \uAC00\uAE4C\uC774 \uBE68\uB77C\uC84C\uC2B5\uB2C8\uB2E4!"),Jr.forEach(e),js=m(l),y(S.$$.fragment,l),Ts=m(l),k=p(l,"P",{});var ce=f(k);ci=a(ce,"\uB610 \uB2E4\uB978 \uC635\uC158\uC740 \uCD94\uB860 \uB2E8\uACC4\uC758 \uC218\uB97C \uC904\uC774\uB294 \uAC83\uC785\uB2C8\uB2E4. \uBCF4\uB2E4 \uD6A8\uC728\uC801\uC778 \uC2A4\uCF00\uC904\uB7EC\uB97C \uC120\uD0DD\uD558\uBA74 \uCD9C\uB825 \uD488\uC9C8 \uC800\uD558 \uC5C6\uC774 \uB2E8\uACC4 \uC218\uB97C \uC904\uC774\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD604\uC7AC \uBAA8\uB378\uACFC \uD638\uD658\uB418\uB294 \uC2A4\uCF00\uC904\uB7EC\uB294 "),Ie=p(ce,"CODE",{});var hr=f(Ie);mi=a(hr,"compatibles"),hr.forEach(e),ni=a(ce," \uBA54\uC11C\uB4DC\uB97C \uD638\uCD9C\uD558\uC5EC "),$e=p(ce,"CODE",{});var wr=f($e);ui=a(wr,"DiffusionPipeline"),wr.forEach(e),Mi=a(ce,"\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),ce.forEach(e),vs=m(l),y(ul.$$.fragment,l),Es=m(l),E=p(l,"P",{});var K=f(E);di=a(K,"Stable Diffusion \uBAA8\uB378\uC740 \uC77C\uBC18\uC801\uC73C\uB85C \uC57D 50\uAC1C\uC758 \uCD94\uB860 \uB2E8\uACC4\uAC00 \uD544\uC694\uD55C "),We=p(K,"CODE",{});var Ur=f(We);yi=a(Ur,"PNDMScheduler"),Ur.forEach(e),bi=a(K,"\uB97C \uAE30\uBCF8\uC73C\uB85C \uC0AC\uC6A9\uD558\uC9C0\uB9CC, "),ke=p(K,"CODE",{});var Zr=f(ke);Ji=a(Zr,"DPMSolverMultistepScheduler"),Zr.forEach(e),hi=a(K,"\uC640 \uAC19\uC774 \uC131\uB2A5\uC774 \uB354 \uB6F0\uC5B4\uB09C \uC2A4\uCF00\uC904\uB7EC\uB294 \uC57D 20\uAC1C \uB610\uB294 25\uAC1C\uC758 \uCD94\uB860 \uB2E8\uACC4\uB9CC \uD544\uC694\uB85C \uD569\uB2C8\uB2E4. \uC0C8 \uC2A4\uCF00\uC904\uB7EC\uB97C \uB85C\uB4DC\uD558\uB824\uBA74 "),Be=p(K,"CODE",{});var _r=f(Be);wi=a(_r,"ConfigMixin.from_config()"),_r.forEach(e),Ui=a(K," \uBA54\uC11C\uB4DC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4:"),K.forEach(e),Is=m(l),y(Ml.$$.fragment,l),$s=m(l),dl=p(l,"P",{});var Sa=f(dl);Ve=p(Sa,"CODE",{});var Gr=f(Ve);Zi=a(Gr,"num_inference_steps"),Gr.forEach(e),_i=a(Sa,"\uB97C 20\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4:"),Sa.forEach(e),Ws=m(l),y(yl.$$.fragment,l),ks=m(l),bl=p(l,"DIV",{class:!0});var jr=f(bl);Ce=p(jr,"IMG",{src:!0}),jr.forEach(e),Bs=m(l),Ol=p(l,"P",{});var Tr=f(Ol);Gi=a(Tr,"\uCD94\uB860\uC2DC\uAC04\uC744 4\uCD08\uB85C \uB2E8\uCD95\uD560 \uC218 \uC788\uC5C8\uC2B5\uB2C8\uB2E4! \u26A1\uFE0F"),Tr.forEach(e),Vs=m(l),Jl=p(l,"H2",{id:!0});var vr=f(Jl);ji=a(vr,"\uBA54\uBAA8\uB9AC"),vr.forEach(e),Cs=m(l),z=p(l,"P",{});var ht=f(z);Ti=a(ht,"\uD30C\uC774\uD504\uB77C\uC778 \uC131\uB2A5 \uD5A5\uC0C1\uC758 \uB610 \uB2E4\uB978 \uD575\uC2EC\uC740 \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC744 \uC904\uC774\uB294 \uAC83\uC778\uB370, \uCD08\uB2F9 \uC0DD\uC131\uB418\uB294 \uC774\uBBF8\uC9C0 \uC218\uB97C \uCD5C\uB300\uD654\uD558\uB824\uACE0 \uD558\uB294 \uACBD\uC6B0\uAC00 \uB9CE\uAE30 \uB54C\uBB38\uC5D0 \uAC04\uC811\uC801\uC73C\uB85C \uB354 \uBE60\uB978 \uC18D\uB3C4\uB97C \uC758\uBBF8\uD569\uB2C8\uB2E4. \uD55C \uBC88\uC5D0 \uC0DD\uC131\uD560 \uC218 \uC788\uB294 \uC774\uBBF8\uC9C0 \uC218\uB97C \uD655\uC778\uD558\uB294 \uAC00\uC7A5 \uC26C\uC6B4 \uBC29\uBC95\uC740 "),Re=p(ht,"CODE",{});var Er=f(Re);vi=a(Er,"OutOfMemoryError"),Er.forEach(e),Ei=a(ht,"(OOM)\uC774 \uBC1C\uC0DD\uD560 \uB54C\uAE4C\uC9C0 \uB2E4\uC591\uD55C \uBC30\uCE58 \uD06C\uAE30\uB97C \uC2DC\uB3C4\uD574 \uBCF4\uB294 \uAC83\uC785\uB2C8\uB2E4."),ht.forEach(e),Rs=m(l),B=p(l,"P",{});var me=f(B);Ii=a(me,"\uD504\uB86C\uD504\uD2B8 \uBAA9\uB85D\uACFC "),Xe=p(me,"CODE",{});var Ir=f(Xe);$i=a(Ir,"Generators"),Ir.forEach(e),Wi=a(me,"\uC5D0\uC11C \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uC0DD\uC131\uD558\uB294 \uD568\uC218\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uC88B\uC740 \uACB0\uACFC\uB97C \uC0DD\uC131\uD558\uB294 \uACBD\uC6B0 \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D \uAC01 "),Ne=p(me,"CODE",{});var $r=f(Ne);ki=a($r,"Generator"),$r.forEach(e),Bi=a(me,"\uC5D0 \uC2DC\uB4DC\uB97C \uD560\uB2F9\uD574\uC57C \uD569\uB2C8\uB2E4."),me.forEach(e),Xs=m(l),y(hl.$$.fragment,l),Ns=m(l),le=p(l,"P",{});var Wr=f(le);Vi=a(Wr,"\uB610\uD55C \uAC01 \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uBCF4\uC5EC\uC8FC\uB294 \uAE30\uB2A5\uC774 \uD544\uC694\uD569\uB2C8\uB2E4:"),Wr.forEach(e),gs=m(l),y(wl.$$.fragment,l),Ds=m(l),Ul=p(l,"P",{});var za=f(Ul);ge=p(za,"CODE",{});var kr=f(ge);Ci=a(kr,"batch_size=4"),kr.forEach(e),Ri=a(za,"\uBD80\uD130 \uC2DC\uC791\uD574 \uC5BC\uB9C8\uB098 \uB9CE\uC740 \uBA54\uBAA8\uB9AC\uB97C \uC18C\uBE44\uD588\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4:"),za.forEach(e),Ss=m(l),y(Zl.$$.fragment,l),zs=m(l),V=p(l,"P",{});var ne=f(V);Xi=a(ne,"RAM\uC774 \uB354 \uB9CE\uC740 GPU\uAC00 \uC544\uB2C8\uB77C\uBA74 \uC704\uC758 \uCF54\uB4DC\uC5D0\uC11C "),De=p(ne,"CODE",{});var Br=f(De);Ni=a(Br,"OOM"),Br.forEach(e),gi=a(ne," \uC624\uB958\uAC00 \uBC18\uD658\uB418\uC5C8\uC744 \uAC83\uC785\uB2C8\uB2E4! \uB300\uBD80\uBD84\uC758 \uBA54\uBAA8\uB9AC\uB294 cross-attention \uB808\uC774\uC5B4\uAC00 \uCC28\uC9C0\uD569\uB2C8\uB2E4. \uC774 \uC791\uC5C5\uC744 \uBC30\uCE58\uB85C \uC2E4\uD589\uD558\uB294 \uB300\uC2E0 \uC21C\uCC28\uC801\uC73C\uB85C \uC2E4\uD589\uD558\uBA74 \uC0C1\uB2F9\uD55C \uC591\uC758 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC744 \uAD6C\uC131\uD558\uC5EC "),Se=p(ne,"CODE",{});var Vr=f(Se);Di=a(Vr,"enable_attention_slicing()"),Vr.forEach(e),Si=a(ne," \uD568\uC218\uB97C \uC0AC\uC6A9\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4:"),ne.forEach(e),Qs=m(l),y(_l.$$.fragment,l),Hs=m(l),Q=p(l,"P",{});var wt=f(Q);zi=a(wt,"\uC774\uC81C "),ze=p(wt,"CODE",{});var Cr=f(ze);Qi=a(Cr,"batch_size"),Cr.forEach(e),Hi=a(wt,"\uB97C 8\uB85C \uB298\uB824\uBCF4\uC138\uC694!"),wt.forEach(e),Ps=m(l),y(Gl.$$.fragment,l),As=m(l),jl=p(l,"DIV",{class:!0});var Rr=f(jl);Qe=p(Rr,"IMG",{src:!0}),Rr.forEach(e),Fs=m(l),ee=p(l,"P",{});var Xr=f(ee);Pi=a(Xr,"\uC774\uC804\uC5D0\uB294 4\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uBC30\uCE58\uB85C \uC0DD\uC131\uD560 \uC218\uB3C4 \uC5C6\uC5C8\uC9C0\uB9CC, \uC774\uC81C\uB294 \uC774\uBBF8\uC9C0\uB2F9 \uC57D 3.5\uCD08 \uB9CC\uC5D0 8\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uBC30\uCE58\uB85C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4! \uC774\uB294 \uC544\uB9C8\uB3C4 \uD488\uC9C8 \uC800\uD558 \uC5C6\uC774 T4 GPU\uC5D0\uC11C \uAC00\uC7A5 \uBE60\uB978 \uC18D\uB3C4\uC77C \uAC83\uC785\uB2C8\uB2E4."),Xr.forEach(e),Ys=m(l),Tl=p(l,"H2",{id:!0});var Nr=f(Tl);Ai=a(Nr,"\uD488\uC9C8"),Nr.forEach(e),xs=m(l),H=p(l,"P",{});var Ut=f(H);Fi=a(Ut,"\uC9C0\uB09C \uB450 \uC139\uC158\uC5D0\uC11C\uB294 "),He=p(Ut,"CODE",{});var gr=f(He);Yi=a(gr,"fp16"),gr.forEach(e),xi=a(Ut,"\uC744 \uC0AC\uC6A9\uD558\uC5EC \uD30C\uC774\uD504\uB77C\uC778\uC758 \uC18D\uB3C4\uB97C \uCD5C\uC801\uD654\uD558\uACE0, \uB354 \uC131\uB2A5\uC774 \uC88B\uC740 \uC2A4\uCF00\uC904\uB7EC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860 \uB2E8\uACC4\uC758 \uC218\uB97C \uC904\uC774\uACE0, attention slicing\uC744 \uD65C\uC131\uD654\uD558\uC5EC \uBA54\uBAA8\uB9AC \uC18C\uBE44\uB97C \uC904\uC774\uB294 \uBC29\uBC95\uC744 \uBC30\uC6E0\uC2B5\uB2C8\uB2E4. \uC774\uC81C \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uC758 \uD488\uC9C8\uC744 \uAC1C\uC120\uD558\uB294 \uBC29\uBC95\uC5D0 \uB300\uD574 \uC9D1\uC911\uC801\uC73C\uB85C \uC54C\uC544\uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),Ut.forEach(e),Ls=m(l),vl=p(l,"H3",{id:!0});var Dr=f(vl);Li=a(Dr,"\uB354 \uB098\uC740 \uCCB4\uD06C\uD3EC\uC778\uD2B8"),Dr.forEach(e),qs=m(l),P=p(l,"P",{});var Zt=f(P);qi=a(Zt,"\uAC00\uC7A5 \uD655\uC2E4\uD55C \uB2E8\uACC4\uB294 \uB354 \uB098\uC740 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. Stable Diffusion \uBAA8\uB378\uC740 \uC88B\uC740 \uCD9C\uBC1C\uC810\uC774\uBA70, \uACF5\uC2DD \uCD9C\uC2DC \uC774\uD6C4 \uBA87 \uAC00\uC9C0 \uAC1C\uC120\uB41C \uBC84\uC804\uB3C4 \uCD9C\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD558\uC9C0\uB9CC \uCD5C\uC2E0 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD55C\uB2E4\uACE0 \uD574\uC11C \uC790\uB3D9\uC73C\uB85C \uB354 \uB098\uC740 \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4. \uC5EC\uC804\uD788 \uB2E4\uC591\uD55C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC9C1\uC811 \uC2E4\uD5D8\uD574\uBCF4\uACE0, "),El=p(Zt,"A",{href:!0,rel:!0});var Sr=f(El);Ki=a(Sr,"negative prompts"),Sr.forEach(e),Oi=a(Zt," \uC0AC\uC6A9 \uB4F1 \uC57D\uAC04\uC758 \uC870\uC0AC\uB97C \uD1B5\uD574 \uCD5C\uC0C1\uC758 \uACB0\uACFC\uB97C \uC5BB\uC5B4\uC57C \uD569\uB2C8\uB2E4."),Zt.forEach(e),Ks=m(l),C=p(l,"P",{});var ue=f(C);la=a(ue,"\uC774 \uBD84\uC57C\uAC00 \uC131\uC7A5\uD568\uC5D0 \uB530\uB77C \uD2B9\uC815 \uC2A4\uD0C0\uC77C\uC744 \uC5F0\uCD9C\uD560 \uC218 \uC788\uB3C4\uB85D \uC138\uBC00\uD558\uAC8C \uC870\uC815\uB41C \uACE0\uD488\uC9C8 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uAC00 \uC810\uC810 \uB354 \uB9CE\uC544\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4. "),Il=p(ue,"A",{href:!0,rel:!0});var zr=f(Il);ea=a(zr,"Hub"),zr.forEach(e),sa=a(ue,"\uC640 "),$l=p(ue,"A",{href:!0,rel:!0});var Qr=f($l);ta=a(Qr,"Diffusers Gallery"),Qr.forEach(e),ia=a(ue,"\uB97C \uB458\uB7EC\uBCF4\uACE0 \uAD00\uC2EC \uC788\uB294 \uAC83\uC744 \uCC3E\uC544\uBCF4\uC138\uC694!"),ue.forEach(e),Os=m(l),Wl=p(l,"H3",{id:!0});var Hr=f(Wl);aa=a(Hr,"\uB354 \uB098\uC740 \uD30C\uC774\uD504\uB77C\uC778 \uAD6C\uC131 \uC694\uC18C"),Hr.forEach(e),lt=m(l),A=p(l,"P",{});var _t=f(A);ra=a(_t,"\uD604\uC7AC \uD30C\uC774\uD504\uB77C\uC778 \uAD6C\uC131 \uC694\uC18C\uB97C \uCD5C\uC2E0 \uBC84\uC804\uC73C\uB85C \uAD50\uCCB4\uD574 \uBCFC \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. Stability AI\uC758 \uCD5C\uC2E0 "),kl=p(_t,"A",{href:!0,rel:!0});var Pr=f(kl);oa=a(Pr,"autodecoder"),Pr.forEach(e),pa=a(_t,"\uB97C \uD30C\uC774\uD504\uB77C\uC778\uC5D0 \uB85C\uB4DC\uD558\uACE0 \uBA87 \uAC00\uC9C0 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),_t.forEach(e),et=m(l),y(Bl.$$.fragment,l),st=m(l),Vl=p(l,"DIV",{class:!0});var Ar=f(Vl);Pe=p(Ar,"IMG",{src:!0}),Ar.forEach(e),tt=m(l),Cl=p(l,"H3",{id:!0});var Fr=f(Cl);fa=a(Fr,"\uB354 \uB098\uC740 \uD504\uB86C\uD504\uD2B8 \uC5D4\uC9C0\uB2C8\uC5B4\uB9C1"),Fr.forEach(e),it=m(l),F=p(l,"P",{});var Gt=f(F);ca=a(Gt,"\uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uC0AC\uC6A9\uD558\uB294 \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uB294 "),Ae=p(Gt,"EM",{});var Yr=f(Ae);ma=a(Yr,"prompt engineering"),Yr.forEach(e),na=a(Gt,"\uC774\uB77C\uACE0 \uD560 \uC815\uB3C4\uB85C \uB9E4\uC6B0 \uC911\uC694\uD569\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8 \uC5D4\uC9C0\uB2C8\uC5B4\uB9C1 \uC2DC \uACE0\uB824\uD574\uC57C \uD560 \uBA87 \uAC00\uC9C0 \uC0AC\uD56D\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4:"),Gt.forEach(e),at=m(l),Y=p(l,"UL",{});var jt=f(Y);Fe=p(jt,"LI",{});var xr=f(Fe);ua=a(xr,"\uC0DD\uC131\uD558\uB824\uB294 \uC774\uBBF8\uC9C0 \uB610\uB294 \uC720\uC0AC\uD55C \uC774\uBBF8\uC9C0\uAC00 \uC778\uD130\uB137\uC5D0 \uC5B4\uB5BB\uAC8C \uC800\uC7A5\uB418\uC5B4 \uC788\uB294\uAC00?"),xr.forEach(e),Ma=m(jt),Ye=p(jt,"LI",{});var Lr=f(Ye);da=a(Lr,"\uB0B4\uAC00 \uC6D0\uD558\uB294 \uC2A4\uD0C0\uC77C\uB85C \uBAA8\uB378\uC744 \uC720\uB3C4\uD558\uAE30 \uC704\uD574 \uC5B4\uB5A4 \uCD94\uAC00 \uC138\uBD80 \uC815\uBCF4\uB97C \uC81C\uACF5\uD560 \uC218 \uC788\uB294\uAC00?"),Lr.forEach(e),jt.forEach(e),rt=m(l),se=p(l,"P",{});var qr=f(se);ya=a(qr,"\uC774\uB97C \uC5FC\uB450\uC5D0 \uB450\uACE0 \uC0C9\uC0C1\uACFC \uB354 \uB192\uC740 \uD488\uC9C8\uC758 \uB514\uD14C\uC77C\uC744 \uD3EC\uD568\uD558\uB3C4\uB85D \uD504\uB86C\uD504\uD2B8\uB97C \uAC1C\uC120\uD574 \uBD05\uC2DC\uB2E4:"),qr.forEach(e),ot=m(l),y(Rl.$$.fragment,l),pt=m(l),te=p(l,"P",{});var Kr=f(te);ba=a(Kr,"\uC0C8\uB85C\uC6B4 \uD504\uB86C\uD504\uD2B8\uB85C \uC774\uBBF8\uC9C0 \uBC30\uCE58\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4:"),Kr.forEach(e),ft=m(l),y(Xl.$$.fragment,l),ct=m(l),Nl=p(l,"DIV",{class:!0});var Or=f(Nl);xe=p(Or,"IMG",{src:!0}),Or.forEach(e),mt=m(l),R=p(l,"P",{});var Me=f(R);Ja=a(Me,"\uAF64 \uC778\uC0C1\uC801\uC785\uB2C8\uB2E4! "),Le=p(Me,"CODE",{});var lo=f(Le);ha=a(lo,"1"),lo.forEach(e),wa=a(Me,"\uC758 \uC2DC\uB4DC\uB97C \uAC00\uC9C4 "),qe=p(Me,"CODE",{});var eo=f(qe);Ua=a(eo,"Generator"),eo.forEach(e),Za=a(Me,"\uC5D0 \uD574\uB2F9\uD558\uB294 \uB450 \uBC88\uC9F8 \uC774\uBBF8\uC9C0\uC5D0 \uD53C\uC0AC\uCCB4\uC758 \uB098\uC774\uC5D0 \uB300\uD55C \uD14D\uC2A4\uD2B8\uB97C \uCD94\uAC00\uD558\uC5EC \uC870\uAE08 \uB354 \uC870\uC815\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),Me.forEach(e),nt=m(l),y(gl.$$.fragment,l),ut=m(l),Dl=p(l,"DIV",{class:!0});var so=f(Dl);Ke=p(so,"IMG",{src:!0}),so.forEach(e),Mt=m(l),Sl=p(l,"H2",{id:!0});var to=f(Sl);_a=a(to,"\uB2E4\uC74C \uB2E8\uACC4"),to.forEach(e),dt=m(l),x=p(l,"P",{});var Tt=f(x);Ga=a(Tt,"\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C\uB294 \uACC4\uC0B0 \uBC0F \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC744 \uB192\uC774\uACE0 \uC0DD\uC131\uB41C \uCD9C\uB825\uC758 \uD488\uC9C8\uC744 \uAC1C\uC120\uD558\uAE30 \uC704\uD574 "),Oe=p(Tt,"CODE",{});var io=f(Oe);ja=a(io,"DiffusionPipeline"),io.forEach(e),Ta=a(Tt,"\uC744 \uCD5C\uC801\uD654\uD558\uB294 \uBC29\uBC95\uC744 \uBC30\uC6E0\uC2B5\uB2C8\uB2E4. \uD30C\uC774\uD504\uB77C\uC778\uC744 \uB354 \uBE60\uB974\uAC8C \uB9CC\uB4DC\uB294 \uB370 \uAD00\uC2EC\uC774 \uC788\uB2E4\uBA74 \uB2E4\uC74C \uB9AC\uC18C\uC2A4\uB97C \uC0B4\uD3B4\uBCF4\uC138\uC694:"),Tt.forEach(e),yt=m(l),X=p(l,"UL",{});var de=f(X);L=p(de,"LI",{});var ss=f(L);ie=p(ss,"A",{href:!0});var ao=f(ie);va=a(ao,"PyTorch 2.0"),ao.forEach(e),Ea=a(ss," \uBC0F "),zl=p(ss,"A",{href:!0,rel:!0});var ro=f(zl);ls=p(ro,"CODE",{});var oo=f(ls);Ia=a(oo,"torch.compile"),oo.forEach(e),ro.forEach(e),$a=a(ss,"\uC774 \uC5B4\uB5BB\uAC8C \uCD94\uB860 \uC18D\uB3C4\uB97C 5~300% \uD5A5\uC0C1\uC2DC\uD0AC \uC218 \uC788\uB294\uC9C0 \uC54C\uC544\uBCF4\uC138\uC694. A100 GPU\uC5D0\uC11C\uB294 \uCD94\uB860 \uC18D\uB3C4\uAC00 \uCD5C\uB300 50%\uAE4C\uC9C0 \uBE68\uB77C\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"),ss.forEach(e),Wa=m(de),Ql=p(de,"LI",{});var vt=f(Ql);ka=a(vt,"PyTorch 2\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uB294 \uACBD\uC6B0, "),ae=p(vt,"A",{href:!0});var po=f(ae);Ba=a(po,"xFormers"),po.forEach(e),Va=a(vt,"\uB97C \uC124\uCE58\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC801\uC778 \uC5B4\uD150\uC158 \uBA54\uCEE4\uB2C8\uC998\uC740 PyTorch 1.13.1\uACFC \uD568\uAED8 \uC0AC\uC6A9\uD558\uBA74 \uC18D\uB3C4\uAC00 \uBE68\uB77C\uC9C0\uACE0 \uBA54\uBAA8\uB9AC \uC18C\uBE44\uAC00 \uC904\uC5B4\uB4ED\uB2C8\uB2E4."),vt.forEach(e),Ca=m(de),Hl=p(de,"LI",{});var Et=f(Hl);Ra=a(Et,"\uBAA8\uB378 \uC624\uD504\uB85C\uB529\uACFC \uAC19\uC740 \uB2E4\uB978 \uCD5C\uC801\uD654 \uAE30\uBC95\uC740 "),re=p(Et,"A",{href:!0});var fo=f(re);Xa=a(fo,"\uC774 \uAC00\uC774\uB4DC"),fo.forEach(e),Na=a(Et,"\uC5D0\uC11C \uB2E4\uB8E8\uACE0 \uC788\uC2B5\uB2C8\uB2E4."),Et.forEach(e),de.forEach(e),this.h()},h(){n(u,"name","hf:doc:metadata"),n(u,"content",JSON.stringify(Zo)),n(_,"id","diffusion"),n(_,"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"),n(_,"href","#diffusion"),n(M,"class","relative group"),n(el,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),n(el,"rel","nofollow"),n(il,"id",""),n(rl,"href","https://pytorch.org/docs/stable/generated/torch.Generator.html"),n(rl,"rel","nofollow"),n(Ll,"href","./using-diffusers/reproducibility"),Al(_e.src,Qa="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/stable_diffusion_101/sd_101_1.png")||n(_e,"src",Qa),n(fl,"class","flex justify-center"),Al(Ee.src,Ha="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/stable_diffusion_101/sd_101_2.png")||n(Ee,"src",Ha),n(nl,"class","flex justify-center"),Al(Ce.src,Pa="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/stable_diffusion_101/sd_101_3.png")||n(Ce,"src",Pa),n(bl,"class","flex justify-center"),n(Jl,"id",""),Al(Qe.src,Aa="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/stable_diffusion_101/sd_101_5.png")||n(Qe,"src",Aa),n(jl,"class","flex justify-center"),n(Tl,"id",""),n(vl,"id",""),n(El,"href","https://minimaxir.com/2022/11/stable-diffusion-negative-prompt/"),n(El,"rel","nofollow"),n(Il,"href","https://huggingface.co/models?library=diffusers&sort=downloads"),n(Il,"rel","nofollow"),n($l,"href","https://huggingface.co/spaces/huggingface-projects/diffusers-gallery"),n($l,"rel","nofollow"),n(Wl,"id",""),n(kl,"href","https://huggingface.co/stabilityai/stable-diffusion-2-1/tree/main/vae"),n(kl,"rel","nofollow"),Al(Pe.src,Fa="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/stable_diffusion_101/sd_101_6.png")||n(Pe,"src",Fa),n(Vl,"class","flex justify-center"),n(Cl,"id",""),Al(xe.src,Ya="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/stable_diffusion_101/sd_101_7.png")||n(xe,"src",Ya),n(Nl,"class","flex justify-center"),Al(Ke.src,xa="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/stable_diffusion_101/sd_101_8.png")||n(Ke,"src",xa),n(Dl,"class","flex justify-center"),n(Sl,"id",""),n(ie,"href","./optimization/torch2.0"),n(zl,"href","https://pytorch.org/docs/stable/generated/torch.compile.html"),n(zl,"rel","nofollow"),n(ae,"href","./optimization/xformers"),n(re,"href","./optimization/fp16")},m(l,t){s(document.head,u),r(l,T,t),r(l,M,t),s(M,_),s(_,G),b(U,G,null),s(M,j),s(M,N),s(N,It),r(l,ts,t),b(O,l,t),r(l,is,t),r(l,I,t),s(I,$t),s(I,ye),s(ye,Wt),s(I,kt),s(I,be),s(be,Bt),s(I,Vt),r(l,as,t),r(l,$,t),s($,Ct),s($,Je),s(Je,Rt),s($,Xt),s($,he),s(he,Nt),s($,gt),r(l,rs,t),r(l,g,t),s(g,Dt),s(g,we),s(we,St),s(g,zt),r(l,os,t),r(l,ll,t),s(ll,el),s(el,Ue),s(Ue,Qt),s(ll,Ht),r(l,ps,t),b(sl,l,t),r(l,fs,t),r(l,Yl,t),s(Yl,Pt),r(l,cs,t),b(tl,l,t),r(l,ms,t),r(l,il,t),s(il,At),r(l,ns,t),b(D,l,t),r(l,us,t),r(l,xl,t),s(xl,Ft),r(l,Ms,t),b(al,l,t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,ls),s(ls,Ia),s(L,$a),s(X,Wa),s(X,Ql),s(Ql,ka),s(Ql,ae),s(ae,Ba),s(Ql,Va),s(X,Ca),s(X,Hl),s(Hl,Ra),s(Hl,re),s(re,Xa),s(Hl,Na),bt=!0},p(l,[t]){const Pl={};t&2&&(Pl.$$scope={dirty:t,ctx:l}),D.$set(Pl);const es={};t&2&&(es.$$scope={dirty:t,ctx:l}),S.$set(es)},i(l){bt||(J(U.$$.fragment,l),J(O.$$.fragment,l),J(sl.$$.fragment,l),J(tl.$$.fragment,l),J(D.$$.fragment,l),J(al.$$.fragment,l),J(ol.$$.fragment,l),J(pl.$$.fragment,l),J(ml.$$.fragment,l),J(S.$$.fragment,l),J(ul.$$.fragment,l),J(Ml.$$.fragment,l),J(yl.$$.fragment,l),J(hl.$$.fragment,l),J(wl.$$.fragment,l),J(Zl.$$.fragment,l),J(_l.$$.fragment,l),J(Gl.$$.fragment,l),J(Bl.$$.fragment,l),J(Rl.$$.fragment,l),J(Xl.$$.fragment,l),J(gl.$$.fragment,l),bt=!0)},o(l){h(U.$$.fragment,l),h(O.$$.fragment,l),h(sl.$$.fragment,l),h(tl.$$.fragment,l),h(D.$$.fragment,l),h(al.$$.fragment,l),h(ol.$$.fragment,l),h(pl.$$.fragment,l),h(ml.$$.fragment,l),h(S.$$.fragment,l),h(ul.$$.fragment,l),h(Ml.$$.fragment,l),h(yl.$$.fragment,l),h(hl.$$.fragment,l),h(wl.$$.fragment,l),h(Zl.$$.fragment,l),h(_l.$$.fragment,l),h(Gl.$$.fragment,l),h(Bl.$$.fragment,l),h(Rl.$$.fragment,l),h(Xl.$$.fragment,l),h(gl.$$.fragment,l),bt=!1},d(l){e(u),l&&e(T),l&&e(M),w(U),l&&e(ts),w(O,l),l&&e(is),l&&e(I),l&&e(as),l&&e($),l&&e(rs),l&&e(g),l&&e(os),l&&e(ll),l&&e(ps),w(sl,l),l&&e(fs),l&&e(Yl),l&&e(cs),w(tl,l),l&&e(ms),l&&e(il),l&&e(ns),w(D,l),l&&e(us),l&&e(xl),l&&e(Ms),w(al,l),l&&e(ds),l&&e(W),l&&e(ys),w(ol,l),l&&e(bs),l&&e(ql),l&&e(Js),w(pl,l),l&&e(hs),l&&e(fl),l&&e(ws),l&&e(v),l&&e(Us),l&&e(cl),l&&e(Zs),w(ml,l),l&&e(_s),l&&e(nl),l&&e(Gs),l&&e(Kl),l&&e(js),w(S,l),l&&e(Ts),l&&e(k),l&&e(vs),w(ul,l),l&&e(Es),l&&e(E),l&&e(Is),w(Ml,l),l&&e($s),l&&e(dl),l&&e(Ws),w(yl,l),l&&e(ks),l&&e(bl),l&&e(Bs),l&&e(Ol),l&&e(Vs),l&&e(Jl),l&&e(Cs),l&&e(z),l&&e(Rs),l&&e(B),l&&e(Xs),w(hl,l),l&&e(Ns),l&&e(le),l&&e(gs),w(wl,l),l&&e(Ds),l&&e(Ul),l&&e(Ss),w(Zl,l),l&&e(zs),l&&e(V),l&&e(Qs),w(_l,l),l&&e(Hs),l&&e(Q),l&&e(Ps),w(Gl,l),l&&e(As),l&&e(jl),l&&e(Fs),l&&e(ee),l&&e(Ys),l&&e(Tl),l&&e(xs),l&&e(H),l&&e(Ls),l&&e(vl),l&&e(qs),l&&e(P),l&&e(Ks),l&&e(C),l&&e(Os),l&&e(Wl),l&&e(lt),l&&e(A),l&&e(et),w(Bl,l),l&&e(st),l&&e(Vl),l&&e(tt),l&&e(Cl),l&&e(it),l&&e(F),l&&e(at),l&&e(Y),l&&e(rt),l&&e(se),l&&e(ot),w(Rl,l),l&&e(pt),l&&e(te),l&&e(ft),w(Xl,l),l&&e(ct),l&&e(Nl),l&&e(mt),l&&e(R),l&&e(nt),w(gl,l),l&&e(ut),l&&e(Dl),l&&e(Mt),l&&e(Sl),l&&e(dt),l&&e(x),l&&e(yt),l&&e(X)}}}const Zo={local:"diffusion",sections:[{local:"",title:"\uC18D\uB3C4"},{local:"",title:"\uBA54\uBAA8\uB9AC"},{local:"",sections:[{local:"",title:"\uB354 \uB098\uC740 \uCCB4\uD06C\uD3EC\uC778\uD2B8"},{local:"",title:"\uB354 \uB098\uC740 \uD30C\uC774\uD504\uB77C\uC778 \uAD6C\uC131 \uC694\uC18C"},{local:"",title:"\uB354 \uB098\uC740 \uD504\uB86C\uD504\uD2B8 \uC5D4\uC9C0\uB2C8\uC5B4\uB9C1"}],title:"\uD488\uC9C8"},{local:"",title:"\uB2E4\uC74C \uB2E8\uACC4"}],title:"\uD6A8\uACFC\uC801\uC774\uACE0 \uD6A8\uC728\uC801\uC778 Diffusion"};function _o(Fl){return yo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Io extends mo{constructor(u){super();no(this,u,_o,Uo,uo,{})}}export{Io as default,Zo as metadata};
