import{s as Oe,o as el,n as Ke}from"../chunks/scheduler.d9d004e7.js";import{S as ll,i as tl,e as p,s as a,c as r,h as sl,a as o,d as t,b as i,f as qe,g as f,j as u,k as Le,l as al,m as s,n as M,t as h,o as c,p as d}from"../chunks/index.4a2b774c.js";import{T as Pe}from"../chunks/Tip.cf0287e4.js";import{C as il,H as P,E as nl}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.2d77c8e6.js";import{C as ee}from"../chunks/CodeBlock.8806415f.js";function pl(K){let n,w='Check out the <a href="/examples/stable-diffusion">example</a> provided in the official Github repository.';return{c(){n=p("p"),n.innerHTML=w},l(m){n=o(m,"P",{"data-svelte-h":!0}),u(n)!=="svelte-nh37zv"&&(n.innerHTML=w)},m(m,y){s(m,n,y)},p:Ke,d(m){m&&t(n)}}}function ol(K){let n,w="There are two different checkpoints for Stable Diffusion 2:",m,y,g='<li>use <a href="https://huggingface.co/stabilityai/stable-diffusion-2-1" rel="nofollow">stabilityai/stable-diffusion-2-1</a> for generating 768x768 images</li> <li>use <a href="https://huggingface.co/stabilityai/stable-diffusion-2-1-base" rel="nofollow">stabilityai/stable-diffusion-2-1-base</a> for generating 512x512 images</li>';return{c(){n=p("p"),n.textContent=w,m=a(),y=p("ul"),y.innerHTML=g},l(U){n=o(U,"P",{"data-svelte-h":!0}),u(n)!=="svelte-d87t4v"&&(n.textContent=w),m=i(U),y=o(U,"UL",{"data-svelte-h":!0}),u(y)!=="svelte-1iu11ek"&&(y.innerHTML=g)},m(U,b){s(U,n,b),s(U,m,b),s(U,y,b)},p:Ke,d(U){U&&(t(n),t(m),t(y))}}}function ul(K){let n,w,m,y,g,U,b,le,j,Ie=`Stable Diffusion is a text-to-image latent diffusion model.
Check out this <a href="https://huggingface.co/blog/stable_diffusion" rel="nofollow">blog post</a> for more information.`,te,Z,se,$,Re="To generate images with Stable Diffusion on Gaudi, you need to instantiate two instances:",ae,W,ke="<li>A pipeline with <code>GaudiStableDiffusionPipeline</code>. This pipeline supports <em>text-to-image generation</em>.</li> <li>A scheduler with <code>GaudiDDIMScheduler</code>. This scheduler has been optimized for Gaudi.</li>",ie,G,xe=`When initializing the pipeline, you have to specify <code>use_habana=True</code> to deploy it on HPUs.
Furthermore, to get the fastest possible generations you should enable <strong>HPU graphs</strong> with <code>use_hpu_graphs=True</code>.
Finally, you will need to specify a <a href="../package_reference/gaudi_config">Gaudi configuration</a> which can be downloaded from the Hugging Face Hub.`,ne,C,pe,V,Be="You can then call the pipeline to generate images from one or several prompts:",oe,_,ue,I,Ee="Generated images can be returned as either PIL images or NumPy arrays, depending on the <code>output_type</code> option.",me,T,re,R,fe,k,Se=`<a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/stable_diffusion_2" rel="nofollow">Stable Diffusion 2</a> can be used with the exact same classes.
Here is an example:`,Me,x,he,J,ce,B,de,E,ve="The Stable Diffusion upscaler diffusion model was created by the researchers and engineers from CompVis, Stability AI, and LAION. It is used to enhance the resolution of input images by a factor of 4.",ye,S,He='See <a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/upscale" rel="nofollow">here</a> for more information.',Ue,v,be,H,Xe="To generate RGB and depth images with Stable Diffusion Upscale on Gaudi, you need to instantiate two instances:",we,X,Ne="<li>A pipeline with <code>GaudiStableDiffusionUpscalePipeline</code>.</li> <li>A scheduler with <code>GaudiDDIMScheduler</code>. This scheduler has been optimized for Gaudi.</li>",ge,N,Ye=`When initializing the pipeline, you have to specify <code>use_habana=True</code> to deploy it on HPUs.
Furthermore, to get the fastest possible generations you should enable <strong>HPU graphs</strong> with <code>use_hpu_graphs=True</code>.
Finally, you will need to specify a <a href="../package_reference/gaudi_config">Gaudi configuration</a> which can be downloaded from the Hugging Face Hub.`,Te,Y,Je,z,je,Q,ze=`To accelerate your Stable Diffusion pipeline, you can run it in full <em>bfloat16</em> precision.
This will also save memory.
You just need to pass <code>torch_dtype=torch.bfloat16</code> to <code>from_pretrained</code> when instantiating your pipeline.
Here is how to do it:`,Ze,F,$e,D,We,A,Qe='<a href="https://arxiv.org/abs/2208.01618" rel="nofollow">Textual Inversion</a> is a method to personalize text2image models like Stable Diffusion on your own images using just 3-5 examples.',Ge,q,Fe='You can find <a href="https://github.com/huggingface/optimum-habana/blob/main/examples/stable-diffusion/textual_inversion.py" rel="nofollow">here</a> an example script that implements this training method.',Ce,L,Ve,O,_e;return g=new il({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),b=new P({props:{title:"Stable Diffusion",local:"stable-diffusion",headingTag:"h1"}}),Z=new P({props:{title:"How to generate images?",local:"how-to-generate-images",headingTag:"h2"}}),C=new ee({props:{code:"ZnJvbSUyMG9wdGltdW0uaGFiYW5hLmRpZmZ1c2VycyUyMGltcG9ydCUyMEdhdWRpRERJTVNjaGVkdWxlciUyQyUyMEdhdWRpU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFtb2RlbF9uYW1lJTIwJTNEJTIwJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUwQSUwQXNjaGVkdWxlciUyMCUzRCUyMEdhdWRpRERJTVNjaGVkdWxlci5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSUyQyUyMHN1YmZvbGRlciUzRCUyMnNjaGVkdWxlciUyMiklMEElMEFwaXBlbGluZSUyMCUzRCUyMEdhdWRpU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX25hbWUlMkMlMEElMjAlMjAlMjAlMjBzY2hlZHVsZXIlM0RzY2hlZHVsZXIlMkMlMEElMjAlMjAlMjAlMjB1c2VfaGFiYW5hJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHVzZV9ocHVfZ3JhcGhzJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGdhdWRpX2NvbmZpZyUzRCUyMkhhYmFuYSUyRnN0YWJsZS1kaWZmdXNpb24lMjIlMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> optimum.habana.diffusers <span class="hljs-keyword">import</span> GaudiDDIMScheduler, GaudiStableDiffusionPipeline

model_name = <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>

scheduler = GaudiDDIMScheduler.from_pretrained(model_name, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)

pipeline = GaudiStableDiffusionPipeline.from_pretrained(
    model_name,
    scheduler=scheduler,
    use_habana=<span class="hljs-literal">True</span>,
    use_hpu_graphs=<span class="hljs-literal">True</span>,
    gaudi_config=<span class="hljs-string">&quot;Habana/stable-diffusion&quot;</span>,
)`,wrap:!1}}),_=new ee({props:{code:"b3V0cHV0cyUyMCUzRCUyMHBpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRCU1QiUyMkhpZ2glMjBxdWFsaXR5JTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwaW4lMjBzcGFjZSUyMiUyQyUyMCUyMkZhY2UlMjBvZiUyMGElMjB5ZWxsb3clMjBjYXQlMkMlMjBoaWdoJTIwcmVzb2x1dGlvbiUyQyUyMHNpdHRpbmclMjBvbiUyMGElMjBwYXJrJTIwYmVuY2glMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBudW1faW1hZ2VzX3Blcl9wcm9tcHQlM0QxMCUyQyUwQSUyMCUyMCUyMCUyMGJhdGNoX3NpemUlM0Q0JTJDJTBBJTIwJTIwJTIwJTIwb3V0cHV0X3R5cGUlM0QlMjJwaWwlMjIlMkMlMEEp",highlighted:`outputs = pipeline(
    prompt=[<span class="hljs-string">&quot;High quality photo of an astronaut riding a horse in space&quot;</span>, <span class="hljs-string">&quot;Face of a yellow cat, high resolution, sitting on a park bench&quot;</span>],
    num_images_per_prompt=<span class="hljs-number">10</span>,
    batch_size=<span class="hljs-number">4</span>,
    output_type=<span class="hljs-string">&quot;pil&quot;</span>,
)`,w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MCUyMCUyMCUyMGJhdGNoX3NpemUlM0QyJTJDJTBBJTIwJTIwJTIwJTIwaGVpZ2h0JTNENzY4JTJDJTBBJTIwJTIwJTIwJTIwd2lkdGglM0Q3NjglMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> optimum.habana.diffusers <span class="hljs-keyword">import</span> GaudiDDIMScheduler, GaudiStableDiffusionPipeline

model_name = <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>

scheduler = GaudiDDIMScheduler.from_pretrained(model_name, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)

pipeline = GaudiStableDiffusionPipeline.from_pretrained(
    model_name,
    scheduler=scheduler,
    use_habana=<span class="hljs-literal">True</span>,
    use_hpu_graphs=<span class="hljs-literal">True</span>,
    gaudi_config=<span class="hljs-string">&quot;Habana/stable-diffusion-2&quot;</span>,
)

outputs = pipeline(
    [<span class="hljs-string">&quot;An image of a squirrel in Picasso style&quot;</span>],
    num_images_per_prompt=<span class="hljs-number">10</span>,
    batch_size=<span class="hljs-number">2</span>,
    height=<span class="hljs-number">768</span>,
    width=<span class="hljs-number">768</span>,
)`,wrap:!1}}),J=new Pe({props:{$$slots:{default:[ol]},$$scope:{ctx:K}}}),B=new P({props:{title:"Super-resolution",local:"super-resolution",headingTag:"h2"}}),v=new P({props:{title:"How to upscale low resolution images?",local:"how-to-upscale-low-resolution-images",headingTag:"h3"}}),Y=new ee({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwaW8lMjBpbXBvcnQlMjBCeXRlc0lPJTBBZnJvbSUyMG9wdGltdW0uaGFiYW5hLmRpZmZ1c2VycyUyMGltcG9ydCUyMCglMEElMjAlMjAlMjAlMjBHYXVkaURESU1TY2hlZHVsZXIlMkMlMEElMjAlMjAlMjAlMjBHYXVkaVN0YWJsZURpZmZ1c2lvblVwc2NhbGVQaXBlbGluZSUyQyUwQSklMEFmcm9tJTIwb3B0aW11bS5oYWJhbmEudXRpbHMlMjBpbXB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c2NoZWR1bGVyJTJDJTBBJTIwJTIwJTIwJTIwdXNlX2hhYmFuYSUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjB1c2VfaHB1X2dyYXBocyUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBnYXVkaV9jb25maWclM0QlMjJIYWJhbmElMkZzdGFibGUtZGlmZnVzaW9uJTIyJTJDJTBBKSUwQXVwc2NhbGVkX2ltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0JTNEcHJvbXB0JTJDJTIwaW1hZ2UlM0Rsb3dfcmVzX2ltZykuaW1hZ2VzJTVCMCU1RCUwQXVwc2NhbGVkX2ltYWdlLnNhdmUoJTIydXBzYW1wbGVkX2NhdC5wbmclMjIpJTBB",highlighted:`<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO
<span class="hljs-keyword">from</span> optimum.habana.diffusers <span class="hljs-keyword">import</span> (
    GaudiDDIMScheduler,
    GaudiStableDiffusionUpscalePipeline,
)
<span class="hljs-keyword">from</span> optimum.habana.utils <span class="hljs-keyword">import</span> set_seed
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

set_seed(<span class="hljs-number">42</span>)

model_name_upscale = <span class="hljs-string">&quot;stabilityai/stable-diffusion-x4-upscaler&quot;</span>
scheduler = GaudiDDIMScheduler.from_pretrained(model_name_upscale, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
url = <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd2-upscale/low_res_cat.png&quot;</span>
response = requests.get(url)
low_res_img = Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)
low_res_img = low_res_img.resize((<span class="hljs-number">128</span>, <span class="hljs-number">128</span>))
low_res_img.save(<span class="hljs-string">&quot;low_res_cat.png&quot;</span>)
prompt = <span class="hljs-string">&quot;a white cat&quot;</span>

pipeline = GaudiStableDiffusionUpscalePipeline.from_pretrained(
    model_name_upscale,
    scheduler=scheduler,
    use_habana=<span class="hljs-literal">True</span>,
    use_hpu_graphs=<span class="hljs-literal">True</span>,
    gaudi_config=<span class="hljs-string">&quot;Habana/stable-diffusion&quot;</span>,
)
upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[<span class="hljs-number">0</span>]
upscaled_image.save(<span class="hljs-string">&quot;upsampled_cat.png&quot;</span>)
`,wrap:!1}}),z=new P({props:{title:"Tips",local:"tips",headingTag:"h2"}}),F=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFwaXBlbGluZSUyMCUzRCUyMEdhdWRpU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMEElMjAlMjAlMjAlMjBzY2hlZHVsZXIlM0RzY2hlZHVsZXIlMkMlMEElMjAlMjAlMjAlMjB1c2VfaGFiYW5hJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHVzZV9ocHVfZ3JhcGhzJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGdhdWRpX2NvbmZpZyUzRCUyMkhhYmFuYSUyRnN0YWJsZS1kaWZmdXNpb24lMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKQ==",highlighted:`<span class="hljs-keyword">import</span> torch

pipeline = GaudiStableDiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
    scheduler=scheduler,
    use_habana=<span class="hljs-literal">True</span>,
    use_hpu_graphs=<span class="hljs-literal">True</span>,
    gaudi_config=<span class="hljs-string">&quot;Habana/stable-diffusion&quot;</span>,
    torch_dtype=torch.bfloat16
)`,wrap:!1}}),D=new P({props:{title:"Textual Inversion Fine-Tuning",local:"textual-inversion-fine-tuning",headingTag:"h2"}}),L=new nl({props:{source:"https://github.com/huggingface/optimum-habana/blob/main/docs/source/tutorials/stable_diffusion.mdx"}}),{c(){n=p("meta"),w=a(),m=p("p"),y=a(),r(g.$$.fragment),U=a(),r(b.$$.fragment),le=a(),j=p("p"),j.innerHTML=Ie,te=a(),r(Z.$$.fragment),se=a(),$=p("p"),$.textContent=Re,ae=a(),W=p("ul"),W.innerHTML=ke,ie=a(),G=p("p"),G.innerHTML=xe,ne=a(),r(C.$$.fragment),pe=a(),V=p("p"),V.textContent=Be,oe=a(),r(_.$$.fragment),ue=a(),I=p("p"),I.innerHTML=Ee,me=a(),r(T.$$.fragment),re=a(),r(R.$$.fragment),fe=a(),k=p("p"),k.innerHTML=Se,Me=a(),r(x.$$.fragment),he=a(),r(J.$$.fragment),ce=a(),r(B.$$.fragment),de=a(),E=p("p"),E.textContent=ve,ye=a(),S=p("p"),S.innerHTML=He,Ue=a(),r(v.$$.fragment),be=a(),H=p("p"),H.textContent=Xe,we=a(),X=p("ul"),X.innerHTML=Ne,ge=a(),N=p("p"),N.innerHTML=Ye,Te=a(),r(Y.$$.fragment),Je=a(),r(z.$$.fragment),je=a(),Q=p("p"),Q.innerHTML=ze,Ze=a(),r(F.$$.fragment),$e=a(),r(D.$$.fragment),We=a(),A=p("p"),A.innerHTML=Qe,Ge=a(),q=p("p"),q.innerHTML=Fe,Ce=a(),r(L.$$.fragment),Ve=a(),O=p("p"),this.h()},l(e){const l=sl("svelte-u9bgzb",document.head);n=o(l,"META",{name:!0,content:!0}),l.forEach(t),w=i(e),m=o(e,"P",{}),qe(m).forEach(t),y=i(e),f(g.$$.fragment,e),U=i(e),f(b.$$.fragment,e),le=i(e),j=o(e,"P",{"data-svelte-h":!0}),u(j)!=="svelte-1hthy7v"&&(j.innerHTML=Ie),te=i(e),f(Z.$$.fragment,e),se=i(e),$=o(e,"P",{"data-svelte-h":!0}),u($)!=="svelte-19h5e3t"&&($.textContent=Re),ae=i(e),W=o(e,"UL",{"data-svelte-h":!0}),u(W)!=="svelte-1btc4v1"&&(W.innerHTML=ke),ie=i(e),G=o(e,"P",{"data-svelte-h":!0}),u(G)!=="svelte-2aoj9w"&&(G.innerHTML=xe),ne=i(e),f(C.$$.fragment,e),pe=i(e),V=o(e,"P",{"data-svelte-h":!0}),u(V)!=="svelte-xkon47"&&(V.textContent=Be),oe=i(e),f(_.$$.fragment,e),ue=i(e),I=o(e,"P",{"data-svelte-h":!0}),u(I)!=="svelte-10y9y8z"&&(I.innerHTML=Ee),me=i(e),f(T.$$.fragment,e),re=i(e),f(R.$$.fragment,e),fe=i(e),k=o(e,"P",{"data-svelte-h":!0}),u(k)!=="svelte-2730tz"&&(k.innerHTML=Se),Me=i(e),f(x.$$.fragment,e),he=i(e),f(J.$$.fragment,e),ce=i(e),f(B.$$.fragment,e),de=i(e),E=o(e,"P",{"data-svelte-h":!0}),u(E)!=="svelte-xom5zm"&&(E.textContent=ve),ye=i(e),S=o(e,"P",{"data-svelte-h":!0}),u(S)!=="svelte-accaqy"&&(S.innerHTML=He),Ue=i(e),f(v.$$.fragment,e),be=i(e),H=o(e,"P",{"data-svelte-h":!0}),u(H)!=="svelte-6kr0o9"&&(H.textContent=Xe),we=i(e),X=o(e,"UL",{"data-svelte-h":!0}),u(X)!=="svelte-1w3bn2k"&&(X.innerHTML=Ne),ge=i(e),N=o(e,"P",{"data-svelte-h":!0}),u(N)!=="svelte-2aoj9w"&&(N.innerHTML=Ye),Te=i(e),f(Y.$$.fragment,e),Je=i(e),f(z.$$.fragment,e),je=i(e),Q=o(e,"P",{"data-svelte-h":!0}),u(Q)!=="svelte-1v5usz2"&&(Q.innerHTML=ze),Ze=i(e),f(F.$$.fragment,e),$e=i(e),f(D.$$.fragment,e),We=i(e),A=o(e,"P",{"data-svelte-h":!0}),u(A)!=="svelte-1c55ypq"&&(A.innerHTML=Qe),Ge=i(e),q=o(e,"P",{"data-svelte-h":!0}),u(q)!=="svelte-l64qz4"&&(q.innerHTML=Fe),Ce=i(e),f(L.$$.fragment,e),Ve=i(e),O=o(e,"P",{}),qe(O).forEach(t),this.h()},h(){Le(n,"name","hf:doc:metadata"),Le(n,"content",ml)},m(e,l){al(document.head,n),s(e,w,l),s(e,m,l),s(e,y,l),M(g,e,l),s(e,U,l),M(b,e,l),s(e,le,l),s(e,j,l),s(e,te,l),M(Z,e,l),s(e,se,l),s(e,$,l),s(e,ae,l),s(e,W,l),s(e,ie,l),s(e,G,l),s(e,ne,l),M(C,e,l),s(e,pe,l),s(e,V,l),s(e,oe,l),M(_,e,l),s(e,ue,l),s(e,I,l),s(e,me,l),M(T,e,l),s(e,re,l),M(R,e,l),s(e,fe,l),s(e,k,l),s(e,Me,l),M(x,e,l),s(e,he,l),M(J,e,l),s(e,ce,l),M(B,e,l),s(e,de,l),s(e,E,l),s(e,ye,l),s(e,S,l),s(e,Ue,l),M(v,e,l),s(e,be,l),s(e,H,l),s(e,we,l),s(e,X,l),s(e,ge,l),s(e,N,l),s(e,Te,l),M(Y,e,l),s(e,Je,l),M(z,e,l),s(e,je,l),s(e,Q,l),s(e,Ze,l),M(F,e,l),s(e,$e,l),M(D,e,l),s(e,We,l),s(e,A,l),s(e,Ge,l),s(e,q,l),s(e,Ce,l),M(L,e,l),s(e,Ve,l),s(e,O,l),_e=!0},p(e,[l]){const De={};l&2&&(De.$$scope={dirty:l,ctx:e}),T.$set(De);const Ae={};l&2&&(Ae.$$scope={dirty:l,ctx:e}),J.$set(Ae)},i(e){_e||(h(g.$$.fragment,e),h(b.$$.fragment,e),h(Z.$$.fragment,e),h(C.$$.fragment,e),h(_.$$.fragment,e),h(T.$$.fragment,e),h(R.$$.fragment,e),h(x.$$.fragment,e),h(J.$$.fragment,e),h(B.$$.fragment,e),h(v.$$.fragment,e),h(Y.$$.fragment,e),h(z.$$.fragment,e),h(F.$$.fragment,e),h(D.$$.fragment,e),h(L.$$.fragment,e),_e=!0)},o(e){c(g.$$.fragment,e),c(b.$$.fragment,e),c(Z.$$.fragment,e),c(C.$$.fragment,e),c(_.$$.fragment,e),c(T.$$.fragment,e),c(R.$$.fragment,e),c(x.$$.fragment,e),c(J.$$.fragment,e),c(B.$$.fragment,e),c(v.$$.fragment,e),c(Y.$$.fragment,e),c(z.$$.fragment,e),c(F.$$.fragment,e),c(D.$$.fragment,e),c(L.$$.fragment,e),_e=!1},d(e){e&&(t(w),t(m),t(y),t(U),t(le),t(j),t(te),t(se),t($),t(ae),t(W),t(ie),t(G),t(ne),t(pe),t(V),t(oe),t(ue),t(I),t(me),t(re),t(fe),t(k),t(Me),t(he),t(ce),t(de),t(E),t(ye),t(S),t(Ue),t(be),t(H),t(we),t(X),t(ge),t(N),t(Te),t(Je),t(je),t(Q),t(Ze),t($e),t(We),t(A),t(Ge),t(q),t(Ce),t(Ve),t(O)),t(n),d(g,e),d(b,e),d(Z,e),d(C,e),d(_,e),d(T,e),d(R,e),d(x,e),d(J,e),d(B,e),d(v,e),d(Y,e),d(z,e),d(F,e),d(D,e),d(L,e)}}}const ml='{"title":"Stable Diffusion","local":"stable-diffusion","sections":[{"title":"How to generate images?","local":"how-to-generate-images","sections":[],"depth":2},{"title":"Stable Diffusion 2","local":"stable-diffusion-2","sections":[],"depth":2},{"title":"Super-resolution","local":"super-resolution","sections":[{"title":"How to upscale low resolution images?","local":"how-to-upscale-low-resolution-images","sections":[],"depth":3}],"depth":2},{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"Textual Inversion Fine-Tuning","local":"textual-inversion-fine-tuning","sections":[],"depth":2}],"depth":1}';function rl(K){return el(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class yl extends ll{constructor(n){super(),tl(this,n,rl,ul,Oe,{})}}export{yl as component};
