import{S as vi,i as Bi,s as Ii,e as o,k as n,w as y,t as p,M as ki,c as f,d as e,m,a as r,x as c,h as i,b as M,N as _i,G as s,g as a,y as u,L as Ei,q as b,o as w,B as J,v as Gi}from"../../chunks/vendor-hf-doc-builder.js";import{I as bt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as h}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as Zi}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function Ci(yp){let B,Qe,I,C,pe,R,wt,ie,Jt,Ye,D,Se,W,ht,q,jt,dt,Pe,X,Ut,L,Tt,$t,Ve,gl,_t,He,xl,vt,Ne,k,g,oe,K,Bt,fe,It,ze,Fl,kt,Re,O,De,ll,qe,el,Le,sl,Ke,Al,Et,Oe,tl,ls,al,Gt,es,Ql,Zt,ss,pl,ts,Yl,Ct,as,il,ps,ol,Wt,is,Sl,Xt,os,x,gt,re,xt,Ft,fs,fl,rs,rl,ns,E,F,ne,nl,At,me,Qt,ms,U,Yt,Me,St,Pt,ye,Vt,Ht,Ms,ml,ys,Ml,cs,yl,us,A,Nt,ce,zt,Rt,bs,Pl,Dt,ws,Vl,qt,Js,cl,hs,Hl,Lt,js,ul,ds,Nl,Kt,Us,bl,ue,Ot,la,Ts,zl,ea,$s,wl,_s,Jl,vs,Q,sa,be,ta,aa,Bs,hl,Is,jl,pa,ks,Rl,ia,Es,dl,Gs,Ul,Zs,Dl,ql,cp,Cs,Tl,oa,Ws,Ll,fa,Xs,Kl,ra,gs,$l,xs,_l,Fs,Ol,le,up,As,G,Y,we,vl,na,Je,ma,Qs,S,Ma,he,ya,ca,Ys,T,ua,Bl,ba,wa,P,je,Ja,ha,ja,Ss,Il,de,da,Ua,Ps,V,$,Ue,Ta,$a,Te,_a,va,$e,Ba,Ia,ka,_e,Ea,Vs,d,Ga,ve,Za,Ca,Be,Wa,Xa,Ie,ga,xa,Hs,kl,Ns,Z,ke,Fa,Aa,Ee,Qa,Ya,zs,H,El,Sa,Ge,Pa,Va,Ha,j,Na,Ze,za,Ra,Ce,Da,qa,We,La,Ka,Xe,Oa,lp,Rs,_,ep,ge,sp,tp,xe,ap,pp,Ds,ee,ip,qs,Gl,Ls,Zl,Ks,Cl,Os,Wl,lt,N,op,Fe,fp,rp,et;return R=new bt({}),D=new Zi({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_jax_how_to.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/stable_diffusion_jax_how_to.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/stable_diffusion_jax_how_to.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/stable_diffusion_jax_how_to.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/stable_diffusion_jax_how_to.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/stable_diffusion_jax_how_to.ipynb"}]}}),K=new bt({}),O=new h({props:{code:"IXBpcCUyMGluc3RhbGwlMjBqYXglM0QlM0QwLjMuMjUlMjBqYXhsaWIlM0QlM0QwLjMuMjUlMjBmbGF4JTIwdHJhbnNmb3JtZXJzJTIwZnRmeSUwQSFwaXAlMjBpbnN0YWxsJTIwZGlmZnVzZXJz",highlighted:`!pip install jax==0.3.25 jaxlib==0.3.25 flax transformers ftfy
!pip install diffusers`}}),ll=new h({props:{code:"aW1wb3J0JTIwamF4LnRvb2xzLmNvbGFiX3RwdSUwQSUwQWpheC50b29scy5jb2xhYl90cHUuc2V0dXBfdHB1KCklMEFpbXBvcnQlMjBqYXg=",highlighted:`<span class="hljs-keyword">import</span> jax.tools.colab_tpu

jax.tools.colab_tpu.setup_tpu()
<span class="hljs-keyword">import</span> jax`}}),el=new h({props:{code:"bnVtX2RldmljZXMlMjAlM0QlMjBqYXguZGV2aWNlX2NvdW50KCklMEFkZXZpY2VfdHlwZSUyMCUzRCUyMGpheC5kZXZpY2VzKCklNUIwJTVELmRldmljZV9raW5kJTBBJTBBcHJpbnQoZiUyMkZvdW5kJTIwJTdCbnVtX2RldmljZXMlN0QlMjBKQVglMjBkZXZpY2VzJTIwb2YlMjB0eXBlJTIwJTdCZGV2aWNlX3R5cGUlN0QuJTIyKSUwQWFzc2VydCUyMCglMEElMjAlMjAlMjAlMjAlMjJUUFUlMjIlMjBpbiUyMGRldmljZV90eXBlJTBBKSUyQyUyMCUyMkF2YWlsYWJsZSUyMGRldmljZSUyMGlzJTIwbm90JTIwYSUyMFRQVSUyQyUyMHBsZWFzZSUyMHNlbGVjdCUyMFRQVSUyMGZyb20lMjBFZGl0JTIwJTNFJTIwTm90ZWJvb2slMjBzZXR0aW5ncyUyMCUzRSUyMEhhcmR3YXJlJTIwYWNjZWxlcmF0b3IlMjI=",highlighted:`num_devices = jax.device_count()
device_type = jax.devices()[<span class="hljs-number">0</span>].device_kind

<span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Found <span class="hljs-subst">{num_devices}</span> JAX devices of type <span class="hljs-subst">{device_type}</span>.&quot;</span>)
<span class="hljs-keyword">assert</span> (
    <span class="hljs-string">&quot;TPU&quot;</span> <span class="hljs-keyword">in</span> device_type
), <span class="hljs-string">&quot;Available device is not a TPU, please select TPU from Edit &gt; Notebook settings &gt; Hardware accelerator&quot;</span>`}}),sl=new h({props:{code:"Rm91bmQlMjA4JTIwSkFYJTIwZGV2aWNlcyUyMG9mJTIwdHlwZSUyMENsb3VkJTIwVFBVLg==",highlighted:'Found <span class="hljs-number">8</span> JAX devices of <span class="hljs-built_in">type</span> Cloud TPU.'}}),tl=new h({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwamF4Lm51bXB5JTIwYXMlMjBqbnAlMEElMEFmcm9tJTIwcGF0aGxpYiUyMGltcG9ydCUyMFBhdGglMEFmcm9tJTIwamF4JTIwaW1wb3J0JTIwcG1hcCUwQWZyb20lMjBmbGF4LmpheF91dGlscyUyMGltcG9ydCUyMHJlcGxpY2F0ZSUwQWZyb20lMjBmbGF4LnRyYWluaW5nLmNvbW1vbl91dGlscyUyMGltcG9ydCUyMHNoYXJkJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhTdGFibGVEaWZmdXNpb25QaXBlbGluZQ==",highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">import</span> jax
<span class="hljs-keyword">import</span> jax.numpy <span class="hljs-keyword">as</span> jnp

<span class="hljs-keyword">from</span> pathlib <span class="hljs-keyword">import</span> Path
<span class="hljs-keyword">from</span> jax <span class="hljs-keyword">import</span> pmap
<span class="hljs-keyword">from</span> flax.jax_utils <span class="hljs-keyword">import</span> replicate
<span class="hljs-keyword">from</span> flax.training.common_utils <span class="hljs-keyword">import</span> shard
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxStableDiffusionPipeline`}}),pl=new h({props:{code:"ZHR5cGUlMjAlM0QlMjBqbnAuYmZsb2F0MTY=",highlighted:"dtype = jnp.bfloat16"}}),il=new h({props:{code:"cGlwZWxpbmUlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4U3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMEElMjAlMjAlMjAlMjByZXZpc2lvbiUzRCUyMmJmMTYlMjIlMkMlMEElMjAlMjAlMjAlMjBkdHlwZSUzRGR0eXBlJTJDJTBBKQ==",highlighted:`pipeline, params = FlaxStableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
    revision=<span class="hljs-string">&quot;bf16&quot;</span>,
    dtype=dtype,
)`}}),fl=new h({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyQSUyMGNpbmVtYXRpYyUyMGZpbG0lMjBzdGlsbCUyMG9mJTIwTW9yZ2FuJTIwRnJlZW1hbiUyMHN0YXJyaW5nJTIwYXMlMjBKaW1pJTIwSGVuZHJpeCUyQyUyMHBvcnRyYWl0JTJDJTIwNDBtbSUyMGxlbnMlMkMlMjBzaGFsbG93JTIwZGVwdGglMjBvZiUyMGZpZWxkJTJDJTIwY2xvc2UlMjB1cCUyQyUyMHNwbGl0JTIwbGlnaHRpbmclMkMlMjBjaW5lbWF0aWMlMjIlMEFwcm9tcHQlMjAlM0QlMjAlNUJwcm9tcHQlNUQlMjAqJTIwamF4LmRldmljZV9jb3VudCgpJTBBcHJvbXB0X2lkcyUyMCUzRCUyMHBpcGVsaW5lLnByZXBhcmVfaW5wdXRzKHByb21wdCklMEFwcm9tcHRfaWRzLnNoYXBl",highlighted:`prompt = <span class="hljs-string">&quot;A cinematic film still of Morgan Freeman starring as Jimi Hendrix, portrait, 40mm lens, shallow depth of field, close up, split lighting, cinematic&quot;</span>
prompt = [prompt] * jax.device_count()
prompt_ids = pipeline.prepare_inputs(prompt)
prompt_ids.shape`}}),rl=new h({props:{code:"KDglMkMlMjA3Nyk=",highlighted:'(<span class="hljs-number">8</span>, <span class="hljs-number">77</span>)'}}),nl=new bt({}),ml=new h({props:{code:"cF9wYXJhbXMlMjAlM0QlMjByZXBsaWNhdGUocGFyYW1zKQ==",highlighted:"p_params = replicate(params)"}}),Ml=new h({props:{code:"cHJvbXB0X2lkcyUyMCUzRCUyMHNoYXJkKHByb21wdF9pZHMpJTBBcHJvbXB0X2lkcy5zaGFwZQ==",highlighted:`prompt_ids = shard(prompt_ids)
prompt_ids.shape`}}),yl=new h({props:{code:"KDglMkMlMjAxJTJDJTIwNzcp",highlighted:'(<span class="hljs-number">8</span>, <span class="hljs-number">1</span>, <span class="hljs-number">77</span>)'}}),cl=new h({props:{code:"ZGVmJTIwY3JlYXRlX2tleShzZWVkJTNEMCklM0ElMEElMjAlMjAlMjAlMjByZXR1cm4lMjBqYXgucmFuZG9tLlBSTkdLZXkoc2VlZCk=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">create_key</span>(<span class="hljs-params">seed=<span class="hljs-number">0</span></span>):
    <span class="hljs-keyword">return</span> jax.random.PRNGKey(seed)`}}),ul=new h({props:{code:"cm5nJTIwJTNEJTIwY3JlYXRlX2tleSgwKSUwQXJuZyUyMCUzRCUyMGpheC5yYW5kb20uc3BsaXQocm5nJTJDJTIwamF4LmRldmljZV9jb3VudCgpKQ==",highlighted:`rng = create_key(<span class="hljs-number">0</span>)
rng = jax.random.split(rng, jax.device_count())`}}),wl=new h({props:{code:"JTI1JTI1dGltZSUwQWltYWdlcyUyMCUzRCUyMHBpcGVsaW5lKHByb21wdF9pZHMlMkMlMjBwX3BhcmFtcyUyQyUyMHJuZyUyQyUyMGppdCUzRFRydWUpJTVCMCU1RA==",highlighted:`%%time
images = pipeline(prompt_ids, p_params, rng, <span class="hljs-attribute">jit</span>=<span class="hljs-literal">True</span>)[0]`}}),Jl=new h({props:{code:"Q1BVJTIwdGltZXMlM0ElMjB1c2VyJTIwNTYuMiUyMHMlMkMlMjBzeXMlM0ElMjA0Mi41JTIwcyUyQyUyMHRvdGFsJTNBJTIwMW1pbiUyMDM4cyUwQVdhbGwlMjB0aW1lJTNBJTIwMW1pbiUyMDI5cw==",highlighted:`CPU times: user <span class="hljs-number">56.2</span> s, sys: <span class="hljs-number">42.5</span> s, total: 1<span class="hljs-built_in">min</span> 38s
Wall time: 1<span class="hljs-built_in">min</span> 29s`}}),hl=new h({props:{code:"aW1hZ2VzJTIwJTNEJTIwaW1hZ2VzLnJlc2hhcGUoKGltYWdlcy5zaGFwZSU1QjAlNUQlMjAqJTIwaW1hZ2VzLnNoYXBlJTVCMSU1RCUyQyklMjAlMkIlMjBpbWFnZXMuc2hhcGUlNUItMyUzQSU1RCklMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZS5udW1weV90b19waWwoaW1hZ2VzKQ==",highlighted:`images = images.reshape((images.shape[<span class="hljs-number">0</span>] * images.shape[<span class="hljs-number">1</span>],) + images.shape[-<span class="hljs-number">3</span>:])
images = pipeline.numpy_to_pil(images)`}}),dl=new h({props:{code:"ZGVmJTIwaW1hZ2VfZ3JpZChpbWdzJTJDJTIwcm93cyUyQyUyMGNvbHMpJTNBJTBBJTIwJTIwJTIwJTIwdyUyQyUyMGglMjAlM0QlMjBpbWdzJTVCMCU1RC5zaXplJTBBJTIwJTIwJTIwJTIwZ3JpZCUyMCUzRCUyMEltYWdlLm5ldyglMjJSR0IlMjIlMkMlMjBzaXplJTNEKGNvbHMlMjAqJTIwdyUyQyUyMHJvd3MlMjAqJTIwaCkpJTBBJTIwJTIwJTIwJTIwZm9yJTIwaSUyQyUyMGltZyUyMGluJTIwZW51bWVyYXRlKGltZ3MpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZ3JpZC5wYXN0ZShpbWclMkMlMjBib3glM0QoaSUyMCUyNSUyMGNvbHMlMjAqJTIwdyUyQyUyMGklMjAlMkYlMkYlMjBjb2xzJTIwKiUyMGgpKSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMGdyaWQ=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">image_grid</span>(<span class="hljs-params">imgs, rows, cols</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`}}),Ul=new h({props:{code:"aW1hZ2VfZ3JpZChpbWFnZXMlMkMlMjAyJTJDJTIwNCk=",highlighted:'image_grid(images, <span class="hljs-number">2</span>, <span class="hljs-number">4</span>)'}}),$l=new h({props:{code:"cHJvbXB0cyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkxhYnJhZG9yJTIwaW4lMjB0aGUlMjBzdHlsZSUyMG9mJTIwSG9rdXNhaSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMlBhaW50aW5nJTIwb2YlMjBhJTIwc3F1aXJyZWwlMjBza2F0aW5nJTIwaW4lMjBOZXclMjBZb3JrJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIySEFMLTkwMDAlMjBpbiUyMHRoZSUyMHN0eWxlJTIwb2YlMjBWYW4lMjBHb2doJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyVGltZXMlMjBTcXVhcmUlMjB1bmRlciUyMHdhdGVyJTJDJTIwd2l0aCUyMGZpc2glMjBhbmQlMjBhJTIwZG9scGhpbiUyMHN3aW1taW5nJTIwYXJvdW5kJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyQW5jaWVudCUyMFJvbWFuJTIwZnJlc2NvJTIwc2hvd2luZyUyMGElMjBtYW4lMjB3b3JraW5nJTIwb24lMjBoaXMlMjBsYXB0b3AlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJDbG9zZS11cCUyMHBob3RvZ3JhcGglMjBvZiUyMHlvdW5nJTIwYmxhY2slMjB3b21hbiUyMGFnYWluc3QlMjB1cmJhbiUyMGJhY2tncm91bmQlMkMlMjBoaWdoJTIwcXVhbGl0eSUyQyUyMGJva2VoJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyQXJtY2hhaXIlMjBpbiUyMHRoZSUyMHNoYXBlJTIwb2YlMjBhbiUyMGF2b2NhZG8lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJDbG93biUyMGFzdHJvbmF1dCUyMGluJTIwc3BhY2UlMkMlMjB3aXRoJTIwRWFydGglMjBpbiUyMHRoZSUyMGJhY2tncm91bmQlMjIlMkMlMEElNUQ=",highlighted:`prompts = [
    <span class="hljs-string">&quot;Labrador in the style of Hokusai&quot;</span>,
    <span class="hljs-string">&quot;Painting of a squirrel skating in New York&quot;</span>,
    <span class="hljs-string">&quot;HAL-9000 in the style of Van Gogh&quot;</span>,
    <span class="hljs-string">&quot;Times Square under water, with fish and a dolphin swimming around&quot;</span>,
    <span class="hljs-string">&quot;Ancient Roman fresco showing a man working on his laptop&quot;</span>,
    <span class="hljs-string">&quot;Close-up photograph of young black woman against urban background, high quality, bokeh&quot;</span>,
    <span class="hljs-string">&quot;Armchair in the shape of an avocado&quot;</span>,
    <span class="hljs-string">&quot;Clown astronaut in space, with Earth in the background&quot;</span>,
]`}}),_l=new h({props:{code:"cHJvbXB0X2lkcyUyMCUzRCUyMHBpcGVsaW5lLnByZXBhcmVfaW5wdXRzKHByb21wdHMpJTBBcHJvbXB0X2lkcyUyMCUzRCUyMHNoYXJkKHByb21wdF9pZHMpJTBBJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0X2lkcyUyQyUyMHBfcGFyYW1zJTJDJTIwcm5nJTJDJTIwaml0JTNEVHJ1ZSkuaW1hZ2VzJTBBaW1hZ2VzJTIwJTNEJTIwaW1hZ2VzLnJlc2hhcGUoKGltYWdlcy5zaGFwZSU1QjAlNUQlMjAqJTIwaW1hZ2VzLnNoYXBlJTVCMSU1RCUyQyklMjAlMkIlMjBpbWFnZXMuc2hhcGUlNUItMyUzQSU1RCklMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZS5udW1weV90b19waWwoaW1hZ2VzKSUwQSUwQWltYWdlX2dyaWQoaW1hZ2VzJTJDJTIwMiUyQyUyMDQp",highlighted:`prompt_ids = pipeline.prepare_inputs(prompts)
prompt_ids = shard(prompt_ids)

images = pipeline(prompt_ids, p_params, rng, jit=<span class="hljs-literal">True</span>).images
images = images.reshape((images.shape[<span class="hljs-number">0</span>] * images.shape[<span class="hljs-number">1</span>],) + images.shape[-<span class="hljs-number">3</span>:])
images = pipeline.numpy_to_pil(images)

image_grid(images, <span class="hljs-number">2</span>, <span class="hljs-number">4</span>)`}}),vl=new bt({}),kl=new h({props:{code:"cF9nZW5lcmF0ZSUyMCUzRCUyMHBtYXAocGlwZWxpbmUuX2dlbmVyYXRlKQ==",highlighted:"p_generate = pmap(pipeline._generate)"}}),Gl=new h({props:{code:"JTI1JTI1dGltZSUwQWltYWdlcyUyMCUzRCUyMHBfZ2VuZXJhdGUocHJvbXB0X2lkcyUyQyUyMHBfcGFyYW1zJTJDJTIwcm5nKSUwQWltYWdlcyUyMCUzRCUyMGltYWdlcy5ibG9ja191bnRpbF9yZWFkeSgpJTBBaW1hZ2VzLnNoYXBl",highlighted:`%%time
images = p<span class="hljs-constructor">_generate(<span class="hljs-params">prompt_ids</span>, <span class="hljs-params">p_params</span>, <span class="hljs-params">rng</span>)</span>
images = images.block<span class="hljs-constructor">_until_ready()</span>
images.shape`}}),Zl=new h({props:{code:"Q1BVJTIwdGltZXMlM0ElMjB1c2VyJTIwMW1pbiUyMDE1cyUyQyUyMHN5cyUzQSUyMDE4LjIlMjBzJTJDJTIwdG90YWwlM0ElMjAxbWluJTIwMzRzJTBBV2FsbCUyMHRpbWUlM0ElMjAxbWluJTIwMTVz",highlighted:`CPU times: user 1<span class="hljs-built_in">min</span> 15s, sys: <span class="hljs-number">18.2</span> s, total: 1<span class="hljs-built_in">min</span> 34s
Wall time: 1<span class="hljs-built_in">min</span> 15s`}}),Cl=new h({props:{code:"aW1hZ2VzLnNoYXBl",highlighted:"images.shape"}}),Wl=new h({props:{code:"KDglMkMlMjAxJTJDJTIwNTEyJTJDJTIwNTEyJTJDJTIwMyk=",highlighted:'(<span class="hljs-number">8</span>, <span class="hljs-number">1</span>, <span class="hljs-number">512</span>, <span class="hljs-number">512</span>, <span class="hljs-number">3</span>)'}}),{c(){B=o("meta"),Qe=n(),I=o("h1"),C=o("a"),pe=o("span"),y(R.$$.fragment),wt=n(),ie=o("span"),Jt=p("JAX / Flax\uC5D0\uC11C\uC758 \u{1F9E8} Stable Diffusion!"),Ye=n(),y(D.$$.fragment),Se=n(),W=o("p"),ht=p("\u{1F917} Hugging Face [Diffusers] ("),q=o("a"),jt=p("https://github.com/huggingface/diffusers"),dt=p(") \uB294 \uBC84\uC804 0.5.1\uBD80\uD130 Flax\uB97C \uC9C0\uC6D0\uD569\uB2C8\uB2E4! \uC774\uB97C \uD1B5\uD574 Colab, Kaggle, Google Cloud Platform\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uAC83\uCC98\uB7FC Google TPU\uC5D0\uC11C \uCD08\uACE0\uC18D \uCD94\uB860\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4."),Pe=n(),X=o("p"),Ut=p("\uC774 \uB178\uD2B8\uBD81\uC740 JAX / Flax\uB97C \uC0AC\uC6A9\uD574 \uCD94\uB860\uC744 \uC2E4\uD589\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. Stable Diffusion\uC758 \uC791\uB3D9 \uBC29\uC2DD\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uC6D0\uD558\uAC70\uB098 GPU\uC5D0\uC11C \uC2E4\uD589\uD558\uB824\uBA74 \uC774 [\uB178\uD2B8\uBD81] ]("),L=o("a"),Tt=p("https://huggingface.co/docs/diffusers/stable_diffusion)\uC744"),$t=p(" \uCC38\uC870\uD558\uC138\uC694."),Ve=n(),gl=o("p"),_t=p("\uBA3C\uC800, TPU \uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD558\uACE0 \uC788\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4. Colab\uC5D0\uC11C \uC774 \uB178\uD2B8\uBD81\uC744 \uC2E4\uD589\uD558\uB294 \uACBD\uC6B0, \uBA54\uB274\uC5D0\uC11C \uB7F0\uD0C0\uC784\uC744 \uC120\uD0DD\uD55C \uB2E4\uC74C \u201C\uB7F0\uD0C0\uC784 \uC720\uD615 \uBCC0\uACBD\u201D \uC635\uC158\uC744 \uC120\uD0DD\uD55C \uB2E4\uC74C \uD558\uB4DC\uC6E8\uC5B4 \uAC00\uC18D\uAE30 \uC124\uC815\uC5D0\uC11C TPU\uB97C \uC120\uD0DD\uD569\uB2C8\uB2E4."),He=n(),xl=o("p"),vt=p("JAX\uB294 TPU \uC804\uC6A9\uC740 \uC544\uB2C8\uC9C0\uB9CC \uAC01 TPU \uC11C\uBC84\uC5D0\uB294 8\uAC1C\uC758 TPU \uAC00\uC18D\uAE30\uAC00 \uBCD1\uB82C\uB85C \uC791\uB3D9\uD558\uAE30 \uB54C\uBB38\uC5D0 \uD574\uB2F9 \uD558\uB4DC\uC6E8\uC5B4\uC5D0\uC11C \uB354 \uBE5B\uC744 \uBC1C\uD55C\uB2E4\uB294 \uC810\uC740 \uC54C\uC544\uB450\uC138\uC694."),Ne=n(),k=o("h2"),g=o("a"),oe=o("span"),y(K.$$.fragment),Bt=n(),fe=o("span"),It=p("Setup"),ze=n(),Fl=o("p"),kt=p("\uBA3C\uC800 diffusers\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4."),Re=n(),y(O.$$.fragment),De=n(),y(ll.$$.fragment),qe=n(),y(el.$$.fragment),Le=n(),y(sl.$$.fragment),Ke=n(),Al=o("p"),Et=p("\uADF8\uB7F0 \uB2E4\uC74C \uBAA8\uB4E0 dependencies\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4."),Oe=n(),y(tl.$$.fragment),ls=n(),al=o("h2"),Gt=p("\uBAA8\uB378 \uBD88\uB7EC\uC624\uAE30"),es=n(),Ql=o("p"),Zt=p("TPU \uC7A5\uCE58\uB294 \uD6A8\uC728\uC801\uC778 half-float \uC720\uD615\uC778 bfloat16\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4. \uD14C\uC2A4\uD2B8\uC5D0\uB294 \uC774 \uC720\uD615\uC744 \uC0AC\uC6A9\uD558\uC9C0\uB9CC \uB300\uC2E0 float32\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC804\uCCB4 \uC815\uBC00\uB3C4(full precision)\uB97C \uC0AC\uC6A9\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),ss=n(),y(pl.$$.fragment),ts=n(),Yl=o("p"),Ct=p("Flax\uB294 \uD568\uC218\uD615 \uD504\uB808\uC784\uC6CC\uD06C\uC774\uBBC0\uB85C \uBAA8\uB378\uC740 \uBB34\uC0C1\uD0DC(stateless)\uD615\uC774\uBA70 \uB9E4\uAC1C\uBCC0\uC218\uB294 \uBAA8\uB378 \uC678\uBD80\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uC0AC\uC804\uD559\uC2B5\uB41C Flax \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD88\uB7EC\uC624\uBA74 \uD30C\uC774\uD504\uB77C\uC778 \uC790\uCCB4\uC640 \uBAA8\uB378 \uAC00\uC911\uCE58(\uB610\uB294 \uB9E4\uAC1C\uBCC0\uC218)\uAC00 \uBAA8\uB450 \uBC18\uD658\uB429\uB2C8\uB2E4. \uC800\uD76C\uB294 bf16 \uBC84\uC804\uC758 \uAC00\uC911\uCE58\uB97C \uC0AC\uC6A9\uD558\uACE0 \uC788\uC73C\uBBC0\uB85C \uC720\uD615 \uACBD\uACE0\uAC00 \uD45C\uC2DC\uB418\uC9C0\uB9CC \uBB34\uC2DC\uD574\uB3C4 \uB429\uB2C8\uB2E4."),as=n(),y(il.$$.fragment),ps=n(),ol=o("h2"),Wt=p("\uCD94\uB860"),is=n(),Sl=o("p"),Xt=p("TPU\uC5D0\uB294 \uC77C\uBC18\uC801\uC73C\uB85C 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4\uAC00 \uBCD1\uB82C\uB85C \uC791\uB3D9\uD558\uBBC0\uB85C \uBCF4\uC720\uD55C \uB514\uBC14\uC774\uC2A4 \uC218\uB9CC\uD07C \uD504\uB86C\uD504\uD2B8\uB97C \uBCF5\uC81C\uD569\uB2C8\uB2E4. \uADF8\uB7F0 \uB2E4\uC74C \uAC01\uAC01 \uD558\uB098\uC758 \uC774\uBBF8\uC9C0 \uC0DD\uC131\uC744 \uB2F4\uB2F9\uD558\uB294 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4\uC5D0\uC11C \uD55C \uBC88\uC5D0 \uCD94\uB860\uC744 \uC218\uD589\uD569\uB2C8\uB2E4. \uB530\uB77C\uC11C \uD558\uB098\uC758 \uCE69\uC774 \uD558\uB098\uC758 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uAC78\uB9AC\uB294 \uC2DC\uAC04\uACFC \uB3D9\uC77C\uD55C \uC2DC\uAC04\uC5D0 8\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),os=n(),x=o("p"),gt=p("\uD504\uB86C\uD504\uD2B8\uB97C \uBCF5\uC81C\uD558\uACE0 \uB098\uBA74 \uD30C\uC774\uD504\uB77C\uC778\uC758 "),re=o("code"),xt=p("prepare_inputs"),Ft=p(" \uD568\uC218\uB97C \uD638\uCD9C\uD558\uC5EC \uD1A0\uD070\uD654\uB41C \uD14D\uC2A4\uD2B8 ID\uB97C \uC5BB\uC2B5\uB2C8\uB2E4. \uD1A0\uD070\uD654\uB41C \uD14D\uC2A4\uD2B8\uC758 \uAE38\uC774\uB294 \uAE30\uBCF8 CLIP \uD14D\uC2A4\uD2B8 \uBAA8\uB378\uC758 \uAD6C\uC131\uC5D0 \uB530\uB77C 77\uD1A0\uD070\uC73C\uB85C \uC124\uC815\uB429\uB2C8\uB2E4."),fs=n(),y(fl.$$.fragment),rs=n(),y(rl.$$.fragment),ns=n(),E=o("h3"),F=o("a"),ne=o("span"),y(nl.$$.fragment),At=n(),me=o("span"),Qt=p("\uBCF5\uC0AC(Replication) \uBC0F \uC815\uB82C\uD654"),ms=n(),U=o("p"),Yt=p("\uBAA8\uB378 \uB9E4\uAC1C\uBCC0\uC218\uC640 \uC785\uB825\uAC12\uC740 \uC6B0\uB9AC\uAC00 \uBCF4\uC720\uD55C 8\uAC1C\uC758 \uBCD1\uB82C \uC7A5\uCE58\uC5D0 \uBCF5\uC0AC(Replication)\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218 \uB515\uC154\uB108\uB9AC\uB294 "),Me=o("code"),St=p("flax.jax_utils.replicate"),Pt=p("(\uB515\uC154\uB108\uB9AC\uB97C \uC21C\uD68C\uD558\uBA70 \uAC00\uC911\uCE58\uC758 \uBAA8\uC591\uC744 \uBCC0\uACBD\uD558\uC5EC 8\uBC88 \uBC18\uBCF5\uD558\uB294 \uD568\uC218)\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBCF5\uC0AC\uB429\uB2C8\uB2E4. \uBC30\uC5F4\uC740 "),ye=o("code"),Vt=p("shard"),Ht=p("\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBCF5\uC81C\uB429\uB2C8\uB2E4."),Ms=n(),y(ml.$$.fragment),ys=n(),y(Ml.$$.fragment),cs=n(),y(yl.$$.fragment),us=n(),A=o("p"),Nt=p("\uC774 shape\uC740 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4 \uAC01\uAC01\uC774 shape "),ce=o("code"),zt=p("(1, 77)"),Rt=p("\uC758 jnp \uBC30\uC5F4\uC744 \uC785\uB825\uAC12\uC73C\uB85C \uBC1B\uB294\uB2E4\uB294 \uC758\uBBF8\uC785\uB2C8\uB2E4. \uC989 1\uC740 \uB514\uBC14\uC774\uC2A4\uB2F9 batch(\uBC30\uCE58) \uD06C\uAE30\uC785\uB2C8\uB2E4. \uBA54\uBAA8\uB9AC\uAC00 \uCDA9\uBD84\uD55C TPU\uC5D0\uC11C\uB294 \uD55C \uBC88\uC5D0 \uC5EC\uB7EC \uC774\uBBF8\uC9C0(\uCE69\uB2F9)\uB97C \uC0DD\uC131\uD558\uB824\uB294 \uACBD\uC6B0 1\uBCF4\uB2E4 \uD074 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),bs=n(),Pl=o("p"),Dt=p("\uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC900\uBE44\uAC00 \uAC70\uC758 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4! \uC774\uC81C \uC0DD\uC131 \uD568\uC218\uC5D0 \uC804\uB2EC\uD560 \uB09C\uC218 \uC0DD\uC131\uAE30\uB9CC \uB9CC\uB4E4\uBA74 \uB429\uB2C8\uB2E4. \uC774\uAC83\uC740 \uB09C\uC218\uB97C \uB2E4\uB8E8\uB294 \uBAA8\uB4E0 \uD568\uC218\uC5D0 \uB09C\uC218 \uC0DD\uC131\uAE30\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4\uB294, \uB09C\uC218\uC5D0 \uB300\uD574 \uB9E4\uC6B0 \uC9C4\uC9C0\uD558\uACE0 \uB3C5\uB2E8\uC801\uC778 Flax\uC758 \uD45C\uC900 \uC808\uCC28\uC785\uB2C8\uB2E4. \uC774\uB807\uAC8C \uD558\uBA74 \uC5EC\uB7EC \uBD84\uC0B0\uB41C \uAE30\uAE30\uC5D0\uC11C \uD6C8\uB828\uD560 \uB54C\uC5D0\uB3C4 \uC7AC\uD604\uC131\uC774 \uBCF4\uC7A5\uB429\uB2C8\uB2E4."),ws=n(),Vl=o("p"),qt=p("\uC544\uB798 \uD5EC\uD37C \uD568\uC218\uB294 \uC2DC\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB09C\uC218 \uC0DD\uC131\uAE30\uB97C \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4. \uB3D9\uC77C\uD55C \uC2DC\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB294 \uD55C \uC815\uD655\uD788 \uB3D9\uC77C\uD55C \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB098\uC911\uC5D0 \uB178\uD2B8\uBD81\uC5D0\uC11C \uACB0\uACFC\uB97C \uD0D0\uC0C9\uD560 \uB54C\uC5D4 \uB2E4\uB978 \uC2DC\uB4DC\uB97C \uC790\uC720\uB86D\uAC8C \uC0AC\uC6A9\uD558\uC138\uC694."),Js=n(),y(cl.$$.fragment),hs=n(),Hl=o("p"),Lt=p("rng\uB97C \uC5BB\uC740 \uB2E4\uC74C 8\uBC88 \u2018\uBD84\uD560\u2019\uD558\uC5EC \uAC01 \uB514\uBC14\uC774\uC2A4\uAC00 \uB2E4\uB978 \uC81C\uB108\uB808\uC774\uD130\uB97C \uC218\uC2E0\uD558\uB3C4\uB85D \uD569\uB2C8\uB2E4. \uB530\uB77C\uC11C \uAC01 \uB514\uBC14\uC774\uC2A4\uB9C8\uB2E4 \uB2E4\uB978 \uC774\uBBF8\uC9C0\uAC00 \uC0DD\uC131\uB418\uBA70 \uC804\uCCB4 \uD504\uB85C\uC138\uC2A4\uB97C \uC7AC\uD604\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),js=n(),y(ul.$$.fragment),ds=n(),Nl=o("p"),Kt=p("JAX \uCF54\uB4DC\uB294 \uB9E4\uC6B0 \uBE60\uB974\uAC8C \uC2E4\uD589\uB418\uB294 \uD6A8\uC728\uC801\uC778 \uD45C\uD604\uC73C\uB85C \uCEF4\uD30C\uC77C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD558\uC9C0\uB9CC \uD6C4\uC18D \uD638\uCD9C\uC5D0\uC11C \uBAA8\uB4E0 \uC785\uB825\uC774 \uB3D9\uC77C\uD55C \uBAA8\uC591\uC744 \uAC16\uB3C4\uB85D \uD574\uC57C \uD558\uBA70, \uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 JAX\uAC00 \uCF54\uB4DC\uB97C \uB2E4\uC2DC \uCEF4\uD30C\uC77C\uD574\uC57C \uD558\uBBC0\uB85C \uCD5C\uC801\uD654\uB41C \uC18D\uB3C4\uB97C \uD65C\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."),Us=n(),bl=o("p"),ue=o("code"),Ot=p("jit = True"),la=p("\uB97C \uC778\uC218\uB85C \uC804\uB2EC\uD558\uBA74 Flax \uD30C\uC774\uD504\uB77C\uC778\uC774 \uCF54\uB4DC\uB97C \uCEF4\uD30C\uC77C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB610\uD55C \uBAA8\uB378\uC774 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4\uC5D0\uC11C \uBCD1\uB82C\uB85C \uC2E4\uD589\uB418\uB3C4\uB85D \uBCF4\uC7A5\uD569\uB2C8\uB2E4."),Ts=n(),zl=o("p"),ea=p("\uB2E4\uC74C \uC140\uC744 \uCC98\uC74C \uC2E4\uD589\uD558\uBA74 \uCEF4\uD30C\uC77C\uD558\uB294 \uB370 \uC2DC\uAC04\uC774 \uC624\uB798 \uAC78\uB9AC\uC9C0\uB9CC \uC774\uD6C4 \uD638\uCD9C(\uC785\uB825\uC774 \uB2E4\uB978 \uACBD\uC6B0\uC5D0\uB3C4)\uC740 \uD6E8\uC52C \uBE68\uB77C\uC9D1\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4, \uD14C\uC2A4\uD2B8\uD588\uC744 \uB54C TPU v2-8\uC5D0\uC11C \uCEF4\uD30C\uC77C\uD558\uB294 \uB370 1\uBD84 \uC774\uC0C1 \uAC78\uB9AC\uC9C0\uB9CC \uC774\uD6C4 \uCD94\uB860 \uC2E4\uD589\uC5D0\uB294 \uC57D 7\uCD08\uAC00 \uAC78\uB9BD\uB2C8\uB2E4."),$s=n(),y(wl.$$.fragment),_s=n(),y(Jl.$$.fragment),vs=n(),Q=o("p"),sa=p("\uBC18\uD658\uB41C \uBC30\uC5F4\uC758 shape\uC740 "),be=o("code"),ta=p("(8, 1, 512, 512, 3)"),aa=p("\uC785\uB2C8\uB2E4. \uC774\uB97C \uC7AC\uAD6C\uC131\uD558\uC5EC \uB450 \uBC88\uC9F8 \uCC28\uC6D0\uC744 \uC81C\uAC70\uD558\uACE0 512 \xD7 512 \xD7 3\uC758 \uC774\uBBF8\uC9C0 8\uAC1C\uB97C \uC5BB\uC740 \uB2E4\uC74C PIL\uB85C \uBCC0\uD658\uD569\uB2C8\uB2E4."),Bs=n(),y(hl.$$.fragment),Is=n(),jl=o("h3"),pa=p("\uC2DC\uAC01\uD654"),ks=n(),Rl=o("p"),ia=p("\uC774\uBBF8\uC9C0\uB97C \uADF8\uB9AC\uB4DC\uC5D0 \uD45C\uC2DC\uD558\uB294 \uB3C4\uC6B0\uBBF8 \uD568\uC218\uB97C \uB9CC\uB4E4\uC5B4 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),Es=n(),y(dl.$$.fragment),Gs=n(),y(Ul.$$.fragment),Zs=n(),Dl=o("p"),ql=o("img"),Cs=n(),Tl=o("h2"),oa=p("\uB2E4\uB978 \uD504\uB86C\uD504\uD2B8 \uC0AC\uC6A9"),Ws=n(),Ll=o("p"),fa=p("\uBAA8\uB4E0 \uB514\uBC14\uC774\uC2A4\uC5D0\uC11C \uB3D9\uC77C\uD55C \uD504\uB86C\uD504\uD2B8\uB97C \uBCF5\uC81C\uD560 \uD544\uC694\uB294 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8 2\uAC1C\uB97C \uAC01\uAC01 4\uBC88\uC529 \uC0DD\uC131\uD558\uAC70\uB098 \uD55C \uBC88\uC5D0 8\uAC1C\uC758 \uC11C\uB85C \uB2E4\uB978 \uD504\uB86C\uD504\uD2B8\uB97C \uC0DD\uC131\uD558\uB294 \uB4F1 \uC6D0\uD558\uB294 \uAC83\uC740 \uBB34\uC5C7\uC774\uB4E0 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD55C\uBC88 \uD574\uBCF4\uC138\uC694!"),Xs=n(),Kl=o("p"),ra=p("\uBA3C\uC800 \uC785\uB825 \uC900\uBE44 \uCF54\uB4DC\uB97C \uD3B8\uB9AC\uD55C \uD568\uC218\uB85C \uB9AC\uD329\uD130\uB9C1\uD558\uACA0\uC2B5\uB2C8\uB2E4:"),gs=n(),y($l.$$.fragment),xs=n(),y(_l.$$.fragment),Fs=n(),Ol=o("p"),le=o("img"),As=n(),G=o("h2"),Y=o("a"),we=o("span"),y(vl.$$.fragment),na=n(),Je=o("span"),ma=p("\uBCD1\uB82C\uD654(parallelization)\uB294 \uC5B4\uB5BB\uAC8C \uC791\uB3D9\uD558\uB294\uAC00?"),Qs=n(),S=o("p"),Ma=p("\uC55E\uC11C "),he=o("code"),ya=p("diffusers"),ca=p(" Flax \uD30C\uC774\uD504\uB77C\uC778\uC774 \uBAA8\uB378\uC744 \uC790\uB3D9\uC73C\uB85C \uCEF4\uD30C\uC77C\uD558\uACE0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uBAA8\uB4E0 \uAE30\uAE30\uC5D0\uC11C \uBCD1\uB82C\uB85C \uC2E4\uD589\uD55C\uB2E4\uACE0 \uB9D0\uC500\uB4DC\uB838\uC2B5\uB2C8\uB2E4. \uC774\uC81C \uADF8 \uD504\uB85C\uC138\uC2A4\uB97C \uAC04\uB7B5\uD558\uAC8C \uC0B4\uD3B4\uBCF4\uACE0 \uC791\uB3D9 \uBC29\uC2DD\uC744 \uBCF4\uC5EC\uB4DC\uB9AC\uACA0\uC2B5\uB2C8\uB2E4."),Ys=n(),T=o("p"),ua=p("JAX \uBCD1\uB82C\uD654\uB294 \uC5EC\uB7EC \uAC00\uC9C0 \uBC29\uBC95\uC73C\uB85C \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAC00\uC7A5 \uC26C\uC6B4 \uBC29\uBC95\uC740 jax.pmap \uD568\uC218\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB2E8\uC77C \uD504\uB85C\uADF8\uB7A8, \uB2E4\uC911 \uB370\uC774\uD130(SPMD) \uBCD1\uB82C\uD654\uB97C \uB2EC\uC131\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC989, \uB3D9\uC77C\uD55C \uCF54\uB4DC\uC758 \uBCF5\uC0AC\uBCF8\uC744 \uAC01\uAC01 \uB2E4\uB978 \uB370\uC774\uD130 \uC785\uB825\uC5D0 \uB300\uD574 \uC5EC\uB7EC \uAC1C \uC2E4\uD589\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uB354 \uC815\uAD50\uD55C \uC811\uADFC \uBC29\uC2DD\uB3C4 \uAC00\uB2A5\uD558\uBBC0\uB85C \uAD00\uC2EC\uC774 \uC788\uC73C\uC2DC\uB2E4\uBA74 "),Bl=o("a"),ba=p("JAX \uBB38\uC11C"),wa=p("\uC640 "),P=o("a"),je=o("code"),Ja=p("pjit"),ha=p(" \uD398\uC774\uC9C0"),ja=p("\uC5D0\uC11C \uC774 \uC8FC\uC81C\uB97C \uC0B4\uD3B4\uBCF4\uC2DC\uAE30 \uBC14\uB78D\uB2C8\uB2E4!"),Ss=n(),Il=o("p"),de=o("code"),da=p("jax.pmap"),Ua=p("\uC740 \uB450 \uAC00\uC9C0 \uAE30\uB2A5\uC744 \uC218\uD589\uD569\uB2C8\uB2E4:"),Ps=n(),V=o("ul"),$=o("li"),Ue=o("code"),Ta=p("jax.jit()"),$a=p("\uB97C \uD638\uCD9C\uD55C \uAC83\uCC98\uB7FC \uCF54\uB4DC\uB97C \uCEF4\uD30C\uC77C(\uB610\uB294 "),Te=o("code"),_a=p("jit"),va=p(")\uD569\uB2C8\uB2E4. \uC774 \uC791\uC5C5\uC740 "),$e=o("code"),Ba=p("pmap"),Ia=p("\uC744 \uD638\uCD9C\uD560 \uB54C\uAC00 \uC544\uB2C8\uB77C pmapped \uD568\uC218\uAC00 \uCC98\uC74C \uD638\uCD9C\uB420 \uB54C \uC218\uD589\uB429\uB2C8\uB2E4."),ka=n(),_e=o("li"),Ea=p("\uCEF4\uD30C\uC77C\uB41C \uCF54\uB4DC\uAC00 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uBAA8\uB4E0 \uAE30\uAE30\uC5D0\uC11C \uBCD1\uB82C\uB85C \uC2E4\uD589\uB418\uB3C4\uB85D \uD569\uB2C8\uB2E4."),Vs=n(),d=o("p"),Ga=p("\uC791\uB3D9 \uBC29\uC2DD\uC744 \uBCF4\uC5EC\uB4DC\uB9AC\uAE30 \uC704\uD574 \uC774\uBBF8\uC9C0 \uC0DD\uC131\uC744 \uC2E4\uD589\uD558\uB294 \uBE44\uACF5\uAC1C \uBA54\uC11C\uB4DC\uC778 \uD30C\uC774\uD504\uB77C\uC778\uC758 "),ve=o("code"),Za=p("_generate"),Ca=p(" \uBA54\uC11C\uB4DC\uB97C "),Be=o("code"),Wa=p("pmap"),Xa=p("\uD569\uB2C8\uB2E4. \uC774 \uBA54\uC11C\uB4DC\uB294 \uD5A5\uD6C4 "),Ie=o("code"),ga=p("Diffusers"),xa=p(" \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC774\uB984\uC774 \uBCC0\uACBD\uB418\uAC70\uB098 \uC81C\uAC70\uB420 \uC218 \uC788\uB2E4\uB294 \uC810\uC5D0 \uC720\uC758\uD558\uC138\uC694."),Hs=n(),y(kl.$$.fragment),Ns=n(),Z=o("p"),ke=o("code"),Fa=p("pmap"),Aa=p("\uC744 \uC0AC\uC6A9\uD55C \uD6C4 \uC900\uBE44\uB41C \uD568\uC218 "),Ee=o("code"),Qa=p("p_generate"),Ya=p("\uB294 \uAC1C\uB150\uC801\uC73C\uB85C \uB2E4\uC74C\uC744 \uC218\uD589\uD569\uB2C8\uB2E4:"),zs=n(),H=o("ul"),El=o("li"),Sa=p("\uAC01 \uC7A5\uCE58\uC5D0\uC11C \uAE30\uBCF8 \uD568\uC218 "),Ge=o("code"),Pa=p("pipeline._generate"),Va=p("\uC758 \uBCF5\uC0AC\uBCF8\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4."),Ha=n(),j=o("li"),Na=p("\uAC01 \uC7A5\uCE58\uC5D0 \uC785\uB825 \uC778\uC218\uC758 \uB2E4\uB978 \uBD80\uBD84\uC744 \uBCF4\uB0C5\uB2C8\uB2E4. \uC774\uAC83\uC774 \uBC14\uB85C \uC0E4\uB529\uC774 \uC0AC\uC6A9\uB418\uB294 \uC774\uC720\uC785\uB2C8\uB2E4. \uC774 \uACBD\uC6B0 "),Ze=o("code"),za=p("prompt_ids"),Ra=p("\uC758 shape\uC740 "),Ce=o("code"),Da=p("(8, 1, 77, 768)"),qa=p("\uC785\uB2C8\uB2E4. \uC774 \uBC30\uC5F4\uC740 8\uAC1C\uB85C \uBD84\uD560\uB418\uACE0 "),We=o("code"),La=p("_generate"),Ka=p("\uC758 \uAC01 \uBCF5\uC0AC\uBCF8\uC740 "),Xe=o("code"),Oa=p("(1, 77, 768)"),lp=p("\uC758 shape\uC744 \uAC00\uC9C4 \uC785\uB825\uC744 \uBC1B\uAC8C \uB429\uB2C8\uB2E4."),Rs=n(),_=o("p"),ep=p("\uBCD1\uB82C\uB85C \uD638\uCD9C\uB41C\uB2E4\uB294 \uC0AC\uC2E4\uC744 \uC644\uC804\uD788 \uBB34\uC2DC\uD558\uACE0 "),ge=o("code"),sp=p("_generate"),tp=p("\uB97C \uCF54\uB529\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. batch(\uBC30\uCE58) \uD06C\uAE30(\uC774 \uC608\uC81C\uC5D0\uC11C\uB294 "),xe=o("code"),ap=p("1"),pp=p(")\uC640 \uCF54\uB4DC\uC5D0 \uC801\uD569\uD55C \uCC28\uC6D0\uB9CC \uC2E0\uACBD \uC4F0\uBA74 \uB418\uBA70, \uBCD1\uB82C\uB85C \uC791\uB3D9\uD558\uAE30 \uC704\uD574 \uC544\uBB34\uAC83\uB3C4 \uBCC0\uACBD\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."),Ds=n(),ee=o("p"),ip=p("\uD30C\uC774\uD504\uB77C\uC778 \uD638\uCD9C\uC744 \uC0AC\uC6A9\uD560 \uB54C\uC640 \uB9C8\uCC2C\uAC00\uC9C0\uB85C, \uB2E4\uC74C \uC140\uC744 \uCC98\uC74C \uC2E4\uD589\uD560 \uB54C\uB294 \uC2DC\uAC04\uC774 \uAC78\uB9AC\uC9C0\uB9CC \uADF8 \uC774\uD6C4\uC5D0\uB294 \uD6E8\uC52C \uBE68\uB77C\uC9D1\uB2C8\uB2E4."),qs=n(),y(Gl.$$.fragment),Ls=n(),y(Zl.$$.fragment),Ks=n(),y(Cl.$$.fragment),Os=n(),y(Wl.$$.fragment),lt=n(),N=o("p"),op=p("JAX\uB294 \uBE44\uB3D9\uAE30 \uB514\uC2A4\uD328\uCE58\uB97C \uC0AC\uC6A9\uD558\uACE0 \uAC00\uB2A5\uD55C \uD55C \uBE68\uB9AC \uC81C\uC5B4\uAD8C\uC744 Python \uB8E8\uD504\uC5D0 \uBC18\uD658\uD558\uAE30 \uB54C\uBB38\uC5D0 \uCD94\uB860 \uC2DC\uAC04\uC744 \uC815\uD655\uD558\uAC8C \uCE21\uC815\uD558\uAE30 \uC704\uD574 "),Fe=o("code"),fp=p("block_until_ready()"),rp=p("\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uC544\uC9C1 \uAD6C\uCCB4\uD654\uB418\uC9C0 \uC54A\uC740 \uACC4\uC0B0 \uACB0\uACFC\uB97C \uC0AC\uC6A9\uD558\uB824\uB294 \uACBD\uC6B0 \uC790\uB3D9\uC73C\uB85C \uCC28\uB2E8\uC774 \uC218\uD589\uB418\uBBC0\uB85C \uCF54\uB4DC\uC5D0\uC11C \uC774 \uD568\uC218\uB97C \uC0AC\uC6A9\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."),this.h()},l(l){const t=ki('[data-svelte="svelte-1phssyn"]',document.head);B=f(t,"META",{name:!0,content:!0}),t.forEach(e),Qe=m(l),I=f(l,"H1",{class:!0});var st=r(I);C=f(st,"A",{id:!0,class:!0,href:!0});var bp=r(C);pe=f(bp,"SPAN",{});var wp=r(pe);c(R.$$.fragment,wp),wp.forEach(e),bp.forEach(e),wt=m(st),ie=f(st,"SPAN",{});var Jp=r(ie);Jt=i(Jp,"JAX / Flax\uC5D0\uC11C\uC758 \u{1F9E8} Stable Diffusion!"),Jp.forEach(e),st.forEach(e),Ye=m(l),c(D.$$.fragment,l),Se=m(l),W=f(l,"P",{});var tt=r(W);ht=i(tt,"\u{1F917} Hugging Face [Diffusers] ("),q=f(tt,"A",{href:!0,rel:!0});var hp=r(q);jt=i(hp,"https://github.com/huggingface/diffusers"),hp.forEach(e),dt=i(tt,") \uB294 \uBC84\uC804 0.5.1\uBD80\uD130 Flax\uB97C \uC9C0\uC6D0\uD569\uB2C8\uB2E4! \uC774\uB97C \uD1B5\uD574 Colab, Kaggle, Google Cloud Platform\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uAC83\uCC98\uB7FC Google TPU\uC5D0\uC11C \uCD08\uACE0\uC18D \uCD94\uB860\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4."),tt.forEach(e),Pe=m(l),X=f(l,"P",{});var at=r(X);Ut=i(at,"\uC774 \uB178\uD2B8\uBD81\uC740 JAX / Flax\uB97C \uC0AC\uC6A9\uD574 \uCD94\uB860\uC744 \uC2E4\uD589\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. Stable Diffusion\uC758 \uC791\uB3D9 \uBC29\uC2DD\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uC6D0\uD558\uAC70\uB098 GPU\uC5D0\uC11C \uC2E4\uD589\uD558\uB824\uBA74 \uC774 [\uB178\uD2B8\uBD81] ]("),L=f(at,"A",{href:!0,rel:!0});var jp=r(L);Tt=i(jp,"https://huggingface.co/docs/diffusers/stable_diffusion)\uC744"),jp.forEach(e),$t=i(at," \uCC38\uC870\uD558\uC138\uC694."),at.forEach(e),Ve=m(l),gl=f(l,"P",{});var dp=r(gl);_t=i(dp,"\uBA3C\uC800, TPU \uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD558\uACE0 \uC788\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4. Colab\uC5D0\uC11C \uC774 \uB178\uD2B8\uBD81\uC744 \uC2E4\uD589\uD558\uB294 \uACBD\uC6B0, \uBA54\uB274\uC5D0\uC11C \uB7F0\uD0C0\uC784\uC744 \uC120\uD0DD\uD55C \uB2E4\uC74C \u201C\uB7F0\uD0C0\uC784 \uC720\uD615 \uBCC0\uACBD\u201D \uC635\uC158\uC744 \uC120\uD0DD\uD55C \uB2E4\uC74C \uD558\uB4DC\uC6E8\uC5B4 \uAC00\uC18D\uAE30 \uC124\uC815\uC5D0\uC11C TPU\uB97C \uC120\uD0DD\uD569\uB2C8\uB2E4."),dp.forEach(e),He=m(l),xl=f(l,"P",{});var Up=r(xl);vt=i(Up,"JAX\uB294 TPU \uC804\uC6A9\uC740 \uC544\uB2C8\uC9C0\uB9CC \uAC01 TPU \uC11C\uBC84\uC5D0\uB294 8\uAC1C\uC758 TPU \uAC00\uC18D\uAE30\uAC00 \uBCD1\uB82C\uB85C \uC791\uB3D9\uD558\uAE30 \uB54C\uBB38\uC5D0 \uD574\uB2F9 \uD558\uB4DC\uC6E8\uC5B4\uC5D0\uC11C \uB354 \uBE5B\uC744 \uBC1C\uD55C\uB2E4\uB294 \uC810\uC740 \uC54C\uC544\uB450\uC138\uC694."),Up.forEach(e),Ne=m(l),k=f(l,"H2",{class:!0});var pt=r(k);g=f(pt,"A",{id:!0,class:!0,href:!0});var Tp=r(g);oe=f(Tp,"SPAN",{});var $p=r(oe);c(K.$$.fragment,$p),$p.forEach(e),Tp.forEach(e),Bt=m(pt),fe=f(pt,"SPAN",{});var _p=r(fe);It=i(_p,"Setup"),_p.forEach(e),pt.forEach(e),ze=m(l),Fl=f(l,"P",{});var vp=r(Fl);kt=i(vp,"\uBA3C\uC800 diffusers\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4."),vp.forEach(e),Re=m(l),c(O.$$.fragment,l),De=m(l),c(ll.$$.fragment,l),qe=m(l),c(el.$$.fragment,l),Le=m(l),c(sl.$$.fragment,l),Ke=m(l),Al=f(l,"P",{});var Bp=r(Al);Et=i(Bp,"\uADF8\uB7F0 \uB2E4\uC74C \uBAA8\uB4E0 dependencies\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4."),Bp.forEach(e),Oe=m(l),c(tl.$$.fragment,l),ls=m(l),al=f(l,"H2",{id:!0});var Ip=r(al);Gt=i(Ip,"\uBAA8\uB378 \uBD88\uB7EC\uC624\uAE30"),Ip.forEach(e),es=m(l),Ql=f(l,"P",{});var kp=r(Ql);Zt=i(kp,"TPU \uC7A5\uCE58\uB294 \uD6A8\uC728\uC801\uC778 half-float \uC720\uD615\uC778 bfloat16\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4. \uD14C\uC2A4\uD2B8\uC5D0\uB294 \uC774 \uC720\uD615\uC744 \uC0AC\uC6A9\uD558\uC9C0\uB9CC \uB300\uC2E0 float32\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC804\uCCB4 \uC815\uBC00\uB3C4(full precision)\uB97C \uC0AC\uC6A9\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),kp.forEach(e),ss=m(l),c(pl.$$.fragment,l),ts=m(l),Yl=f(l,"P",{});var Ep=r(Yl);Ct=i(Ep,"Flax\uB294 \uD568\uC218\uD615 \uD504\uB808\uC784\uC6CC\uD06C\uC774\uBBC0\uB85C \uBAA8\uB378\uC740 \uBB34\uC0C1\uD0DC(stateless)\uD615\uC774\uBA70 \uB9E4\uAC1C\uBCC0\uC218\uB294 \uBAA8\uB378 \uC678\uBD80\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uC0AC\uC804\uD559\uC2B5\uB41C Flax \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD88\uB7EC\uC624\uBA74 \uD30C\uC774\uD504\uB77C\uC778 \uC790\uCCB4\uC640 \uBAA8\uB378 \uAC00\uC911\uCE58(\uB610\uB294 \uB9E4\uAC1C\uBCC0\uC218)\uAC00 \uBAA8\uB450 \uBC18\uD658\uB429\uB2C8\uB2E4. \uC800\uD76C\uB294 bf16 \uBC84\uC804\uC758 \uAC00\uC911\uCE58\uB97C \uC0AC\uC6A9\uD558\uACE0 \uC788\uC73C\uBBC0\uB85C \uC720\uD615 \uACBD\uACE0\uAC00 \uD45C\uC2DC\uB418\uC9C0\uB9CC \uBB34\uC2DC\uD574\uB3C4 \uB429\uB2C8\uB2E4."),Ep.forEach(e),as=m(l),c(il.$$.fragment,l),ps=m(l),ol=f(l,"H2",{id:!0});var Gp=r(ol);Wt=i(Gp,"\uCD94\uB860"),Gp.forEach(e),is=m(l),Sl=f(l,"P",{});var Zp=r(Sl);Xt=i(Zp,"TPU\uC5D0\uB294 \uC77C\uBC18\uC801\uC73C\uB85C 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4\uAC00 \uBCD1\uB82C\uB85C \uC791\uB3D9\uD558\uBBC0\uB85C \uBCF4\uC720\uD55C \uB514\uBC14\uC774\uC2A4 \uC218\uB9CC\uD07C \uD504\uB86C\uD504\uD2B8\uB97C \uBCF5\uC81C\uD569\uB2C8\uB2E4. \uADF8\uB7F0 \uB2E4\uC74C \uAC01\uAC01 \uD558\uB098\uC758 \uC774\uBBF8\uC9C0 \uC0DD\uC131\uC744 \uB2F4\uB2F9\uD558\uB294 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4\uC5D0\uC11C \uD55C \uBC88\uC5D0 \uCD94\uB860\uC744 \uC218\uD589\uD569\uB2C8\uB2E4. \uB530\uB77C\uC11C \uD558\uB098\uC758 \uCE69\uC774 \uD558\uB098\uC758 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uAC78\uB9AC\uB294 \uC2DC\uAC04\uACFC \uB3D9\uC77C\uD55C \uC2DC\uAC04\uC5D0 8\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Zp.forEach(e),os=m(l),x=f(l,"P",{});var it=r(x);gt=i(it,"\uD504\uB86C\uD504\uD2B8\uB97C \uBCF5\uC81C\uD558\uACE0 \uB098\uBA74 \uD30C\uC774\uD504\uB77C\uC778\uC758 "),re=f(it,"CODE",{});var Cp=r(re);xt=i(Cp,"prepare_inputs"),Cp.forEach(e),Ft=i(it," \uD568\uC218\uB97C \uD638\uCD9C\uD558\uC5EC \uD1A0\uD070\uD654\uB41C \uD14D\uC2A4\uD2B8 ID\uB97C \uC5BB\uC2B5\uB2C8\uB2E4. \uD1A0\uD070\uD654\uB41C \uD14D\uC2A4\uD2B8\uC758 \uAE38\uC774\uB294 \uAE30\uBCF8 CLIP \uD14D\uC2A4\uD2B8 \uBAA8\uB378\uC758 \uAD6C\uC131\uC5D0 \uB530\uB77C 77\uD1A0\uD070\uC73C\uB85C \uC124\uC815\uB429\uB2C8\uB2E4."),it.forEach(e),fs=m(l),c(fl.$$.fragment,l),rs=m(l),c(rl.$$.fragment,l),ns=m(l),E=f(l,"H3",{class:!0});var ot=r(E);F=f(ot,"A",{id:!0,class:!0,href:!0});var Wp=r(F);ne=f(Wp,"SPAN",{});var Xp=r(ne);c(nl.$$.fragment,Xp),Xp.forEach(e),Wp.forEach(e),At=m(ot),me=f(ot,"SPAN",{});var gp=r(me);Qt=i(gp,"\uBCF5\uC0AC(Replication) \uBC0F \uC815\uB82C\uD654"),gp.forEach(e),ot.forEach(e),ms=m(l),U=f(l,"P",{});var se=r(U);Yt=i(se,"\uBAA8\uB378 \uB9E4\uAC1C\uBCC0\uC218\uC640 \uC785\uB825\uAC12\uC740 \uC6B0\uB9AC\uAC00 \uBCF4\uC720\uD55C 8\uAC1C\uC758 \uBCD1\uB82C \uC7A5\uCE58\uC5D0 \uBCF5\uC0AC(Replication)\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218 \uB515\uC154\uB108\uB9AC\uB294 "),Me=f(se,"CODE",{});var xp=r(Me);St=i(xp,"flax.jax_utils.replicate"),xp.forEach(e),Pt=i(se,"(\uB515\uC154\uB108\uB9AC\uB97C \uC21C\uD68C\uD558\uBA70 \uAC00\uC911\uCE58\uC758 \uBAA8\uC591\uC744 \uBCC0\uACBD\uD558\uC5EC 8\uBC88 \uBC18\uBCF5\uD558\uB294 \uD568\uC218)\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBCF5\uC0AC\uB429\uB2C8\uB2E4. \uBC30\uC5F4\uC740 "),ye=f(se,"CODE",{});var Fp=r(ye);Vt=i(Fp,"shard"),Fp.forEach(e),Ht=i(se,"\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBCF5\uC81C\uB429\uB2C8\uB2E4."),se.forEach(e),Ms=m(l),c(ml.$$.fragment,l),ys=m(l),c(Ml.$$.fragment,l),cs=m(l),c(yl.$$.fragment,l),us=m(l),A=f(l,"P",{});var ft=r(A);Nt=i(ft,"\uC774 shape\uC740 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4 \uAC01\uAC01\uC774 shape "),ce=f(ft,"CODE",{});var Ap=r(ce);zt=i(Ap,"(1, 77)"),Ap.forEach(e),Rt=i(ft,"\uC758 jnp \uBC30\uC5F4\uC744 \uC785\uB825\uAC12\uC73C\uB85C \uBC1B\uB294\uB2E4\uB294 \uC758\uBBF8\uC785\uB2C8\uB2E4. \uC989 1\uC740 \uB514\uBC14\uC774\uC2A4\uB2F9 batch(\uBC30\uCE58) \uD06C\uAE30\uC785\uB2C8\uB2E4. \uBA54\uBAA8\uB9AC\uAC00 \uCDA9\uBD84\uD55C TPU\uC5D0\uC11C\uB294 \uD55C \uBC88\uC5D0 \uC5EC\uB7EC \uC774\uBBF8\uC9C0(\uCE69\uB2F9)\uB97C \uC0DD\uC131\uD558\uB824\uB294 \uACBD\uC6B0 1\uBCF4\uB2E4 \uD074 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ft.forEach(e),bs=m(l),Pl=f(l,"P",{});var Qp=r(Pl);Dt=i(Qp,"\uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC900\uBE44\uAC00 \uAC70\uC758 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4! \uC774\uC81C \uC0DD\uC131 \uD568\uC218\uC5D0 \uC804\uB2EC\uD560 \uB09C\uC218 \uC0DD\uC131\uAE30\uB9CC \uB9CC\uB4E4\uBA74 \uB429\uB2C8\uB2E4. \uC774\uAC83\uC740 \uB09C\uC218\uB97C \uB2E4\uB8E8\uB294 \uBAA8\uB4E0 \uD568\uC218\uC5D0 \uB09C\uC218 \uC0DD\uC131\uAE30\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4\uB294, \uB09C\uC218\uC5D0 \uB300\uD574 \uB9E4\uC6B0 \uC9C4\uC9C0\uD558\uACE0 \uB3C5\uB2E8\uC801\uC778 Flax\uC758 \uD45C\uC900 \uC808\uCC28\uC785\uB2C8\uB2E4. \uC774\uB807\uAC8C \uD558\uBA74 \uC5EC\uB7EC \uBD84\uC0B0\uB41C \uAE30\uAE30\uC5D0\uC11C \uD6C8\uB828\uD560 \uB54C\uC5D0\uB3C4 \uC7AC\uD604\uC131\uC774 \uBCF4\uC7A5\uB429\uB2C8\uB2E4."),Qp.forEach(e),ws=m(l),Vl=f(l,"P",{});var Yp=r(Vl);qt=i(Yp,"\uC544\uB798 \uD5EC\uD37C \uD568\uC218\uB294 \uC2DC\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB09C\uC218 \uC0DD\uC131\uAE30\uB97C \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4. \uB3D9\uC77C\uD55C \uC2DC\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB294 \uD55C \uC815\uD655\uD788 \uB3D9\uC77C\uD55C \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB098\uC911\uC5D0 \uB178\uD2B8\uBD81\uC5D0\uC11C \uACB0\uACFC\uB97C \uD0D0\uC0C9\uD560 \uB54C\uC5D4 \uB2E4\uB978 \uC2DC\uB4DC\uB97C \uC790\uC720\uB86D\uAC8C \uC0AC\uC6A9\uD558\uC138\uC694."),Yp.forEach(e),Js=m(l),c(cl.$$.fragment,l),hs=m(l),Hl=f(l,"P",{});var Sp=r(Hl);Lt=i(Sp,"rng\uB97C \uC5BB\uC740 \uB2E4\uC74C 8\uBC88 \u2018\uBD84\uD560\u2019\uD558\uC5EC \uAC01 \uB514\uBC14\uC774\uC2A4\uAC00 \uB2E4\uB978 \uC81C\uB108\uB808\uC774\uD130\uB97C \uC218\uC2E0\uD558\uB3C4\uB85D \uD569\uB2C8\uB2E4. \uB530\uB77C\uC11C \uAC01 \uB514\uBC14\uC774\uC2A4\uB9C8\uB2E4 \uB2E4\uB978 \uC774\uBBF8\uC9C0\uAC00 \uC0DD\uC131\uB418\uBA70 \uC804\uCCB4 \uD504\uB85C\uC138\uC2A4\uB97C \uC7AC\uD604\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Sp.forEach(e),js=m(l),c(ul.$$.fragment,l),ds=m(l),Nl=f(l,"P",{});var Pp=r(Nl);Kt=i(Pp,"JAX \uCF54\uB4DC\uB294 \uB9E4\uC6B0 \uBE60\uB974\uAC8C \uC2E4\uD589\uB418\uB294 \uD6A8\uC728\uC801\uC778 \uD45C\uD604\uC73C\uB85C \uCEF4\uD30C\uC77C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD558\uC9C0\uB9CC \uD6C4\uC18D \uD638\uCD9C\uC5D0\uC11C \uBAA8\uB4E0 \uC785\uB825\uC774 \uB3D9\uC77C\uD55C \uBAA8\uC591\uC744 \uAC16\uB3C4\uB85D \uD574\uC57C \uD558\uBA70, \uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 JAX\uAC00 \uCF54\uB4DC\uB97C \uB2E4\uC2DC \uCEF4\uD30C\uC77C\uD574\uC57C \uD558\uBBC0\uB85C \uCD5C\uC801\uD654\uB41C \uC18D\uB3C4\uB97C \uD65C\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."),Pp.forEach(e),Us=m(l),bl=f(l,"P",{});var np=r(bl);ue=f(np,"CODE",{});var Vp=r(ue);Ot=i(Vp,"jit = True"),Vp.forEach(e),la=i(np,"\uB97C \uC778\uC218\uB85C \uC804\uB2EC\uD558\uBA74 Flax \uD30C\uC774\uD504\uB77C\uC778\uC774 \uCF54\uB4DC\uB97C \uCEF4\uD30C\uC77C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB610\uD55C \uBAA8\uB378\uC774 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C 8\uAC1C\uC758 \uB514\uBC14\uC774\uC2A4\uC5D0\uC11C \uBCD1\uB82C\uB85C \uC2E4\uD589\uB418\uB3C4\uB85D \uBCF4\uC7A5\uD569\uB2C8\uB2E4."),np.forEach(e),Ts=m(l),zl=f(l,"P",{});var Hp=r(zl);ea=i(Hp,"\uB2E4\uC74C \uC140\uC744 \uCC98\uC74C \uC2E4\uD589\uD558\uBA74 \uCEF4\uD30C\uC77C\uD558\uB294 \uB370 \uC2DC\uAC04\uC774 \uC624\uB798 \uAC78\uB9AC\uC9C0\uB9CC \uC774\uD6C4 \uD638\uCD9C(\uC785\uB825\uC774 \uB2E4\uB978 \uACBD\uC6B0\uC5D0\uB3C4)\uC740 \uD6E8\uC52C \uBE68\uB77C\uC9D1\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4, \uD14C\uC2A4\uD2B8\uD588\uC744 \uB54C TPU v2-8\uC5D0\uC11C \uCEF4\uD30C\uC77C\uD558\uB294 \uB370 1\uBD84 \uC774\uC0C1 \uAC78\uB9AC\uC9C0\uB9CC \uC774\uD6C4 \uCD94\uB860 \uC2E4\uD589\uC5D0\uB294 \uC57D 7\uCD08\uAC00 \uAC78\uB9BD\uB2C8\uB2E4."),Hp.forEach(e),$s=m(l),c(wl.$$.fragment,l),_s=m(l),c(Jl.$$.fragment,l),vs=m(l),Q=f(l,"P",{});var rt=r(Q);sa=i(rt,"\uBC18\uD658\uB41C \uBC30\uC5F4\uC758 shape\uC740 "),be=f(rt,"CODE",{});var Np=r(be);ta=i(Np,"(8, 1, 512, 512, 3)"),Np.forEach(e),aa=i(rt,"\uC785\uB2C8\uB2E4. \uC774\uB97C \uC7AC\uAD6C\uC131\uD558\uC5EC \uB450 \uBC88\uC9F8 \uCC28\uC6D0\uC744 \uC81C\uAC70\uD558\uACE0 512 \xD7 512 \xD7 3\uC758 \uC774\uBBF8\uC9C0 8\uAC1C\uB97C \uC5BB\uC740 \uB2E4\uC74C PIL\uB85C \uBCC0\uD658\uD569\uB2C8\uB2E4."),rt.forEach(e),Bs=m(l),c(hl.$$.fragment,l),Is=m(l),jl=f(l,"H3",{id:!0});var zp=r(jl);pa=i(zp,"\uC2DC\uAC01\uD654"),zp.forEach(e),ks=m(l),Rl=f(l,"P",{});var Rp=r(Rl);ia=i(Rp,"\uC774\uBBF8\uC9C0\uB97C \uADF8\uB9AC\uB4DC\uC5D0 \uD45C\uC2DC\uD558\uB294 \uB3C4\uC6B0\uBBF8 \uD568\uC218\uB97C \uB9CC\uB4E4\uC5B4 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),Rp.forEach(e),Es=m(l),c(dl.$$.fragment,l),Gs=m(l),c(Ul.$$.fragment,l),Zs=m(l),Dl=f(l,"P",{});var Dp=r(Dl);ql=f(Dp,"IMG",{src:!0,alt:!0}),Dp.forEach(e),Cs=m(l),Tl=f(l,"H2",{id:!0});var qp=r(Tl);oa=i(qp,"\uB2E4\uB978 \uD504\uB86C\uD504\uD2B8 \uC0AC\uC6A9"),qp.forEach(e),Ws=m(l),Ll=f(l,"P",{});var Lp=r(Ll);fa=i(Lp,"\uBAA8\uB4E0 \uB514\uBC14\uC774\uC2A4\uC5D0\uC11C \uB3D9\uC77C\uD55C \uD504\uB86C\uD504\uD2B8\uB97C \uBCF5\uC81C\uD560 \uD544\uC694\uB294 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8 2\uAC1C\uB97C \uAC01\uAC01 4\uBC88\uC529 \uC0DD\uC131\uD558\uAC70\uB098 \uD55C \uBC88\uC5D0 8\uAC1C\uC758 \uC11C\uB85C \uB2E4\uB978 \uD504\uB86C\uD504\uD2B8\uB97C \uC0DD\uC131\uD558\uB294 \uB4F1 \uC6D0\uD558\uB294 \uAC83\uC740 \uBB34\uC5C7\uC774\uB4E0 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD55C\uBC88 \uD574\uBCF4\uC138\uC694!"),Lp.forEach(e),Xs=m(l),Kl=f(l,"P",{});var Kp=r(Kl);ra=i(Kp,"\uBA3C\uC800 \uC785\uB825 \uC900\uBE44 \uCF54\uB4DC\uB97C \uD3B8\uB9AC\uD55C \uD568\uC218\uB85C \uB9AC\uD329\uD130\uB9C1\uD558\uACA0\uC2B5\uB2C8\uB2E4:"),Kp.forEach(e),gs=m(l),c($l.$$.fragment,l),xs=m(l),c(_l.$$.fragment,l),Fs=m(l),Ol=f(l,"P",{});var Op=r(Ol);le=f(Op,"IMG",{src:!0,alt:!0}),Op.forEach(e),As=m(l),G=f(l,"H2",{class:!0});var nt=r(G);Y=f(nt,"A",{id:!0,class:!0,href:!0});var li=r(Y);we=f(li,"SPAN",{});var ei=r(we);c(vl.$$.fragment,ei),ei.forEach(e),li.forEach(e),na=m(nt),Je=f(nt,"SPAN",{});var si=r(Je);ma=i(si,"\uBCD1\uB82C\uD654(parallelization)\uB294 \uC5B4\uB5BB\uAC8C \uC791\uB3D9\uD558\uB294\uAC00?"),si.forEach(e),nt.forEach(e),Qs=m(l),S=f(l,"P",{});var mt=r(S);Ma=i(mt,"\uC55E\uC11C "),he=f(mt,"CODE",{});var ti=r(he);ya=i(ti,"diffusers"),ti.forEach(e),ca=i(mt," Flax \uD30C\uC774\uD504\uB77C\uC778\uC774 \uBAA8\uB378\uC744 \uC790\uB3D9\uC73C\uB85C \uCEF4\uD30C\uC77C\uD558\uACE0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uBAA8\uB4E0 \uAE30\uAE30\uC5D0\uC11C \uBCD1\uB82C\uB85C \uC2E4\uD589\uD55C\uB2E4\uACE0 \uB9D0\uC500\uB4DC\uB838\uC2B5\uB2C8\uB2E4. \uC774\uC81C \uADF8 \uD504\uB85C\uC138\uC2A4\uB97C \uAC04\uB7B5\uD558\uAC8C \uC0B4\uD3B4\uBCF4\uACE0 \uC791\uB3D9 \uBC29\uC2DD\uC744 \uBCF4\uC5EC\uB4DC\uB9AC\uACA0\uC2B5\uB2C8\uB2E4."),mt.forEach(e),Ys=m(l),T=f(l,"P",{});var te=r(T);ua=i(te,"JAX \uBCD1\uB82C\uD654\uB294 \uC5EC\uB7EC \uAC00\uC9C0 \uBC29\uBC95\uC73C\uB85C \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAC00\uC7A5 \uC26C\uC6B4 \uBC29\uBC95\uC740 jax.pmap \uD568\uC218\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB2E8\uC77C \uD504\uB85C\uADF8\uB7A8, \uB2E4\uC911 \uB370\uC774\uD130(SPMD) \uBCD1\uB82C\uD654\uB97C \uB2EC\uC131\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC989, \uB3D9\uC77C\uD55C \uCF54\uB4DC\uC758 \uBCF5\uC0AC\uBCF8\uC744 \uAC01\uAC01 \uB2E4\uB978 \uB370\uC774\uD130 \uC785\uB825\uC5D0 \uB300\uD574 \uC5EC\uB7EC \uAC1C \uC2E4\uD589\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uB354 \uC815\uAD50\uD55C \uC811\uADFC \uBC29\uC2DD\uB3C4 \uAC00\uB2A5\uD558\uBBC0\uB85C \uAD00\uC2EC\uC774 \uC788\uC73C\uC2DC\uB2E4\uBA74 "),Bl=f(te,"A",{href:!0,rel:!0});var ai=r(Bl);ba=i(ai,"JAX \uBB38\uC11C"),ai.forEach(e),wa=i(te,"\uC640 "),P=f(te,"A",{href:!0,rel:!0});var mp=r(P);je=f(mp,"CODE",{});var pi=r(je);Ja=i(pi,"pjit"),pi.forEach(e),ha=i(mp," \uD398\uC774\uC9C0"),mp.forEach(e),ja=i(te,"\uC5D0\uC11C \uC774 \uC8FC\uC81C\uB97C \uC0B4\uD3B4\uBCF4\uC2DC\uAE30 \uBC14\uB78D\uB2C8\uB2E4!"),te.forEach(e),Ss=m(l),Il=f(l,"P",{});var Mp=r(Il);de=f(Mp,"CODE",{});var ii=r(de);da=i(ii,"jax.pmap"),ii.forEach(e),Ua=i(Mp,"\uC740 \uB450 \uAC00\uC9C0 \uAE30\uB2A5\uC744 \uC218\uD589\uD569\uB2C8\uB2E4:"),Mp.forEach(e),Ps=m(l),V=f(l,"UL",{});var Mt=r(V);$=f(Mt,"LI",{});var Xl=r($);Ue=f(Xl,"CODE",{});var oi=r(Ue);Ta=i(oi,"jax.jit()"),oi.forEach(e),$a=i(Xl,"\uB97C \uD638\uCD9C\uD55C \uAC83\uCC98\uB7FC \uCF54\uB4DC\uB97C \uCEF4\uD30C\uC77C(\uB610\uB294 "),Te=f(Xl,"CODE",{});var fi=r(Te);_a=i(fi,"jit"),fi.forEach(e),va=i(Xl,")\uD569\uB2C8\uB2E4. \uC774 \uC791\uC5C5\uC740 "),$e=f(Xl,"CODE",{});var ri=r($e);Ba=i(ri,"pmap"),ri.forEach(e),Ia=i(Xl,"\uC744 \uD638\uCD9C\uD560 \uB54C\uAC00 \uC544\uB2C8\uB77C pmapped \uD568\uC218\uAC00 \uCC98\uC74C \uD638\uCD9C\uB420 \uB54C \uC218\uD589\uB429\uB2C8\uB2E4."),Xl.forEach(e),ka=m(Mt),_e=f(Mt,"LI",{});var ni=r(_e);Ea=i(ni,"\uCEF4\uD30C\uC77C\uB41C \uCF54\uB4DC\uAC00 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uBAA8\uB4E0 \uAE30\uAE30\uC5D0\uC11C \uBCD1\uB82C\uB85C \uC2E4\uD589\uB418\uB3C4\uB85D \uD569\uB2C8\uB2E4."),ni.forEach(e),Mt.forEach(e),Vs=m(l),d=f(l,"P",{});var z=r(d);Ga=i(z,"\uC791\uB3D9 \uBC29\uC2DD\uC744 \uBCF4\uC5EC\uB4DC\uB9AC\uAE30 \uC704\uD574 \uC774\uBBF8\uC9C0 \uC0DD\uC131\uC744 \uC2E4\uD589\uD558\uB294 \uBE44\uACF5\uAC1C \uBA54\uC11C\uB4DC\uC778 \uD30C\uC774\uD504\uB77C\uC778\uC758 "),ve=f(z,"CODE",{});var mi=r(ve);Za=i(mi,"_generate"),mi.forEach(e),Ca=i(z," \uBA54\uC11C\uB4DC\uB97C "),Be=f(z,"CODE",{});var Mi=r(Be);Wa=i(Mi,"pmap"),Mi.forEach(e),Xa=i(z,"\uD569\uB2C8\uB2E4. \uC774 \uBA54\uC11C\uB4DC\uB294 \uD5A5\uD6C4 "),Ie=f(z,"CODE",{});var yi=r(Ie);ga=i(yi,"Diffusers"),yi.forEach(e),xa=i(z," \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC774\uB984\uC774 \uBCC0\uACBD\uB418\uAC70\uB098 \uC81C\uAC70\uB420 \uC218 \uC788\uB2E4\uB294 \uC810\uC5D0 \uC720\uC758\uD558\uC138\uC694."),z.forEach(e),Hs=m(l),c(kl.$$.fragment,l),Ns=m(l),Z=f(l,"P",{});var Ae=r(Z);ke=f(Ae,"CODE",{});var ci=r(ke);Fa=i(ci,"pmap"),ci.forEach(e),Aa=i(Ae,"\uC744 \uC0AC\uC6A9\uD55C \uD6C4 \uC900\uBE44\uB41C \uD568\uC218 "),Ee=f(Ae,"CODE",{});var ui=r(Ee);Qa=i(ui,"p_generate"),ui.forEach(e),Ya=i(Ae,"\uB294 \uAC1C\uB150\uC801\uC73C\uB85C \uB2E4\uC74C\uC744 \uC218\uD589\uD569\uB2C8\uB2E4:"),Ae.forEach(e),zs=m(l),H=f(l,"UL",{});var yt=r(H);El=f(yt,"LI",{});var ct=r(El);Sa=i(ct,"\uAC01 \uC7A5\uCE58\uC5D0\uC11C \uAE30\uBCF8 \uD568\uC218 "),Ge=f(ct,"CODE",{});var bi=r(Ge);Pa=i(bi,"pipeline._generate"),bi.forEach(e),Va=i(ct,"\uC758 \uBCF5\uC0AC\uBCF8\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4."),ct.forEach(e),Ha=m(yt),j=f(yt,"LI",{});var v=r(j);Na=i(v,"\uAC01 \uC7A5\uCE58\uC5D0 \uC785\uB825 \uC778\uC218\uC758 \uB2E4\uB978 \uBD80\uBD84\uC744 \uBCF4\uB0C5\uB2C8\uB2E4. \uC774\uAC83\uC774 \uBC14\uB85C \uC0E4\uB529\uC774 \uC0AC\uC6A9\uB418\uB294 \uC774\uC720\uC785\uB2C8\uB2E4. \uC774 \uACBD\uC6B0 "),Ze=f(v,"CODE",{});var wi=r(Ze);za=i(wi,"prompt_ids"),wi.forEach(e),Ra=i(v,"\uC758 shape\uC740 "),Ce=f(v,"CODE",{});var Ji=r(Ce);Da=i(Ji,"(8, 1, 77, 768)"),Ji.forEach(e),qa=i(v,"\uC785\uB2C8\uB2E4. \uC774 \uBC30\uC5F4\uC740 8\uAC1C\uB85C \uBD84\uD560\uB418\uACE0 "),We=f(v,"CODE",{});var hi=r(We);La=i(hi,"_generate"),hi.forEach(e),Ka=i(v,"\uC758 \uAC01 \uBCF5\uC0AC\uBCF8\uC740 "),Xe=f(v,"CODE",{});var ji=r(Xe);Oa=i(ji,"(1, 77, 768)"),ji.forEach(e),lp=i(v,"\uC758 shape\uC744 \uAC00\uC9C4 \uC785\uB825\uC744 \uBC1B\uAC8C \uB429\uB2C8\uB2E4."),v.forEach(e),yt.forEach(e),Rs=m(l),_=f(l,"P",{});var ae=r(_);ep=i(ae,"\uBCD1\uB82C\uB85C \uD638\uCD9C\uB41C\uB2E4\uB294 \uC0AC\uC2E4\uC744 \uC644\uC804\uD788 \uBB34\uC2DC\uD558\uACE0 "),ge=f(ae,"CODE",{});var di=r(ge);sp=i(di,"_generate"),di.forEach(e),tp=i(ae,"\uB97C \uCF54\uB529\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. batch(\uBC30\uCE58) \uD06C\uAE30(\uC774 \uC608\uC81C\uC5D0\uC11C\uB294 "),xe=f(ae,"CODE",{});var Ui=r(xe);ap=i(Ui,"1"),Ui.forEach(e),pp=i(ae,")\uC640 \uCF54\uB4DC\uC5D0 \uC801\uD569\uD55C \uCC28\uC6D0\uB9CC \uC2E0\uACBD \uC4F0\uBA74 \uB418\uBA70, \uBCD1\uB82C\uB85C \uC791\uB3D9\uD558\uAE30 \uC704\uD574 \uC544\uBB34\uAC83\uB3C4 \uBCC0\uACBD\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."),ae.forEach(e),Ds=m(l),ee=f(l,"P",{});var Ti=r(ee);ip=i(Ti,"\uD30C\uC774\uD504\uB77C\uC778 \uD638\uCD9C\uC744 \uC0AC\uC6A9\uD560 \uB54C\uC640 \uB9C8\uCC2C\uAC00\uC9C0\uB85C, \uB2E4\uC74C \uC140\uC744 \uCC98\uC74C \uC2E4\uD589\uD560 \uB54C\uB294 \uC2DC\uAC04\uC774 \uAC78\uB9AC\uC9C0\uB9CC \uADF8 \uC774\uD6C4\uC5D0\uB294 \uD6E8\uC52C \uBE68\uB77C\uC9D1\uB2C8\uB2E4."),Ti.forEach(e),qs=m(l),c(Gl.$$.fragment,l),Ls=m(l),c(Zl.$$.fragment,l),Ks=m(l),c(Cl.$$.fragment,l),Os=m(l),c(Wl.$$.fragment,l),lt=m(l),N=f(l,"P",{});var ut=r(N);op=i(ut,"JAX\uB294 \uBE44\uB3D9\uAE30 \uB514\uC2A4\uD328\uCE58\uB97C \uC0AC\uC6A9\uD558\uACE0 \uAC00\uB2A5\uD55C \uD55C \uBE68\uB9AC \uC81C\uC5B4\uAD8C\uC744 Python \uB8E8\uD504\uC5D0 \uBC18\uD658\uD558\uAE30 \uB54C\uBB38\uC5D0 \uCD94\uB860 \uC2DC\uAC04\uC744 \uC815\uD655\uD558\uAC8C \uCE21\uC815\uD558\uAE30 \uC704\uD574 "),Fe=f(ut,"CODE",{});var $i=r(Fe);fp=i($i,"block_until_ready()"),$i.forEach(e),rp=i(ut,"\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uC544\uC9C1 \uAD6C\uCCB4\uD654\uB418\uC9C0 \uC54A\uC740 \uACC4\uC0B0 \uACB0\uACFC\uB97C \uC0AC\uC6A9\uD558\uB824\uB294 \uACBD\uC6B0 \uC790\uB3D9\uC73C\uB85C \uCC28\uB2E8\uC774 \uC218\uD589\uB418\uBBC0\uB85C \uCF54\uB4DC\uC5D0\uC11C \uC774 \uD568\uC218\uB97C \uC0AC\uC6A9\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."),ut.forEach(e),this.h()},h(){M(B,"name","hf:doc:metadata"),M(B,"content",JSON.stringify(Wi)),M(C,"id","jax-flax-stable-diffusion"),M(C,"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"),M(C,"href","#jax-flax-stable-diffusion"),M(I,"class","relative group"),M(q,"href","https://github.com/huggingface/diffusers"),M(q,"rel","nofollow"),M(L,"href","https://huggingface.co/docs/diffusers/stable_diffusion)%EC%9D%84"),M(L,"rel","nofollow"),M(g,"id","setup"),M(g,"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"),M(g,"href","#setup"),M(k,"class","relative group"),M(al,"id",""),M(ol,"id",""),M(F,"id","replication"),M(F,"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"),M(F,"href","#replication"),M(E,"class","relative group"),M(jl,"id",""),_i(ql.src,cp="https://huggingface.co/datasets/YiYiXu/test-doc-assets/resolve/main/stable_diffusion_jax_how_to_cell_38_output_0.jpeg")||M(ql,"src",cp),M(ql,"alt","img"),M(Tl,"id",""),_i(le.src,up="https://huggingface.co/datasets/YiYiXu/test-doc-assets/resolve/main/stable_diffusion_jax_how_to_cell_43_output_0.jpeg")||M(le,"src",up),M(le,"alt","img"),M(Y,"id","parallelization"),M(Y,"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"),M(Y,"href","#parallelization"),M(G,"class","relative group"),M(Bl,"href","https://jax.readthedocs.io/en/latest/index.html"),M(Bl,"rel","nofollow"),M(P,"href","https://jax.readthedocs.io/en/latest/jax-101/08-pjit.html?highlight=pjit"),M(P,"rel","nofollow")},m(l,t){s(document.head,B),a(l,Qe,t),a(l,I,t),s(I,C),s(C,pe),u(R,pe,null),s(I,wt),s(I,ie),s(ie,Jt),a(l,Ye,t),u(D,l,t),a(l,Se,t),a(l,W,t),s(W,ht),s(W,q),s(q,jt),s(W,dt),a(l,Pe,t),a(l,X,t),s(X,Ut),s(X,L),s(L,Tt),s(X,$t),a(l,Ve,t),a(l,gl,t),s(gl,_t),a(l,He,t),a(l,xl,t),s(xl,vt),a(l,Ne,t),a(l,k,t),s(k,g),s(g,oe),u(K,oe,null),s(k,Bt),s(k,fe),s(fe,It),a(l,ze,t),a(l,Fl,t),s(Fl,kt),a(l,Re,t),u(O,l,t),a(l,De,t),u(ll,l,t),a(l,qe,t),u(el,l,t),a(l,Le,t),u(sl,l,t),a(l,Ke,t),a(l,Al,t),s(Al,Et),a(l,Oe,t),u(tl,l,t),a(l,ls,t),a(l,al,t),s(al,Gt),a(l,es,t),a(l,Ql,t),s(Ql,Zt),a(l,ss,t),u(pl,l,t),a(l,ts,t),a(l,Yl,t),s(Yl,Ct),a(l,as,t),u(il,l,t),a(l,ps,t),a(l,ol,t),s(ol,Wt),a(l,is,t),a(l,Sl,t),s(Sl,Xt),a(l,os,t),a(l,x,t),s(x,gt),s(x,re),s(re,xt),s(x,Ft),a(l,fs,t),u(fl,l,t),a(l,rs,t),u(rl,l,t),a(l,ns,t),a(l,E,t),s(E,F),s(F,ne),u(nl,ne,null),s(E,At),s(E,me),s(me,Qt),a(l,ms,t),a(l,U,t),s(U,Yt),s(U,Me),s(Me,St),s(U,Pt),s(U,ye),s(ye,Vt),s(U,Ht),a(l,Ms,t),u(ml,l,t),a(l,ys,t),u(Ml,l,t),a(l,cs,t),u(yl,l,t),a(l,us,t),a(l,A,t),s(A,Nt),s(A,ce),s(ce,zt),s(A,Rt),a(l,bs,t),a(l,Pl,t),s(Pl,Dt),a(l,ws,t),a(l,Vl,t),s(Vl,qt),a(l,Js,t),u(cl,l,t),a(l,hs,t),a(l,Hl,t),s(Hl,Lt),a(l,js,t),u(ul,l,t),a(l,ds,t),a(l,Nl,t),s(Nl,Kt),a(l,Us,t),a(l,bl,t),s(bl,ue),s(ue,Ot),s(bl,la),a(l,Ts,t),a(l,zl,t),s(zl,ea),a(l,$s,t),u(wl,l,t),a(l,_s,t),u(Jl,l,t),a(l,vs,t),a(l,Q,t),s(Q,sa),s(Q,be),s(be,ta),s(Q,aa),a(l,Bs,t),u(hl,l,t),a(l,Is,t),a(l,jl,t),s(jl,pa),a(l,ks,t),a(l,Rl,t),s(Rl,ia),a(l,Es,t),u(dl,l,t),a(l,Gs,t),u(Ul,l,t),a(l,Zs,t),a(l,Dl,t),s(Dl,ql),a(l,Cs,t),a(l,Tl,t),s(Tl,oa),a(l,Ws,t),a(l,Ll,t),s(Ll,fa),a(l,Xs,t),a(l,Kl,t),s(Kl,ra),a(l,gs,t),u($l,l,t),a(l,xs,t),u(_l,l,t),a(l,Fs,t),a(l,Ol,t),s(Ol,le),a(l,As,t),a(l,G,t),s(G,Y),s(Y,we),u(vl,we,null),s(G,na),s(G,Je),s(Je,ma),a(l,Qs,t),a(l,S,t),s(S,Ma),s(S,he),s(he,ya),s(S,ca),a(l,Ys,t),a(l,T,t),s(T,ua),s(T,Bl),s(Bl,ba),s(T,wa),s(T,P),s(P,je),s(je,Ja),s(P,ha),s(T,ja),a(l,Ss,t),a(l,Il,t),s(Il,de),s(de,da),s(Il,Ua),a(l,Ps,t),a(l,V,t),s(V,$),s($,Ue),s(Ue,Ta),s($,$a),s($,Te),s(Te,_a),s($,va),s($,$e),s($e,Ba),s($,Ia),s(V,ka),s(V,_e),s(_e,Ea),a(l,Vs,t),a(l,d,t),s(d,Ga),s(d,ve),s(ve,Za),s(d,Ca),s(d,Be),s(Be,Wa),s(d,Xa),s(d,Ie),s(Ie,ga),s(d,xa),a(l,Hs,t),u(kl,l,t),a(l,Ns,t),a(l,Z,t),s(Z,ke),s(ke,Fa),s(Z,Aa),s(Z,Ee),s(Ee,Qa),s(Z,Ya),a(l,zs,t),a(l,H,t),s(H,El),s(El,Sa),s(El,Ge),s(Ge,Pa),s(El,Va),s(H,Ha),s(H,j),s(j,Na),s(j,Ze),s(Ze,za),s(j,Ra),s(j,Ce),s(Ce,Da),s(j,qa),s(j,We),s(We,La),s(j,Ka),s(j,Xe),s(Xe,Oa),s(j,lp),a(l,Rs,t),a(l,_,t),s(_,ep),s(_,ge),s(ge,sp),s(_,tp),s(_,xe),s(xe,ap),s(_,pp),a(l,Ds,t),a(l,ee,t),s(ee,ip),a(l,qs,t),u(Gl,l,t),a(l,Ls,t),u(Zl,l,t),a(l,Ks,t),u(Cl,l,t),a(l,Os,t),u(Wl,l,t),a(l,lt,t),a(l,N,t),s(N,op),s(N,Fe),s(Fe,fp),s(N,rp),et=!0},p:Ei,i(l){et||(b(R.$$.fragment,l),b(D.$$.fragment,l),b(K.$$.fragment,l),b(O.$$.fragment,l),b(ll.$$.fragment,l),b(el.$$.fragment,l),b(sl.$$.fragment,l),b(tl.$$.fragment,l),b(pl.$$.fragment,l),b(il.$$.fragment,l),b(fl.$$.fragment,l),b(rl.$$.fragment,l),b(nl.$$.fragment,l),b(ml.$$.fragment,l),b(Ml.$$.fragment,l),b(yl.$$.fragment,l),b(cl.$$.fragment,l),b(ul.$$.fragment,l),b(wl.$$.fragment,l),b(Jl.$$.fragment,l),b(hl.$$.fragment,l),b(dl.$$.fragment,l),b(Ul.$$.fragment,l),b($l.$$.fragment,l),b(_l.$$.fragment,l),b(vl.$$.fragment,l),b(kl.$$.fragment,l),b(Gl.$$.fragment,l),b(Zl.$$.fragment,l),b(Cl.$$.fragment,l),b(Wl.$$.fragment,l),et=!0)},o(l){w(R.$$.fragment,l),w(D.$$.fragment,l),w(K.$$.fragment,l),w(O.$$.fragment,l),w(ll.$$.fragment,l),w(el.$$.fragment,l),w(sl.$$.fragment,l),w(tl.$$.fragment,l),w(pl.$$.fragment,l),w(il.$$.fragment,l),w(fl.$$.fragment,l),w(rl.$$.fragment,l),w(nl.$$.fragment,l),w(ml.$$.fragment,l),w(Ml.$$.fragment,l),w(yl.$$.fragment,l),w(cl.$$.fragment,l),w(ul.$$.fragment,l),w(wl.$$.fragment,l),w(Jl.$$.fragment,l),w(hl.$$.fragment,l),w(dl.$$.fragment,l),w(Ul.$$.fragment,l),w($l.$$.fragment,l),w(_l.$$.fragment,l),w(vl.$$.fragment,l),w(kl.$$.fragment,l),w(Gl.$$.fragment,l),w(Zl.$$.fragment,l),w(Cl.$$.fragment,l),w(Wl.$$.fragment,l),et=!1},d(l){e(B),l&&e(Qe),l&&e(I),J(R),l&&e(Ye),J(D,l),l&&e(Se),l&&e(W),l&&e(Pe),l&&e(X),l&&e(Ve),l&&e(gl),l&&e(He),l&&e(xl),l&&e(Ne),l&&e(k),J(K),l&&e(ze),l&&e(Fl),l&&e(Re),J(O,l),l&&e(De),J(ll,l),l&&e(qe),J(el,l),l&&e(Le),J(sl,l),l&&e(Ke),l&&e(Al),l&&e(Oe),J(tl,l),l&&e(ls),l&&e(al),l&&e(es),l&&e(Ql),l&&e(ss),J(pl,l),l&&e(ts),l&&e(Yl),l&&e(as),J(il,l),l&&e(ps),l&&e(ol),l&&e(is),l&&e(Sl),l&&e(os),l&&e(x),l&&e(fs),J(fl,l),l&&e(rs),J(rl,l),l&&e(ns),l&&e(E),J(nl),l&&e(ms),l&&e(U),l&&e(Ms),J(ml,l),l&&e(ys),J(Ml,l),l&&e(cs),J(yl,l),l&&e(us),l&&e(A),l&&e(bs),l&&e(Pl),l&&e(ws),l&&e(Vl),l&&e(Js),J(cl,l),l&&e(hs),l&&e(Hl),l&&e(js),J(ul,l),l&&e(ds),l&&e(Nl),l&&e(Us),l&&e(bl),l&&e(Ts),l&&e(zl),l&&e($s),J(wl,l),l&&e(_s),J(Jl,l),l&&e(vs),l&&e(Q),l&&e(Bs),J(hl,l),l&&e(Is),l&&e(jl),l&&e(ks),l&&e(Rl),l&&e(Es),J(dl,l),l&&e(Gs),J(Ul,l),l&&e(Zs),l&&e(Dl),l&&e(Cs),l&&e(Tl),l&&e(Ws),l&&e(Ll),l&&e(Xs),l&&e(Kl),l&&e(gs),J($l,l),l&&e(xs),J(_l,l),l&&e(Fs),l&&e(Ol),l&&e(As),l&&e(G),J(vl),l&&e(Qs),l&&e(S),l&&e(Ys),l&&e(T),l&&e(Ss),l&&e(Il),l&&e(Ps),l&&e(V),l&&e(Vs),l&&e(d),l&&e(Hs),J(kl,l),l&&e(Ns),l&&e(Z),l&&e(zs),l&&e(H),l&&e(Rs),l&&e(_),l&&e(Ds),l&&e(ee),l&&e(qs),J(Gl,l),l&&e(Ls),J(Zl,l),l&&e(Ks),J(Cl,l),l&&e(Os),J(Wl,l),l&&e(lt),l&&e(N)}}}const Wi={local:"jax-flax-stable-diffusion",sections:[{local:"setup",title:"Setup"},{local:"",title:"\uBAA8\uB378 \uBD88\uB7EC\uC624\uAE30"},{local:"",sections:[{local:"replication",title:"\uBCF5\uC0AC(Replication) \uBC0F \uC815\uB82C\uD654"},{local:"",title:"\uC2DC\uAC01\uD654"}],title:"\uCD94\uB860"},{local:"",title:"\uB2E4\uB978 \uD504\uB86C\uD504\uD2B8 \uC0AC\uC6A9"},{local:"parallelization",title:"\uBCD1\uB82C\uD654(parallelization)\uB294 \uC5B4\uB5BB\uAC8C \uC791\uB3D9\uD558\uB294\uAC00?"}],title:"JAX / Flax\uC5D0\uC11C\uC758 \u{1F9E8} Stable Diffusion!"};function Xi(yp){return Gi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qi extends vi{constructor(B){super();Bi(this,B,Xi,Ci,Ii,{})}}export{Qi as default,Wi as metadata};
