import{S as ir,i as lr,s as rr,e as a,k as p,w as v,t as l,M as dr,c as o,d as n,m as c,a as s,x as y,h as r,b as u,G as e,g as _,y as I,q as w,o as P,B as $,v as pr,L as Qt}from"../../../chunks/vendor-hf-doc-builder.js";import{T as ta}from"../../../chunks/Tip-hf-doc-builder.js";import{D as E}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as oe}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as kt}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Yt}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function cr(J){let d,b,f,m,U,i,h,S;return{c(){d=a("p"),b=l("For text-to-image we use "),f=a("code"),m=l("stabilityai/stable-diffusion-2-1-unclip-small"),U=l(" as it was trained on CLIP ViT-L/14 embedding, the same as the Karlo model prior. "),i=a("a"),h=l("stabilityai/stable-diffusion-2-1-unclip"),S=l(" was trained on OpenCLIP ViT-H, so we don\u2019t recommend its use."),this.h()},l(Y){d=o(Y,"P",{});var W=s(d);b=r(W,"For text-to-image we use "),f=o(W,"CODE",{});var F=s(f);m=r(F,"stabilityai/stable-diffusion-2-1-unclip-small"),F.forEach(n),U=r(W," as it was trained on CLIP ViT-L/14 embedding, the same as the Karlo model prior. "),i=o(W,"A",{href:!0,rel:!0});var Gt=s(i);h=r(Gt,"stabilityai/stable-diffusion-2-1-unclip"),Gt.forEach(n),S=r(W," was trained on OpenCLIP ViT-H, so we don\u2019t recommend its use."),W.forEach(n),this.h()},h(){u(i,"href","https://hf.co/stabilityai/stable-diffusion-2-1-unclip"),u(i,"rel","nofollow")},m(Y,W){_(Y,d,W),e(d,b),e(d,f),e(f,m),e(d,U),e(d,i),e(i,h),e(d,S)},d(Y){Y&&n(d)}}}function mr(J){let d,b,f,m,U;return m=new oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlVW5DTElQUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlVW5DTElQUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZ1c2luZyUyRnN0YWJsZS11bmNsaXAtMi0xLWwlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTIwJTIwJTIzJTIwVE9ETyUyMHVwZGF0ZSUyMG1vZGVsJTIwcGF0aCUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQWltYWdlcyUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlMEFpbWFnZXMlNUIwJTVELnNhdmUoJTIyYXN0cm9uYXV0X2hvcnNlLnBuZyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableUnCLIPPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableUnCLIPPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;fusing/stable-unclip-2-1-l&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># TODO update model path</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipe(prompt).images
<span class="hljs-meta">&gt;&gt;&gt; </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;astronaut_horse.png&quot;</span>)`}}),{c(){d=a("p"),b=l("Examples:"),f=p(),v(m.$$.fragment)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"Examples:"),h.forEach(n),f=c(i),y(m.$$.fragment,i)},m(i,h){_(i,d,h),e(d,b),_(i,f,h),I(m,i,h),U=!0},p:Qt,i(i){U||(w(m.$$.fragment,i),U=!0)},o(i){P(m.$$.fragment,i),U=!1},d(i){i&&n(d),i&&n(f),$(m,i)}}}function fr(J){let d,b,f,m,U;return{c(){d=a("p"),b=l("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=a("code"),m=l("scaled_dot_product_attention"),U=l(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=o(h,"CODE",{});var S=s(f);m=r(S,"scaled_dot_product_attention"),S.forEach(n),U=r(h,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),h.forEach(n)},m(i,h){_(i,d,h),e(d,b),e(d,f),e(f,m),e(d,U)},d(i){i&&n(d)}}}function gr(J){let d,b,f,m,U;return m=new oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){d=a("p"),b=l("Examples:"),f=p(),v(m.$$.fragment)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"Examples:"),h.forEach(n),f=c(i),y(m.$$.fragment,i)},m(i,h){_(i,d,h),e(d,b),_(i,f,h),I(m,i,h),U=!0},p:Qt,i(i){U||(w(m.$$.fragment,i),U=!0)},o(i){P(m.$$.fragment,i),U=!1},d(i){i&&n(d),i&&n(f),$(m,i)}}}function ur(J){let d,b;return{c(){d=a("p"),b=l(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(f){d=o(f,"P",{});var m=s(d);b=r(m,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),m.forEach(n)},m(f,m){_(f,d,m),e(d,b)},d(f){f&&n(d)}}}function hr(J){let d,b,f,m,U;return m=new oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQXBpcGUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKGF0dGVudGlvbl9vcCUzRE1lbW9yeUVmZmljaWVudEF0dGVudGlvbkZsYXNoQXR0ZW50aW9uT3ApJTBBJTIzJTIwV29ya2Fyb3VuZCUyMGZvciUyMG5vdCUyMGFjY2VwdGluZyUyMGF0dGVudGlvbiUyMHNoYXBlJTIwdXNpbmclMjBWQUUlMjBmb3IlMjBGbGFzaCUyMEF0dGVudGlvbiUwQXBpcGUudmFlLmVuYWJsZV94Zm9ybWVyc19tZW1vcnlfZWZmaWNpZW50X2F0dGVudGlvbihhdHRlbnRpb25fb3AlM0ROb25lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Workaround for not accepting attention shape using VAE for Flash Attention</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_xformers_memory_efficient_attention(attention_op=<span class="hljs-literal">None</span>)`}}),{c(){d=a("p"),b=l("Examples:"),f=p(),v(m.$$.fragment)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"Examples:"),h.forEach(n),f=c(i),y(m.$$.fragment,i)},m(i,h){_(i,d,h),e(d,b),_(i,f,h),I(m,i,h),U=!0},p:Qt,i(i){U||(w(m.$$.fragment,i),U=!0)},o(i){P(m.$$.fragment,i),U=!1},d(i){i&&n(d),i&&n(f),$(m,i)}}}function _r(J){let d,b,f,m,U;return m=new oe({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlVW5DTElQSW1nMkltZ1BpcGVsaW5lJTBBJTBBcGlwZSUyMCUzRCUyMFN0YWJsZVVuQ0xJUEltZzJJbWdQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZnVzaW5nJTJGc3RhYmxlLXVuY2xpcC0yLTEtbC1pbWcyaW1nJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKSUyMCUyMCUyMyUyMFRPRE8lMjB1cGRhdGUlMjBtb2RlbCUyMHBhdGglMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uJTJGbWFpbiUyRmFzc2V0cyUyRnN0YWJsZS1zYW1wbGVzJTJGaW1nMmltZyUyRnNrZXRjaC1tb3VudGFpbnMtaW5wdXQuanBnJTIyJTBBJTBBcmVzcG9uc2UlMjAlM0QlMjByZXF1ZXN0cy5nZXQodXJsKSUwQWluaXRfaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKEJ5dGVzSU8ocmVzcG9uc2UuY29udGVudCkpLmNvbnZlcnQoJTIyUkdCJTIyKSUwQWluaXRfaW1hZ2UlMjAlM0QlMjBpbml0X2ltYWdlLnJlc2l6ZSgoNzY4JTJDJTIwNTEyKSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwZmFudGFzeSUyMGxhbmRzY2FwZSUyQyUyMHRyZW5kaW5nJTIwb24lMjBhcnRzdGF0aW9uJTIyJTBBJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBpbml0X2ltYWdlKS5pbWFnZXMlMEFpbWFnZXMlNUIwJTVELnNhdmUoJTIyZmFudGFzeV9sYW5kc2NhcGUucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableUnCLIPImg2ImgPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableUnCLIPImg2ImgPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;fusing/stable-unclip-2-1-l-img2img&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># TODO update model path</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>response = requests.get(url)
<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = init_image.resize((<span class="hljs-number">768</span>, <span class="hljs-number">512</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A fantasy landscape, trending on artstation&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipe(prompt, init_image).images
<span class="hljs-meta">&gt;&gt;&gt; </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;fantasy_landscape.png&quot;</span>)`}}),{c(){d=a("p"),b=l("Examples:"),f=p(),v(m.$$.fragment)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"Examples:"),h.forEach(n),f=c(i),y(m.$$.fragment,i)},m(i,h){_(i,d,h),e(d,b),_(i,f,h),I(m,i,h),U=!0},p:Qt,i(i){U||(w(m.$$.fragment,i),U=!0)},o(i){P(m.$$.fragment,i),U=!1},d(i){i&&n(d),i&&n(f),$(m,i)}}}function br(J){let d,b,f,m,U;return{c(){d=a("p"),b=l("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=a("code"),m=l("scaled_dot_product_attention"),U=l(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=o(h,"CODE",{});var S=s(f);m=r(S,"scaled_dot_product_attention"),S.forEach(n),U=r(h,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),h.forEach(n)},m(i,h){_(i,d,h),e(d,b),e(d,f),e(f,m),e(d,U)},d(i){i&&n(d)}}}function vr(J){let d,b,f,m,U;return m=new oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){d=a("p"),b=l("Examples:"),f=p(),v(m.$$.fragment)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"Examples:"),h.forEach(n),f=c(i),y(m.$$.fragment,i)},m(i,h){_(i,d,h),e(d,b),_(i,f,h),I(m,i,h),U=!0},p:Qt,i(i){U||(w(m.$$.fragment,i),U=!0)},o(i){P(m.$$.fragment,i),U=!1},d(i){i&&n(d),i&&n(f),$(m,i)}}}function yr(J){let d,b;return{c(){d=a("p"),b=l(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(f){d=o(f,"P",{});var m=s(d);b=r(m,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),m.forEach(n)},m(f,m){_(f,d,m),e(d,b)},d(f){f&&n(d)}}}function Ir(J){let d,b,f,m,U;return m=new oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQXBpcGUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKGF0dGVudGlvbl9vcCUzRE1lbW9yeUVmZmljaWVudEF0dGVudGlvbkZsYXNoQXR0ZW50aW9uT3ApJTBBJTIzJTIwV29ya2Fyb3VuZCUyMGZvciUyMG5vdCUyMGFjY2VwdGluZyUyMGF0dGVudGlvbiUyMHNoYXBlJTIwdXNpbmclMjBWQUUlMjBmb3IlMjBGbGFzaCUyMEF0dGVudGlvbiUwQXBpcGUudmFlLmVuYWJsZV94Zm9ybWVyc19tZW1vcnlfZWZmaWNpZW50X2F0dGVudGlvbihhdHRlbnRpb25fb3AlM0ROb25lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Workaround for not accepting attention shape using VAE for Flash Attention</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_xformers_memory_efficient_attention(attention_op=<span class="hljs-literal">None</span>)`}}),{c(){d=a("p"),b=l("Examples:"),f=p(),v(m.$$.fragment)},l(i){d=o(i,"P",{});var h=s(d);b=r(h,"Examples:"),h.forEach(n),f=c(i),y(m.$$.fragment,i)},m(i,h){_(i,d,h),e(d,b),_(i,f,h),I(m,i,h),U=!0},p:Qt,i(i){U||(w(m.$$.fragment,i),U=!0)},o(i){P(m.$$.fragment,i),U=!1},d(i){i&&n(d),i&&n(f),$(m,i)}}}function wr(J){let d,b,f,m,U,i,h,S,Y,W,F,Gt,Vt,Oa,Ha,na,Bt,Ka,aa,Xt,qt,eo,oa,Q,se,Ot,Be,to,Ht,no,sa,L,ao,Kt,oo,so,en,io,lo,tn,ro,po,ia,q,ie,nn,Xe,co,an,mo,la,Ne,ra,le,da,O,re,on,Fe,fo,sn,go,pa,ze,ca,de,uo,ln,ho,_o,ma,De,fa,H,pe,rn,Re,bo,dn,vo,ga,T,Ae,yo,pn,Io,wo,Ye,Po,Nt,$o,Uo,To,R,Qe,Mo,cn,Jo,Co,ce,xo,k,qe,Eo,mn,jo,Zo,me,So,fe,Wo,ge,Oe,Lo,He,ko,fn,Go,Vo,Bo,ue,Ke,Xo,gn,No,Fo,he,et,zo,tt,Do,un,Ro,Ao,Yo,G,nt,Qo,at,qo,ot,Oo,Ho,Ko,_e,es,be,ts,ve,st,ns,it,as,lt,os,ss,is,ye,rt,ls,z,rs,hn,ds,ps,_n,cs,ms,bn,fs,gs,us,j,dt,hs,K,_s,vn,bs,vs,yn,ys,Is,ws,In,Ps,$s,pt,wn,Us,Ts,Pn,Ms,Js,ct,Cs,$n,xs,Es,js,Un,Zs,ua,ee,Ie,Tn,mt,Ss,Mn,Ws,ha,M,ft,Ls,Jn,ks,Gs,gt,Vs,Ft,Bs,Xs,Ns,A,ut,Fs,Cn,zs,Ds,we,Rs,V,ht,As,xn,Ys,Qs,Pe,qs,$e,Os,Ue,_t,Hs,bt,Ks,En,ei,ti,ni,Te,vt,ai,jn,oi,si,Me,yt,ii,It,li,Zn,ri,di,pi,B,wt,ci,Pt,mi,$t,fi,gi,ui,Je,hi,Ce,_i,xe,Ut,bi,Tt,vi,Mt,yi,Ii,wi,Ee,Jt,Pi,D,$i,Sn,Ui,Ti,Wn,Mi,Ji,Ln,Ci,xi,Ei,Z,Ct,ji,te,Zi,kn,Si,Wi,Gn,Li,ki,Gi,Vn,Vi,Bi,xt,Bn,Xi,Ni,Xn,Fi,zi,Et,Di,Nn,Ri,Ai,Yi,Fn,Qi,_a,ne,je,zn,jt,qi,Dn,Oi,ba,ae,Zt,Hi,Rn,Ki,va;return i=new kt({}),Be=new kt({}),Xe=new kt({}),Ne=new oe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVW5DTElQU2NoZWR1bGVyJTJDJTIwRERQTVNjaGVkdWxlciUyQyUyMFN0YWJsZVVuQ0xJUFBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy5tb2RlbHMlMjBpbXBvcnQlMjBQcmlvclRyYW5zZm9ybWVyJTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBUb2tlbml6ZXIlMkMlMjBDTElQVGV4dE1vZGVsV2l0aFByb2plY3Rpb24lMEElMEFwcmlvcl9tb2RlbF9pZCUyMCUzRCUyMCUyMmtha2FvYnJhaW4lMkZrYXJsby12MS1hbHBoYSUyMiUwQWRhdGFfdHlwZSUyMCUzRCUyMHRvcmNoLmZsb2F0MTYlMEFwcmlvciUyMCUzRCUyMFByaW9yVHJhbnNmb3JtZXIuZnJvbV9wcmV0cmFpbmVkKHByaW9yX21vZGVsX2lkJTJDJTIwc3ViZm9sZGVyJTNEJTIycHJpb3IlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRGRhdGFfdHlwZSklMEElMEFwcmlvcl90ZXh0X21vZGVsX2lkJTIwJTNEJTIwJTIyb3BlbmFpJTJGY2xpcC12aXQtbGFyZ2UtcGF0Y2gxNCUyMiUwQXByaW9yX3Rva2VuaXplciUyMCUzRCUyMENMSVBUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKHByaW9yX3RleHRfbW9kZWxfaWQpJTBBcHJpb3JfdGV4dF9tb2RlbCUyMCUzRCUyMENMSVBUZXh0TW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQocHJpb3JfdGV4dF9tb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEZGF0YV90eXBlKSUwQXByaW9yX3NjaGVkdWxlciUyMCUzRCUyMFVuQ0xJUFNjaGVkdWxlci5mcm9tX3ByZXRyYWluZWQocHJpb3JfbW9kZWxfaWQlMkMlMjBzdWJmb2xkZXIlM0QlMjJwcmlvcl9zY2hlZHVsZXIlMjIpJTBBcHJpb3Jfc2NoZWR1bGVyJTIwJTNEJTIwRERQTVNjaGVkdWxlci5mcm9tX2NvbmZpZyhwcmlvcl9zY2hlZHVsZXIuY29uZmlnKSUwQSUwQXN0YWJsZV91bmNsaXBfbW9kZWxfaWQlMjAlM0QlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24tMi0xLXVuY2xpcC1zbWFsbCUyMiUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVVbkNMSVBQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwc3RhYmxlX3VuY2xpcF9tb2RlbF9pZCUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEZGF0YV90eXBlJTJDJTBBJTIwJTIwJTIwJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMEElMjAlMjAlMjAlMjBwcmlvcl90b2tlbml6ZXIlM0Rwcmlvcl90b2tlbml6ZXIlMkMlMEElMjAlMjAlMjAlMjBwcmlvcl90ZXh0X2VuY29kZXIlM0Rwcmlvcl90ZXh0X21vZGVsJTJDJTBBJTIwJTIwJTIwJTIwcHJpb3IlM0RwcmlvciUyQyUwQSUyMCUyMCUyMCUyMHByaW9yX3NjaGVkdWxlciUzRHByaW9yX3NjaGVkdWxlciUyQyUwQSklMEElMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXdhdmVfcHJvbXB0JTIwJTNEJTIwJTIyZHJhbWF0aWMlMjB3YXZlJTJDJTIwdGhlJTIwT2NlYW5zJTIwcm9hciUyQyUyMFN0cm9uZyUyMHdhdmUlMjBzcGlyYWwlMjBhY3Jvc3MlMjB0aGUlMjBvY2VhbnMlMjBhcyUyMHRoZSUyMHdhdmVzJTIwdW5mdXJsJTIwaW50byUyMHJvYXJpbmclMjBjcmVzdHMlM0IlMjBwZXJmZWN0JTIwd2F2ZSUyMGZvcm0lM0IlMjBwZXJmZWN0JTIwd2F2ZSUyMHNoYXBlJTNCJTIwZHJhbWF0aWMlMjB3YXZlJTIwc2hhcGUlM0IlMjB3YXZlJTIwc2hhcGUlMjB1bmJlbGlldmFibGUlM0IlMjB3YXZlJTNCJTIwd2F2ZSUyMHNoYXBlJTIwc3BlY3RhY3VsYXIlMjIlMEElMEFpbWFnZXMlMjAlM0QlMjBwaXBlKHByb21wdCUzRHdhdmVfcHJvbXB0KS5pbWFnZXMlMEFpbWFnZXMlNUIwJTVELnNhdmUoJTIyd2F2ZXMucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UnCLIPScheduler, DDPMScheduler, StableUnCLIPPipeline
<span class="hljs-keyword">from</span> diffusers.models <span class="hljs-keyword">import</span> PriorTransformer
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTokenizer, CLIPTextModelWithProjection

prior_model_id = <span class="hljs-string">&quot;kakaobrain/karlo-v1-alpha&quot;</span>
data_type = torch.float16
prior = PriorTransformer.from_pretrained(prior_model_id, subfolder=<span class="hljs-string">&quot;prior&quot;</span>, torch_dtype=data_type)

prior_text_model_id = <span class="hljs-string">&quot;openai/clip-vit-large-patch14&quot;</span>
prior_tokenizer = CLIPTokenizer.from_pretrained(prior_text_model_id)
prior_text_model = CLIPTextModelWithProjection.from_pretrained(prior_text_model_id, torch_dtype=data_type)
prior_scheduler = UnCLIPScheduler.from_pretrained(prior_model_id, subfolder=<span class="hljs-string">&quot;prior_scheduler&quot;</span>)
prior_scheduler = DDPMScheduler.from_config(prior_scheduler.config)

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

pipe = StableUnCLIPPipeline.from_pretrained(
    stable_unclip_model_id,
    torch_dtype=data_type,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    prior_tokenizer=prior_tokenizer,
    prior_text_encoder=prior_text_model,
    prior=prior,
    prior_scheduler=prior_scheduler,
)

pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
wave_prompt = <span class="hljs-string">&quot;dramatic wave, the Oceans roar, Strong wave spiral across the oceans as the waves unfurl into roaring crests; perfect wave form; perfect wave shape; dramatic wave shape; wave shape unbelievable; wave; wave shape spectacular&quot;</span>

images = pipe(prompt=wave_prompt).images
images[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;waves.png&quot;</span>)`}}),le=new ta({props:{warning:!0,$$slots:{default:[cr]},$$scope:{ctx:J}}}),Fe=new kt({}),ze=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZVVuQ0xJUEltZzJJbWdQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlVW5DTElQSW1nMkltZ1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24tMi0xLXVuY2xpcCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUyMHZhcmlhdGlvbiUzRCUyMmZwMTYlMjIlMEEpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZoZi1pbnRlcm5hbC10ZXN0aW5nJTJGZGlmZnVzZXJzLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGc3RhYmxlX3VuY2xpcCUyRnRhcnNpbGFfZG9fYW1hcmFsLnBuZyUyMiUwQWluaXRfaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKHVybCklMEElMEFpbWFnZXMlMjAlM0QlMjBwaXBlKGluaXRfaW1hZ2UpLmltYWdlcyUwQWltYWdlcyU1QjAlNUQuc2F2ZSglMjJ2YXJpYXRpb25faW1hZ2UucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableUnCLIPImg2ImgPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image
<span class="hljs-keyword">import</span> torch

pipe = StableUnCLIPImg2ImgPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1-unclip&quot;</span>, torch_dtype=torch.float16, variation=<span class="hljs-string">&quot;fp16&quot;</span>
)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

url = <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/stable_unclip/tarsila_do_amaral.png&quot;</span>
init_image = load_image(url)

images = pipe(init_image).images
images[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;variation_image.png&quot;</span>)`}}),De=new oe({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyQSUyMGZhbnRhc3klMjBsYW5kc2NhcGUlMkMlMjB0cmVuZGluZyUyMG9uJTIwYXJ0c3RhdGlvbiUyMiUwQSUwQWltYWdlcyUyMCUzRCUyMHBpcGUoaW5pdF9pbWFnZSUyQyUyMHByb21wdCUzRHByb21wdCkuaW1hZ2VzJTBBaW1hZ2VzJTVCMCU1RC5zYXZlKCUyMnZhcmlhdGlvbl9pbWFnZV90d28ucG5nJTIyKQ==",highlighted:`prompt = <span class="hljs-string">&quot;A fantasy landscape, trending on artstation&quot;</span>

images = pipe(init_image, prompt=prompt).images
images[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;variation_image_two.png&quot;</span>)`}}),Re=new kt({}),Ae=new E({props:{name:"class diffusers.StableUnCLIPPipeline",anchor:"diffusers.StableUnCLIPPipeline",parameters:[{name:"prior_tokenizer",val:": CLIPTokenizer"},{name:"prior_text_encoder",val:": CLIPTextModelWithProjection"},{name:"prior",val:": PriorTransformer"},{name:"prior_scheduler",val:": KarrasDiffusionSchedulers"},{name:"image_normalizer",val:": StableUnCLIPImageNormalizer"},{name:"image_noising_scheduler",val:": KarrasDiffusionSchedulers"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"vae",val:": AutoencoderKL"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPPipeline.prior_tokenizer",description:`<strong>prior_tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <code>CLIPTokenizer</code>.`,name:"prior_tokenizer"},{anchor:"diffusers.StableUnCLIPPipeline.prior_text_encoder",description:`<strong>prior_text_encoder</strong> (<code>CLIPTextModelWithProjection</code>) &#x2014;
Frozen <code>CLIPTextModelWithProjection</code> text-encoder.`,name:"prior_text_encoder"},{anchor:"diffusers.StableUnCLIPPipeline.prior",description:`<strong>prior</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/prior_transformer#diffusers.PriorTransformer">PriorTransformer</a>) &#x2014;
The canonincal unCLIP prior to approximate the image embedding from the text embedding.`,name:"prior"},{anchor:"diffusers.StableUnCLIPPipeline.prior_scheduler",description:`<strong>prior_scheduler</strong> (<code>KarrasDiffusionSchedulers</code>) &#x2014;
Scheduler used in the prior denoising process.`,name:"prior_scheduler"},{anchor:"diffusers.StableUnCLIPPipeline.image_normalizer",description:`<strong>image_normalizer</strong> (<code>StableUnCLIPImageNormalizer</code>) &#x2014;
Used to normalize the predicted image embeddings before the noise is applied and un-normalize the image
embeddings after the noise has been applied.`,name:"image_normalizer"},{anchor:"diffusers.StableUnCLIPPipeline.image_noising_scheduler",description:`<strong>image_noising_scheduler</strong> (<code>KarrasDiffusionSchedulers</code>) &#x2014;
Noise schedule for adding noise to the predicted image embeddings. The amount of noise to add is determined
by the <code>noise_level</code>.`,name:"image_noising_scheduler"},{anchor:"diffusers.StableUnCLIPPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <code>CLIPTokenizer</code>.`,name:"tokenizer"},{anchor:"diffusers.StableUnCLIPPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen <code>CLIPTextModel</code> text-encoder.`,name:"text_encoder"},{anchor:"diffusers.StableUnCLIPPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableUnCLIPPipeline.scheduler",description:`<strong>scheduler</strong> (<code>KarrasDiffusionSchedulers</code>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.StableUnCLIPPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py#L53"}}),Qe=new E({props:{name:"__call__",anchor:"diffusers.StableUnCLIPPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 20"},{name:"guidance_scale",val:": float = 10.0"},{name:"negative_prompt",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"noise_level",val:": int = 0"},{name:"prior_num_inference_steps",val:": int = 25"},{name:"prior_guidance_scale",val:": float = 4.0"},{name:"prior_latents",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 20) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 10.0) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.20.0/en/api/pipelines/ddim#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function is called. If not specified, the callback is called at
every step.`,name:"callback_steps"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.noise_level",description:`<strong>noise_level</strong> (<code>int</code>, <em>optional</em>, defaults to <code>0</code>) &#x2014;
The amount of noise to add to the image embeddings. A higher <code>noise_level</code> increases the variance in
the final un-noised images. See <a href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_unclip#diffusers.StableUnCLIPPipeline.noise_image_embeddings">StableUnCLIPPipeline.noise_image_embeddings()</a> for more details.`,name:"noise_level"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.prior_num_inference_steps",description:`<strong>prior_num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 25) &#x2014;
The number of denoising steps in the prior denoising process. More denoising steps usually lead to a
higher quality image at the expense of slower inference.`,name:"prior_num_inference_steps"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.prior_guidance_scale",description:`<strong>prior_guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"prior_guidance_scale"},{anchor:"diffusers.StableUnCLIPPipeline.__call__.prior_latents",description:`<strong>prior_latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
embedding generation in the prior denoising process. Can be used to tweak the same generation with
different prompts. If not provided, a latents tensor is generated by sampling using the supplied random
<code>generator</code>.`,name:"prior_latents"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py#L617",returnDescription:`
<p><code>~ pipeline_utils.ImagePipelineOutput</code> if <code>return_dict</code> is True, otherwise a <code>tuple</code>. When returning
a tuple, the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/ddim#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),ce=new Yt({props:{anchor:"diffusers.StableUnCLIPPipeline.__call__.example",$$slots:{default:[mr]},$$scope:{ctx:J}}}),qe=new E({props:{name:"enable_attention_slicing",anchor:"diffusers.StableUnCLIPPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1688"}}),me=new ta({props:{warning:!0,$$slots:{default:[fr]},$$scope:{ctx:J}}}),fe=new Yt({props:{anchor:"diffusers.StableUnCLIPPipeline.enable_attention_slicing.example",$$slots:{default:[gr]},$$scope:{ctx:J}}}),Oe=new E({props:{name:"disable_attention_slicing",anchor:"diffusers.StableUnCLIPPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1728"}}),Ke=new E({props:{name:"enable_vae_slicing",anchor:"diffusers.StableUnCLIPPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py#L145"}}),et=new E({props:{name:"disable_vae_slicing",anchor:"diffusers.StableUnCLIPPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py#L153"}}),nt=new E({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableUnCLIPPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1627"}}),_e=new ta({props:{warning:!0,$$slots:{default:[ur]},$$scope:{ctx:J}}}),be=new Yt({props:{anchor:"diffusers.StableUnCLIPPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[hr]},$$scope:{ctx:J}}}),st=new E({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableUnCLIPPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1662"}}),rt=new E({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableUnCLIPPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py#L160"}}),dt=new E({props:{name:"noise_image_embeddings",anchor:"diffusers.StableUnCLIPPipeline.noise_image_embeddings",parameters:[{name:"image_embeds",val:": Tensor"},{name:"noise_level",val:": int"},{name:"noise",val:": typing.Optional[torch.FloatTensor] = None"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py#L571"}}),mt=new kt({}),ft=new E({props:{name:"class diffusers.StableUnCLIPImg2ImgPipeline",anchor:"diffusers.StableUnCLIPImg2ImgPipeline",parameters:[{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"image_normalizer",val:": StableUnCLIPImageNormalizer"},{name:"image_noising_scheduler",val:": KarrasDiffusionSchedulers"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModel"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"vae",val:": AutoencoderKL"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
Feature extractor for image pre-processing before being encoded.`,name:"feature_extractor"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.image_encoder",description:`<strong>image_encoder</strong> (<code>CLIPVisionModelWithProjection</code>) &#x2014;
CLIP vision model for encoding images.`,name:"image_encoder"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.image_normalizer",description:`<strong>image_normalizer</strong> (<code>StableUnCLIPImageNormalizer</code>) &#x2014;
Used to normalize the predicted image embeddings before the noise is applied and un-normalize the image
embeddings after the noise has been applied.`,name:"image_normalizer"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.image_noising_scheduler",description:`<strong>image_noising_scheduler</strong> (<code>KarrasDiffusionSchedulers</code>) &#x2014;
Noise schedule for adding noise to the predicted image embeddings. The amount of noise to add is determined
by the <code>noise_level</code>.`,name:"image_noising_scheduler"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>~transformers.CLIPTokenizer</code>) &#x2014;
A [<code>~transformers.CLIPTokenizer</code>)].`,name:"tokenizer"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>) &#x2014;
Frozen <a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a> text-encoder.`,name:"text_encoder"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<code>KarrasDiffusionSchedulers</code>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py#L66"}}),ut=new E({props:{name:"__call__",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__",parameters:[{name:"image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image] = None"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 20"},{name:"guidance_scale",val:": float = 10"},{name:"negative_prompt",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"noise_level",val:": int = 0"},{name:"image_embeds",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, either <code>prompt_embeds</code> will be
used or prompt is initialized to <code>&quot;&quot;</code>.`,name:"prompt"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code> or <code>PIL.Image.Image</code>) &#x2014;
<code>Image</code> or tensor representing an image batch. The image is encoded to its CLIP embedding which the
<code>unet</code> is conditioned on. The image is <em>not</em> encoded by the <code>vae</code> and then used as the latents in the
denoising process like it is in the standard Stable Diffusion text-guided image variation process.`,name:"image"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 20) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 10.0) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.20.0/en/api/pipelines/ddim#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function is called. If not specified, the callback is called at
every step.`,name:"callback_steps"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.noise_level",description:`<strong>noise_level</strong> (<code>int</code>, <em>optional</em>, defaults to <code>0</code>) &#x2014;
The amount of noise to add to the image embeddings. A higher <code>noise_level</code> increases the variance in
the final un-noised images. See <a href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_unclip#diffusers.StableUnCLIPPipeline.noise_image_embeddings">StableUnCLIPPipeline.noise_image_embeddings()</a> for more details.`,name:"noise_level"},{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.image_embeds",description:`<strong>image_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated CLIP embeddings to condition the <code>unet</code> on. These latents are not used in the denoising
process. If you want to provide pre-generated latents, pass them to <code>__call__</code> as <code>latents</code>.`,name:"image_embeds"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py#L585",returnDescription:`
<p><code>~ pipeline_utils.ImagePipelineOutput</code> if <code>return_dict</code> is True, otherwise a <code>tuple</code>. When returning
a tuple, the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/ddim#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),we=new Yt({props:{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.__call__.example",$$slots:{default:[_r]},$$scope:{ctx:J}}}),ht=new E({props:{name:"enable_attention_slicing",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1688"}}),Pe=new ta({props:{warning:!0,$$slots:{default:[br]},$$scope:{ctx:J}}}),$e=new Yt({props:{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_attention_slicing.example",$$slots:{default:[vr]},$$scope:{ctx:J}}}),_t=new E({props:{name:"disable_attention_slicing",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1728"}}),vt=new E({props:{name:"enable_vae_slicing",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py#L148"}}),yt=new E({props:{name:"disable_vae_slicing",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py#L156"}}),wt=new E({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1627"}}),Je=new ta({props:{warning:!0,$$slots:{default:[yr]},$$scope:{ctx:J}}}),Ce=new Yt({props:{anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ir]},$$scope:{ctx:J}}}),Ut=new E({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1662"}}),Jt=new E({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py#L163"}}),Ct=new E({props:{name:"noise_image_embeddings",anchor:"diffusers.StableUnCLIPImg2ImgPipeline.noise_image_embeddings",parameters:[{name:"image_embeds",val:": Tensor"},{name:"noise_level",val:": int"},{name:"noise",val:": typing.Optional[torch.FloatTensor] = None"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py#L539"}}),jt=new kt({}),Zt=new E({props:{name:"class diffusers.ImagePipelineOutput",anchor:"diffusers.ImagePipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.ImagePipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L112"}}),{c(){d=a("meta"),b=p(),f=a("h1"),m=a("a"),U=a("span"),v(i.$$.fragment),h=p(),S=a("span"),Y=l("Stable unCLIP"),W=p(),F=a("p"),Gt=l("Stable unCLIP checkpoints are finetuned from "),Vt=a("a"),Oa=l("Stable Diffusion 2.1"),Ha=l(` checkpoints to condition on CLIP image embeddings.
Stable unCLIP still conditions on text embeddings. Given the two separate conditionings, stable unCLIP can be used
for text guided image variation. When combined with an unCLIP prior, it can also be used for full text to image generation.`),na=p(),Bt=a("p"),Ka=l("The abstract from the paper is:"),aa=p(),Xt=a("p"),qt=a("em"),eo=l("Contrastive models like CLIP have been shown to learn robust representations of images that capture both semantics and style. To leverage these representations for image generation, we propose a two-stage model: a prior that generates a CLIP image embedding given a text caption, and a decoder that generates an image conditioned on the image embedding. We show that explicitly generating image representations improves image diversity with minimal loss in photorealism and caption similarity. Our decoders conditioned on image representations can also produce variations of an image that preserve both its semantics and style, while varying the non-essential details absent from the image representation. Moreover, the joint embedding space of CLIP enables language-guided image manipulations in a zero-shot fashion. We use diffusion models for the decoder and experiment with both autoregressive and diffusion models for the prior, finding that the latter are computationally more efficient and produce higher-quality samples."),oa=p(),Q=a("h2"),se=a("a"),Ot=a("span"),v(Be.$$.fragment),to=p(),Ht=a("span"),no=l("Tips"),sa=p(),L=a("p"),ao=l("Stable unCLIP takes  "),Kt=a("code"),oo=l("noise_level"),so=l(` as input during inference which determines how much noise is added
to the image embeddings. A higher `),en=a("code"),io=l("noise_level"),lo=l(` increases variation in the final un-noised images. By default,
we do not add any additional noise to the image embeddings (`),tn=a("code"),ro=l("noise_level = 0"),po=l(")."),ia=p(),q=a("h3"),ie=a("a"),nn=a("span"),v(Xe.$$.fragment),co=p(),an=a("span"),mo=l("Text-to-Image Generation"),la=l(`

Stable unCLIP can be leveraged for text-to-image generation by pipelining it with the prior model of KakaoBrain's open source DALL-E 2 replication [Karlo](https://huggingface.co/kakaobrain/karlo-v1-alpha)

	`),v(Ne.$$.fragment),ra=p(),v(le.$$.fragment),da=p(),O=a("h3"),re=a("a"),on=a("span"),v(Fe.$$.fragment),fo=p(),sn=a("span"),go=l("Text guided Image-to-Image Variation"),pa=p(),v(ze.$$.fragment),ca=p(),de=a("p"),uo=l("Optionally, you can also pass a prompt to "),ln=a("code"),ho=l("pipe"),_o=l(" such as:"),ma=p(),v(De.$$.fragment),fa=p(),H=a("h2"),pe=a("a"),rn=a("span"),v(Re.$$.fragment),bo=p(),dn=a("span"),vo=l("StableUnCLIPPipeline"),ga=p(),T=a("div"),v(Ae.$$.fragment),yo=p(),pn=a("p"),Io=l("Pipeline for text-to-image generation using stable unCLIP."),wo=p(),Ye=a("p"),Po=l("This model inherits from "),Nt=a("a"),$o=l("DiffusionPipeline"),Uo=l(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),To=p(),R=a("div"),v(Qe.$$.fragment),Mo=p(),cn=a("p"),Jo=l("The call function to the pipeline for generation."),Co=p(),v(ce.$$.fragment),xo=p(),k=a("div"),v(qe.$$.fragment),Eo=p(),mn=a("p"),jo=l(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Zo=p(),v(me.$$.fragment),So=p(),v(fe.$$.fragment),Wo=p(),ge=a("div"),v(Oe.$$.fragment),Lo=p(),He=a("p"),ko=l("Disable sliced attention computation. If "),fn=a("code"),Go=l("enable_attention_slicing"),Vo=l(` was previously called, attention is
computed in one step.`),Bo=p(),ue=a("div"),v(Ke.$$.fragment),Xo=p(),gn=a("p"),No=l(`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),Fo=p(),he=a("div"),v(et.$$.fragment),zo=p(),tt=a("p"),Do=l("Disable sliced VAE decoding. If "),un=a("code"),Ro=l("enable_vae_slicing"),Ao=l(` was previously enabled, this method will go back to
computing decoding in one step.`),Yo=p(),G=a("div"),v(nt.$$.fragment),Qo=p(),at=a("p"),qo=l("Enable memory efficient attention from "),ot=a("a"),Oo=l("xFormers"),Ho=l(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),Ko=p(),v(_e.$$.fragment),es=p(),v(be.$$.fragment),ts=p(),ve=a("div"),v(st.$$.fragment),ns=p(),it=a("p"),as=l("Disable memory efficient attention from "),lt=a("a"),os=l("xFormers"),ss=l("."),is=p(),ye=a("div"),v(rt.$$.fragment),ls=p(),z=a("p"),rs=l(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),hn=a("code"),ds=l("forward"),ps=l(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),_n=a("code"),cs=l("enable_sequential_cpu_offload"),ms=l(`, but performance is much better due to the
iterative execution of the `),bn=a("code"),fs=l("unet"),gs=l("."),us=p(),j=a("div"),v(dt.$$.fragment),hs=p(),K=a("p"),_s=l("Add noise to the image embeddings. The amount of noise is controlled by a "),vn=a("code"),bs=l("noise_level"),vs=l(` input. A higher
`),yn=a("code"),ys=l("noise_level"),Is=l(" increases the variance in the final un-noised images."),ws=p(),In=a("p"),Ps=l("The noise is applied in two ways:"),$s=p(),pt=a("ol"),wn=a("li"),Us=l("A noise schedule is applied directly to the embeddings."),Ts=p(),Pn=a("li"),Ms=l("A vector of sinusoidal time embeddings are appended to the output."),Js=p(),ct=a("p"),Cs=l("In both cases, the amount of noise is controlled by the same "),$n=a("code"),xs=l("noise_level"),Es=l("."),js=p(),Un=a("p"),Zs=l("The embeddings are normalized before the noise is applied and un-normalized after the noise is applied."),ua=p(),ee=a("h2"),Ie=a("a"),Tn=a("span"),v(mt.$$.fragment),Ss=p(),Mn=a("span"),Ws=l("StableUnCLIPImg2ImgPipeline"),ha=p(),M=a("div"),v(ft.$$.fragment),Ls=p(),Jn=a("p"),ks=l("Pipeline for text-guided image-to-image generation using stable unCLIP."),Gs=p(),gt=a("p"),Vs=l("This model inherits from "),Ft=a("a"),Bs=l("DiffusionPipeline"),Xs=l(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Ns=p(),A=a("div"),v(ut.$$.fragment),Fs=p(),Cn=a("p"),zs=l("The call function to the pipeline for generation."),Ds=p(),v(we.$$.fragment),Rs=p(),V=a("div"),v(ht.$$.fragment),As=p(),xn=a("p"),Ys=l(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Qs=p(),v(Pe.$$.fragment),qs=p(),v($e.$$.fragment),Os=p(),Ue=a("div"),v(_t.$$.fragment),Hs=p(),bt=a("p"),Ks=l("Disable sliced attention computation. If "),En=a("code"),ei=l("enable_attention_slicing"),ti=l(` was previously called, attention is
computed in one step.`),ni=p(),Te=a("div"),v(vt.$$.fragment),ai=p(),jn=a("p"),oi=l(`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),si=p(),Me=a("div"),v(yt.$$.fragment),ii=p(),It=a("p"),li=l("Disable sliced VAE decoding. If "),Zn=a("code"),ri=l("enable_vae_slicing"),di=l(` was previously enabled, this method will go back to
computing decoding in one step.`),pi=p(),B=a("div"),v(wt.$$.fragment),ci=p(),Pt=a("p"),mi=l("Enable memory efficient attention from "),$t=a("a"),fi=l("xFormers"),gi=l(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),ui=p(),v(Je.$$.fragment),hi=p(),v(Ce.$$.fragment),_i=p(),xe=a("div"),v(Ut.$$.fragment),bi=p(),Tt=a("p"),vi=l("Disable memory efficient attention from "),Mt=a("a"),yi=l("xFormers"),Ii=l("."),wi=p(),Ee=a("div"),v(Jt.$$.fragment),Pi=p(),D=a("p"),$i=l(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),Sn=a("code"),Ui=l("forward"),Ti=l(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),Wn=a("code"),Mi=l("enable_sequential_cpu_offload"),Ji=l(`, but performance is much better due to the
iterative execution of the `),Ln=a("code"),Ci=l("unet"),xi=l("."),Ei=p(),Z=a("div"),v(Ct.$$.fragment),ji=p(),te=a("p"),Zi=l("Add noise to the image embeddings. The amount of noise is controlled by a "),kn=a("code"),Si=l("noise_level"),Wi=l(` input. A higher
`),Gn=a("code"),Li=l("noise_level"),ki=l(" increases the variance in the final un-noised images."),Gi=p(),Vn=a("p"),Vi=l("The noise is applied in two ways:"),Bi=p(),xt=a("ol"),Bn=a("li"),Xi=l("A noise schedule is applied directly to the embeddings."),Ni=p(),Xn=a("li"),Fi=l("A vector of sinusoidal time embeddings are appended to the output."),zi=p(),Et=a("p"),Di=l("In both cases, the amount of noise is controlled by the same "),Nn=a("code"),Ri=l("noise_level"),Ai=l("."),Yi=p(),Fn=a("p"),Qi=l("The embeddings are normalized before the noise is applied and un-normalized after the noise is applied."),_a=p(),ne=a("h2"),je=a("a"),zn=a("span"),v(jt.$$.fragment),qi=p(),Dn=a("span"),Oi=l("ImagePipelineOutput"),ba=p(),ae=a("div"),v(Zt.$$.fragment),Hi=p(),Rn=a("p"),Ki=l("Output class for image pipelines."),this.h()},l(t){const g=dr('[data-svelte="svelte-1phssyn"]',document.head);d=o(g,"META",{name:!0,content:!0}),g.forEach(n),b=c(t),f=o(t,"H1",{class:!0});var St=s(f);m=o(St,"A",{id:!0,class:!0,href:!0});var An=s(m);U=o(An,"SPAN",{});var Yn=s(U);y(i.$$.fragment,Yn),Yn.forEach(n),An.forEach(n),h=c(St),S=o(St,"SPAN",{});var Qn=s(S);Y=r(Qn,"Stable unCLIP"),Qn.forEach(n),St.forEach(n),W=c(t),F=o(t,"P",{});var Wt=s(F);Gt=r(Wt,"Stable unCLIP checkpoints are finetuned from "),Vt=o(Wt,"A",{href:!0});var qn=s(Vt);Oa=r(qn,"Stable Diffusion 2.1"),qn.forEach(n),Ha=r(Wt,` checkpoints to condition on CLIP image embeddings.
Stable unCLIP still conditions on text embeddings. Given the two separate conditionings, stable unCLIP can be used
for text guided image variation. When combined with an unCLIP prior, it can also be used for full text to image generation.`),Wt.forEach(n),na=c(t),Bt=o(t,"P",{});var On=s(Bt);Ka=r(On,"The abstract from the paper is:"),On.forEach(n),aa=c(t),Xt=o(t,"P",{});var Hn=s(Xt);qt=o(Hn,"EM",{});var Kn=s(qt);eo=r(Kn,"Contrastive models like CLIP have been shown to learn robust representations of images that capture both semantics and style. To leverage these representations for image generation, we propose a two-stage model: a prior that generates a CLIP image embedding given a text caption, and a decoder that generates an image conditioned on the image embedding. We show that explicitly generating image representations improves image diversity with minimal loss in photorealism and caption similarity. Our decoders conditioned on image representations can also produce variations of an image that preserve both its semantics and style, while varying the non-essential details absent from the image representation. Moreover, the joint embedding space of CLIP enables language-guided image manipulations in a zero-shot fashion. We use diffusion models for the decoder and experiment with both autoregressive and diffusion models for the prior, finding that the latter are computationally more efficient and produce higher-quality samples."),Kn.forEach(n),Hn.forEach(n),oa=c(t),Q=o(t,"H2",{class:!0});var Lt=s(Q);se=o(Lt,"A",{id:!0,class:!0,href:!0});var ea=s(se);Ot=o(ea,"SPAN",{});var el=s(Ot);y(Be.$$.fragment,el),el.forEach(n),ea.forEach(n),to=c(Lt),Ht=o(Lt,"SPAN",{});var tl=s(Ht);no=r(tl,"Tips"),tl.forEach(n),Lt.forEach(n),sa=c(t),L=o(t,"P",{});var Ze=s(L);ao=r(Ze,"Stable unCLIP takes  "),Kt=o(Ze,"CODE",{});var nl=s(Kt);oo=r(nl,"noise_level"),nl.forEach(n),so=r(Ze,` as input during inference which determines how much noise is added
to the image embeddings. A higher `),en=o(Ze,"CODE",{});var al=s(en);io=r(al,"noise_level"),al.forEach(n),lo=r(Ze,` increases variation in the final un-noised images. By default,
we do not add any additional noise to the image embeddings (`),tn=o(Ze,"CODE",{});var ol=s(tn);ro=r(ol,"noise_level = 0"),ol.forEach(n),po=r(Ze,")."),Ze.forEach(n),ia=c(t),q=o(t,"H3",{class:!0});var ya=s(q);ie=o(ya,"A",{id:!0,class:!0,href:!0});var sl=s(ie);nn=o(sl,"SPAN",{});var il=s(nn);y(Xe.$$.fragment,il),il.forEach(n),sl.forEach(n),co=c(ya),an=o(ya,"SPAN",{});var ll=s(an);mo=r(ll,"Text-to-Image Generation"),ll.forEach(n),ya.forEach(n),la=r(t,`

Stable unCLIP can be leveraged for text-to-image generation by pipelining it with the prior model of KakaoBrain's open source DALL-E 2 replication [Karlo](https://huggingface.co/kakaobrain/karlo-v1-alpha)

	`),y(Ne.$$.fragment,t),ra=c(t),y(le.$$.fragment,t),da=c(t),O=o(t,"H3",{class:!0});var Ia=s(O);re=o(Ia,"A",{id:!0,class:!0,href:!0});var rl=s(re);on=o(rl,"SPAN",{});var dl=s(on);y(Fe.$$.fragment,dl),dl.forEach(n),rl.forEach(n),fo=c(Ia),sn=o(Ia,"SPAN",{});var pl=s(sn);go=r(pl,"Text guided Image-to-Image Variation"),pl.forEach(n),Ia.forEach(n),pa=c(t),y(ze.$$.fragment,t),ca=c(t),de=o(t,"P",{});var wa=s(de);uo=r(wa,"Optionally, you can also pass a prompt to "),ln=o(wa,"CODE",{});var cl=s(ln);ho=r(cl,"pipe"),cl.forEach(n),_o=r(wa," such as:"),wa.forEach(n),ma=c(t),y(De.$$.fragment,t),fa=c(t),H=o(t,"H2",{class:!0});var Pa=s(H);pe=o(Pa,"A",{id:!0,class:!0,href:!0});var ml=s(pe);rn=o(ml,"SPAN",{});var fl=s(rn);y(Re.$$.fragment,fl),fl.forEach(n),ml.forEach(n),bo=c(Pa),dn=o(Pa,"SPAN",{});var gl=s(dn);vo=r(gl,"StableUnCLIPPipeline"),gl.forEach(n),Pa.forEach(n),ga=c(t),T=o(t,"DIV",{class:!0});var C=s(T);y(Ae.$$.fragment,C),yo=c(C),pn=o(C,"P",{});var ul=s(pn);Io=r(ul,"Pipeline for text-to-image generation using stable unCLIP."),ul.forEach(n),wo=c(C),Ye=o(C,"P",{});var $a=s(Ye);Po=r($a,"This model inherits from "),Nt=o($a,"A",{href:!0});var hl=s(Nt);$o=r(hl,"DiffusionPipeline"),hl.forEach(n),Uo=r($a,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),$a.forEach(n),To=c(C),R=o(C,"DIV",{class:!0});var zt=s(R);y(Qe.$$.fragment,zt),Mo=c(zt),cn=o(zt,"P",{});var _l=s(cn);Jo=r(_l,"The call function to the pipeline for generation."),_l.forEach(n),Co=c(zt),y(ce.$$.fragment,zt),zt.forEach(n),xo=c(C),k=o(C,"DIV",{class:!0});var Se=s(k);y(qe.$$.fragment,Se),Eo=c(Se),mn=o(Se,"P",{});var bl=s(mn);jo=r(bl,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),bl.forEach(n),Zo=c(Se),y(me.$$.fragment,Se),So=c(Se),y(fe.$$.fragment,Se),Se.forEach(n),Wo=c(C),ge=o(C,"DIV",{class:!0});var Ua=s(ge);y(Oe.$$.fragment,Ua),Lo=c(Ua),He=o(Ua,"P",{});var Ta=s(He);ko=r(Ta,"Disable sliced attention computation. If "),fn=o(Ta,"CODE",{});var vl=s(fn);Go=r(vl,"enable_attention_slicing"),vl.forEach(n),Vo=r(Ta,` was previously called, attention is
computed in one step.`),Ta.forEach(n),Ua.forEach(n),Bo=c(C),ue=o(C,"DIV",{class:!0});var Ma=s(ue);y(Ke.$$.fragment,Ma),Xo=c(Ma),gn=o(Ma,"P",{});var yl=s(gn);No=r(yl,`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),yl.forEach(n),Ma.forEach(n),Fo=c(C),he=o(C,"DIV",{class:!0});var Ja=s(he);y(et.$$.fragment,Ja),zo=c(Ja),tt=o(Ja,"P",{});var Ca=s(tt);Do=r(Ca,"Disable sliced VAE decoding. If "),un=o(Ca,"CODE",{});var Il=s(un);Ro=r(Il,"enable_vae_slicing"),Il.forEach(n),Ao=r(Ca,` was previously enabled, this method will go back to
computing decoding in one step.`),Ca.forEach(n),Ja.forEach(n),Yo=c(C),G=o(C,"DIV",{class:!0});var We=s(G);y(nt.$$.fragment,We),Qo=c(We),at=o(We,"P",{});var xa=s(at);qo=r(xa,"Enable memory efficient attention from "),ot=o(xa,"A",{href:!0,rel:!0});var wl=s(ot);Oo=r(wl,"xFormers"),wl.forEach(n),Ho=r(xa,`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),xa.forEach(n),Ko=c(We),y(_e.$$.fragment,We),es=c(We),y(be.$$.fragment,We),We.forEach(n),ts=c(C),ve=o(C,"DIV",{class:!0});var Ea=s(ve);y(st.$$.fragment,Ea),ns=c(Ea),it=o(Ea,"P",{});var ja=s(it);as=r(ja,"Disable memory efficient attention from "),lt=o(ja,"A",{href:!0,rel:!0});var Pl=s(lt);os=r(Pl,"xFormers"),Pl.forEach(n),ss=r(ja,"."),ja.forEach(n),Ea.forEach(n),is=c(C),ye=o(C,"DIV",{class:!0});var Za=s(ye);y(rt.$$.fragment,Za),ls=c(Za),z=o(Za,"P",{});var Le=s(z);rs=r(Le,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),hn=o(Le,"CODE",{});var $l=s(hn);ds=r($l,"forward"),$l.forEach(n),ps=r(Le,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),_n=o(Le,"CODE",{});var Ul=s(_n);cs=r(Ul,"enable_sequential_cpu_offload"),Ul.forEach(n),ms=r(Le,`, but performance is much better due to the
iterative execution of the `),bn=o(Le,"CODE",{});var Tl=s(bn);fs=r(Tl,"unet"),Tl.forEach(n),gs=r(Le,"."),Le.forEach(n),Za.forEach(n),us=c(C),j=o(C,"DIV",{class:!0});var X=s(j);y(dt.$$.fragment,X),hs=c(X),K=o(X,"P",{});var Dt=s(K);_s=r(Dt,"Add noise to the image embeddings. The amount of noise is controlled by a "),vn=o(Dt,"CODE",{});var Ml=s(vn);bs=r(Ml,"noise_level"),Ml.forEach(n),vs=r(Dt,` input. A higher
`),yn=o(Dt,"CODE",{});var Jl=s(yn);ys=r(Jl,"noise_level"),Jl.forEach(n),Is=r(Dt," increases the variance in the final un-noised images."),Dt.forEach(n),ws=c(X),In=o(X,"P",{});var Cl=s(In);Ps=r(Cl,"The noise is applied in two ways:"),Cl.forEach(n),$s=c(X),pt=o(X,"OL",{});var Sa=s(pt);wn=o(Sa,"LI",{});var xl=s(wn);Us=r(xl,"A noise schedule is applied directly to the embeddings."),xl.forEach(n),Ts=c(Sa),Pn=o(Sa,"LI",{});var El=s(Pn);Ms=r(El,"A vector of sinusoidal time embeddings are appended to the output."),El.forEach(n),Sa.forEach(n),Js=c(X),ct=o(X,"P",{});var Wa=s(ct);Cs=r(Wa,"In both cases, the amount of noise is controlled by the same "),$n=o(Wa,"CODE",{});var jl=s($n);xs=r(jl,"noise_level"),jl.forEach(n),Es=r(Wa,"."),Wa.forEach(n),js=c(X),Un=o(X,"P",{});var Zl=s(Un);Zs=r(Zl,"The embeddings are normalized before the noise is applied and un-normalized after the noise is applied."),Zl.forEach(n),X.forEach(n),C.forEach(n),ua=c(t),ee=o(t,"H2",{class:!0});var La=s(ee);Ie=o(La,"A",{id:!0,class:!0,href:!0});var Sl=s(Ie);Tn=o(Sl,"SPAN",{});var Wl=s(Tn);y(mt.$$.fragment,Wl),Wl.forEach(n),Sl.forEach(n),Ss=c(La),Mn=o(La,"SPAN",{});var Ll=s(Mn);Ws=r(Ll,"StableUnCLIPImg2ImgPipeline"),Ll.forEach(n),La.forEach(n),ha=c(t),M=o(t,"DIV",{class:!0});var x=s(M);y(ft.$$.fragment,x),Ls=c(x),Jn=o(x,"P",{});var kl=s(Jn);ks=r(kl,"Pipeline for text-guided image-to-image generation using stable unCLIP."),kl.forEach(n),Gs=c(x),gt=o(x,"P",{});var ka=s(gt);Vs=r(ka,"This model inherits from "),Ft=o(ka,"A",{href:!0});var Gl=s(Ft);Bs=r(Gl,"DiffusionPipeline"),Gl.forEach(n),Xs=r(ka,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ka.forEach(n),Ns=c(x),A=o(x,"DIV",{class:!0});var Rt=s(A);y(ut.$$.fragment,Rt),Fs=c(Rt),Cn=o(Rt,"P",{});var Vl=s(Cn);zs=r(Vl,"The call function to the pipeline for generation."),Vl.forEach(n),Ds=c(Rt),y(we.$$.fragment,Rt),Rt.forEach(n),Rs=c(x),V=o(x,"DIV",{class:!0});var ke=s(V);y(ht.$$.fragment,ke),As=c(ke),xn=o(ke,"P",{});var Bl=s(xn);Ys=r(Bl,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Bl.forEach(n),Qs=c(ke),y(Pe.$$.fragment,ke),qs=c(ke),y($e.$$.fragment,ke),ke.forEach(n),Os=c(x),Ue=o(x,"DIV",{class:!0});var Ga=s(Ue);y(_t.$$.fragment,Ga),Hs=c(Ga),bt=o(Ga,"P",{});var Va=s(bt);Ks=r(Va,"Disable sliced attention computation. If "),En=o(Va,"CODE",{});var Xl=s(En);ei=r(Xl,"enable_attention_slicing"),Xl.forEach(n),ti=r(Va,` was previously called, attention is
computed in one step.`),Va.forEach(n),Ga.forEach(n),ni=c(x),Te=o(x,"DIV",{class:!0});var Ba=s(Te);y(vt.$$.fragment,Ba),ai=c(Ba),jn=o(Ba,"P",{});var Nl=s(jn);oi=r(Nl,`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),Nl.forEach(n),Ba.forEach(n),si=c(x),Me=o(x,"DIV",{class:!0});var Xa=s(Me);y(yt.$$.fragment,Xa),ii=c(Xa),It=o(Xa,"P",{});var Na=s(It);li=r(Na,"Disable sliced VAE decoding. If "),Zn=o(Na,"CODE",{});var Fl=s(Zn);ri=r(Fl,"enable_vae_slicing"),Fl.forEach(n),di=r(Na,` was previously enabled, this method will go back to
computing decoding in one step.`),Na.forEach(n),Xa.forEach(n),pi=c(x),B=o(x,"DIV",{class:!0});var Ge=s(B);y(wt.$$.fragment,Ge),ci=c(Ge),Pt=o(Ge,"P",{});var Fa=s(Pt);mi=r(Fa,"Enable memory efficient attention from "),$t=o(Fa,"A",{href:!0,rel:!0});var zl=s($t);fi=r(zl,"xFormers"),zl.forEach(n),gi=r(Fa,`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),Fa.forEach(n),ui=c(Ge),y(Je.$$.fragment,Ge),hi=c(Ge),y(Ce.$$.fragment,Ge),Ge.forEach(n),_i=c(x),xe=o(x,"DIV",{class:!0});var za=s(xe);y(Ut.$$.fragment,za),bi=c(za),Tt=o(za,"P",{});var Da=s(Tt);vi=r(Da,"Disable memory efficient attention from "),Mt=o(Da,"A",{href:!0,rel:!0});var Dl=s(Mt);yi=r(Dl,"xFormers"),Dl.forEach(n),Ii=r(Da,"."),Da.forEach(n),za.forEach(n),wi=c(x),Ee=o(x,"DIV",{class:!0});var Ra=s(Ee);y(Jt.$$.fragment,Ra),Pi=c(Ra),D=o(Ra,"P",{});var Ve=s(D);$i=r(Ve,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),Sn=o(Ve,"CODE",{});var Rl=s(Sn);Ui=r(Rl,"forward"),Rl.forEach(n),Ti=r(Ve,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),Wn=o(Ve,"CODE",{});var Al=s(Wn);Mi=r(Al,"enable_sequential_cpu_offload"),Al.forEach(n),Ji=r(Ve,`, but performance is much better due to the
iterative execution of the `),Ln=o(Ve,"CODE",{});var Yl=s(Ln);Ci=r(Yl,"unet"),Yl.forEach(n),xi=r(Ve,"."),Ve.forEach(n),Ra.forEach(n),Ei=c(x),Z=o(x,"DIV",{class:!0});var N=s(Z);y(Ct.$$.fragment,N),ji=c(N),te=o(N,"P",{});var At=s(te);Zi=r(At,"Add noise to the image embeddings. The amount of noise is controlled by a "),kn=o(At,"CODE",{});var Ql=s(kn);Si=r(Ql,"noise_level"),Ql.forEach(n),Wi=r(At,` input. A higher
`),Gn=o(At,"CODE",{});var ql=s(Gn);Li=r(ql,"noise_level"),ql.forEach(n),ki=r(At," increases the variance in the final un-noised images."),At.forEach(n),Gi=c(N),Vn=o(N,"P",{});var Ol=s(Vn);Vi=r(Ol,"The noise is applied in two ways:"),Ol.forEach(n),Bi=c(N),xt=o(N,"OL",{});var Aa=s(xt);Bn=o(Aa,"LI",{});var Hl=s(Bn);Xi=r(Hl,"A noise schedule is applied directly to the embeddings."),Hl.forEach(n),Ni=c(Aa),Xn=o(Aa,"LI",{});var Kl=s(Xn);Fi=r(Kl,"A vector of sinusoidal time embeddings are appended to the output."),Kl.forEach(n),Aa.forEach(n),zi=c(N),Et=o(N,"P",{});var Ya=s(Et);Di=r(Ya,"In both cases, the amount of noise is controlled by the same "),Nn=o(Ya,"CODE",{});var er=s(Nn);Ri=r(er,"noise_level"),er.forEach(n),Ai=r(Ya,"."),Ya.forEach(n),Yi=c(N),Fn=o(N,"P",{});var tr=s(Fn);Qi=r(tr,"The embeddings are normalized before the noise is applied and un-normalized after the noise is applied."),tr.forEach(n),N.forEach(n),x.forEach(n),_a=c(t),ne=o(t,"H2",{class:!0});var Qa=s(ne);je=o(Qa,"A",{id:!0,class:!0,href:!0});var nr=s(je);zn=o(nr,"SPAN",{});var ar=s(zn);y(jt.$$.fragment,ar),ar.forEach(n),nr.forEach(n),qi=c(Qa),Dn=o(Qa,"SPAN",{});var or=s(Dn);Oi=r(or,"ImagePipelineOutput"),or.forEach(n),Qa.forEach(n),ba=c(t),ae=o(t,"DIV",{class:!0});var qa=s(ae);y(Zt.$$.fragment,qa),Hi=c(qa),Rn=o(qa,"P",{});var sr=s(Rn);Ki=r(sr,"Output class for image pipelines."),sr.forEach(n),qa.forEach(n),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(Pr)),u(m,"id","stable-unclip"),u(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(m,"href","#stable-unclip"),u(f,"class","relative group"),u(Vt,"href","./stable_diffusion/stable_diffusion_2"),u(se,"id","tips"),u(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(se,"href","#tips"),u(Q,"class","relative group"),u(ie,"id","texttoimage-generation"),u(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ie,"href","#texttoimage-generation"),u(q,"class","relative group"),u(re,"id","text-guided-imagetoimage-variation"),u(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(re,"href","#text-guided-imagetoimage-variation"),u(O,"class","relative group"),u(pe,"id","diffusers.StableUnCLIPPipeline"),u(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(pe,"href","#diffusers.StableUnCLIPPipeline"),u(H,"class","relative group"),u(Nt,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),u(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ot,"href","https://facebookresearch.github.io/xformers/"),u(ot,"rel","nofollow"),u(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(lt,"href","https://facebookresearch.github.io/xformers/"),u(lt,"rel","nofollow"),u(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ie,"id","diffusers.StableUnCLIPImg2ImgPipeline"),u(Ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Ie,"href","#diffusers.StableUnCLIPImg2ImgPipeline"),u(ee,"class","relative group"),u(Ft,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),u(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u($t,"href","https://facebookresearch.github.io/xformers/"),u($t,"rel","nofollow"),u(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Mt,"href","https://facebookresearch.github.io/xformers/"),u(Mt,"rel","nofollow"),u(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(je,"id","diffusers.ImagePipelineOutput"),u(je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(je,"href","#diffusers.ImagePipelineOutput"),u(ne,"class","relative group"),u(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,d),_(t,b,g),_(t,f,g),e(f,m),e(m,U),I(i,U,null),e(f,h),e(f,S),e(S,Y),_(t,W,g),_(t,F,g),e(F,Gt),e(F,Vt),e(Vt,Oa),e(F,Ha),_(t,na,g),_(t,Bt,g),e(Bt,Ka),_(t,aa,g),_(t,Xt,g),e(Xt,qt),e(qt,eo),_(t,oa,g),_(t,Q,g),e(Q,se),e(se,Ot),I(Be,Ot,null),e(Q,to),e(Q,Ht),e(Ht,no),_(t,sa,g),_(t,L,g),e(L,ao),e(L,Kt),e(Kt,oo),e(L,so),e(L,en),e(en,io),e(L,lo),e(L,tn),e(tn,ro),e(L,po),_(t,ia,g),_(t,q,g),e(q,ie),e(ie,nn),I(Xe,nn,null),e(q,co),e(q,an),e(an,mo),_(t,la,g),I(Ne,t,g),_(t,ra,g),I(le,t,g),_(t,da,g),_(t,O,g),e(O,re),e(re,on),I(Fe,on,null),e(O,fo),e(O,sn),e(sn,go),_(t,pa,g),I(ze,t,g),_(t,ca,g),_(t,de,g),e(de,uo),e(de,ln),e(ln,ho),e(de,_o),_(t,ma,g),I(De,t,g),_(t,fa,g),_(t,H,g),e(H,pe),e(pe,rn),I(Re,rn,null),e(H,bo),e(H,dn),e(dn,vo),_(t,ga,g),_(t,T,g),I(Ae,T,null),e(T,yo),e(T,pn),e(pn,Io),e(T,wo),e(T,Ye),e(Ye,Po),e(Ye,Nt),e(Nt,$o),e(Ye,Uo),e(T,To),e(T,R),I(Qe,R,null),e(R,Mo),e(R,cn),e(cn,Jo),e(R,Co),I(ce,R,null),e(T,xo),e(T,k),I(qe,k,null),e(k,Eo),e(k,mn),e(mn,jo),e(k,Zo),I(me,k,null),e(k,So),I(fe,k,null),e(T,Wo),e(T,ge),I(Oe,ge,null),e(ge,Lo),e(ge,He),e(He,ko),e(He,fn),e(fn,Go),e(He,Vo),e(T,Bo),e(T,ue),I(Ke,ue,null),e(ue,Xo),e(ue,gn),e(gn,No),e(T,Fo),e(T,he),I(et,he,null),e(he,zo),e(he,tt),e(tt,Do),e(tt,un),e(un,Ro),e(tt,Ao),e(T,Yo),e(T,G),I(nt,G,null),e(G,Qo),e(G,at),e(at,qo),e(at,ot),e(ot,Oo),e(at,Ho),e(G,Ko),I(_e,G,null),e(G,es),I(be,G,null),e(T,ts),e(T,ve),I(st,ve,null),e(ve,ns),e(ve,it),e(it,as),e(it,lt),e(lt,os),e(it,ss),e(T,is),e(T,ye),I(rt,ye,null),e(ye,ls),e(ye,z),e(z,rs),e(z,hn),e(hn,ds),e(z,ps),e(z,_n),e(_n,cs),e(z,ms),e(z,bn),e(bn,fs),e(z,gs),e(T,us),e(T,j),I(dt,j,null),e(j,hs),e(j,K),e(K,_s),e(K,vn),e(vn,bs),e(K,vs),e(K,yn),e(yn,ys),e(K,Is),e(j,ws),e(j,In),e(In,Ps),e(j,$s),e(j,pt),e(pt,wn),e(wn,Us),e(pt,Ts),e(pt,Pn),e(Pn,Ms),e(j,Js),e(j,ct),e(ct,Cs),e(ct,$n),e($n,xs),e(ct,Es),e(j,js),e(j,Un),e(Un,Zs),_(t,ua,g),_(t,ee,g),e(ee,Ie),e(Ie,Tn),I(mt,Tn,null),e(ee,Ss),e(ee,Mn),e(Mn,Ws),_(t,ha,g),_(t,M,g),I(ft,M,null),e(M,Ls),e(M,Jn),e(Jn,ks),e(M,Gs),e(M,gt),e(gt,Vs),e(gt,Ft),e(Ft,Bs),e(gt,Xs),e(M,Ns),e(M,A),I(ut,A,null),e(A,Fs),e(A,Cn),e(Cn,zs),e(A,Ds),I(we,A,null),e(M,Rs),e(M,V),I(ht,V,null),e(V,As),e(V,xn),e(xn,Ys),e(V,Qs),I(Pe,V,null),e(V,qs),I($e,V,null),e(M,Os),e(M,Ue),I(_t,Ue,null),e(Ue,Hs),e(Ue,bt),e(bt,Ks),e(bt,En),e(En,ei),e(bt,ti),e(M,ni),e(M,Te),I(vt,Te,null),e(Te,ai),e(Te,jn),e(jn,oi),e(M,si),e(M,Me),I(yt,Me,null),e(Me,ii),e(Me,It),e(It,li),e(It,Zn),e(Zn,ri),e(It,di),e(M,pi),e(M,B),I(wt,B,null),e(B,ci),e(B,Pt),e(Pt,mi),e(Pt,$t),e($t,fi),e(Pt,gi),e(B,ui),I(Je,B,null),e(B,hi),I(Ce,B,null),e(M,_i),e(M,xe),I(Ut,xe,null),e(xe,bi),e(xe,Tt),e(Tt,vi),e(Tt,Mt),e(Mt,yi),e(Tt,Ii),e(M,wi),e(M,Ee),I(Jt,Ee,null),e(Ee,Pi),e(Ee,D),e(D,$i),e(D,Sn),e(Sn,Ui),e(D,Ti),e(D,Wn),e(Wn,Mi),e(D,Ji),e(D,Ln),e(Ln,Ci),e(D,xi),e(M,Ei),e(M,Z),I(Ct,Z,null),e(Z,ji),e(Z,te),e(te,Zi),e(te,kn),e(kn,Si),e(te,Wi),e(te,Gn),e(Gn,Li),e(te,ki),e(Z,Gi),e(Z,Vn),e(Vn,Vi),e(Z,Bi),e(Z,xt),e(xt,Bn),e(Bn,Xi),e(xt,Ni),e(xt,Xn),e(Xn,Fi),e(Z,zi),e(Z,Et),e(Et,Di),e(Et,Nn),e(Nn,Ri),e(Et,Ai),e(Z,Yi),e(Z,Fn),e(Fn,Qi),_(t,_a,g),_(t,ne,g),e(ne,je),e(je,zn),I(jt,zn,null),e(ne,qi),e(ne,Dn),e(Dn,Oi),_(t,ba,g),_(t,ae,g),I(Zt,ae,null),e(ae,Hi),e(ae,Rn),e(Rn,Ki),va=!0},p(t,[g]){const St={};g&2&&(St.$$scope={dirty:g,ctx:t}),le.$set(St);const An={};g&2&&(An.$$scope={dirty:g,ctx:t}),ce.$set(An);const Yn={};g&2&&(Yn.$$scope={dirty:g,ctx:t}),me.$set(Yn);const Qn={};g&2&&(Qn.$$scope={dirty:g,ctx:t}),fe.$set(Qn);const Wt={};g&2&&(Wt.$$scope={dirty:g,ctx:t}),_e.$set(Wt);const qn={};g&2&&(qn.$$scope={dirty:g,ctx:t}),be.$set(qn);const On={};g&2&&(On.$$scope={dirty:g,ctx:t}),we.$set(On);const Hn={};g&2&&(Hn.$$scope={dirty:g,ctx:t}),Pe.$set(Hn);const Kn={};g&2&&(Kn.$$scope={dirty:g,ctx:t}),$e.$set(Kn);const Lt={};g&2&&(Lt.$$scope={dirty:g,ctx:t}),Je.$set(Lt);const ea={};g&2&&(ea.$$scope={dirty:g,ctx:t}),Ce.$set(ea)},i(t){va||(w(i.$$.fragment,t),w(Be.$$.fragment,t),w(Xe.$$.fragment,t),w(Ne.$$.fragment,t),w(le.$$.fragment,t),w(Fe.$$.fragment,t),w(ze.$$.fragment,t),w(De.$$.fragment,t),w(Re.$$.fragment,t),w(Ae.$$.fragment,t),w(Qe.$$.fragment,t),w(ce.$$.fragment,t),w(qe.$$.fragment,t),w(me.$$.fragment,t),w(fe.$$.fragment,t),w(Oe.$$.fragment,t),w(Ke.$$.fragment,t),w(et.$$.fragment,t),w(nt.$$.fragment,t),w(_e.$$.fragment,t),w(be.$$.fragment,t),w(st.$$.fragment,t),w(rt.$$.fragment,t),w(dt.$$.fragment,t),w(mt.$$.fragment,t),w(ft.$$.fragment,t),w(ut.$$.fragment,t),w(we.$$.fragment,t),w(ht.$$.fragment,t),w(Pe.$$.fragment,t),w($e.$$.fragment,t),w(_t.$$.fragment,t),w(vt.$$.fragment,t),w(yt.$$.fragment,t),w(wt.$$.fragment,t),w(Je.$$.fragment,t),w(Ce.$$.fragment,t),w(Ut.$$.fragment,t),w(Jt.$$.fragment,t),w(Ct.$$.fragment,t),w(jt.$$.fragment,t),w(Zt.$$.fragment,t),va=!0)},o(t){P(i.$$.fragment,t),P(Be.$$.fragment,t),P(Xe.$$.fragment,t),P(Ne.$$.fragment,t),P(le.$$.fragment,t),P(Fe.$$.fragment,t),P(ze.$$.fragment,t),P(De.$$.fragment,t),P(Re.$$.fragment,t),P(Ae.$$.fragment,t),P(Qe.$$.fragment,t),P(ce.$$.fragment,t),P(qe.$$.fragment,t),P(me.$$.fragment,t),P(fe.$$.fragment,t),P(Oe.$$.fragment,t),P(Ke.$$.fragment,t),P(et.$$.fragment,t),P(nt.$$.fragment,t),P(_e.$$.fragment,t),P(be.$$.fragment,t),P(st.$$.fragment,t),P(rt.$$.fragment,t),P(dt.$$.fragment,t),P(mt.$$.fragment,t),P(ft.$$.fragment,t),P(ut.$$.fragment,t),P(we.$$.fragment,t),P(ht.$$.fragment,t),P(Pe.$$.fragment,t),P($e.$$.fragment,t),P(_t.$$.fragment,t),P(vt.$$.fragment,t),P(yt.$$.fragment,t),P(wt.$$.fragment,t),P(Je.$$.fragment,t),P(Ce.$$.fragment,t),P(Ut.$$.fragment,t),P(Jt.$$.fragment,t),P(Ct.$$.fragment,t),P(jt.$$.fragment,t),P(Zt.$$.fragment,t),va=!1},d(t){n(d),t&&n(b),t&&n(f),$(i),t&&n(W),t&&n(F),t&&n(na),t&&n(Bt),t&&n(aa),t&&n(Xt),t&&n(oa),t&&n(Q),$(Be),t&&n(sa),t&&n(L),t&&n(ia),t&&n(q),$(Xe),t&&n(la),$(Ne,t),t&&n(ra),$(le,t),t&&n(da),t&&n(O),$(Fe),t&&n(pa),$(ze,t),t&&n(ca),t&&n(de),t&&n(ma),$(De,t),t&&n(fa),t&&n(H),$(Re),t&&n(ga),t&&n(T),$(Ae),$(Qe),$(ce),$(qe),$(me),$(fe),$(Oe),$(Ke),$(et),$(nt),$(_e),$(be),$(st),$(rt),$(dt),t&&n(ua),t&&n(ee),$(mt),t&&n(ha),t&&n(M),$(ft),$(ut),$(we),$(ht),$(Pe),$($e),$(_t),$(vt),$(yt),$(wt),$(Je),$(Ce),$(Ut),$(Jt),$(Ct),t&&n(_a),t&&n(ne),$(jt),t&&n(ba),t&&n(ae),$(Zt)}}}const Pr={local:"stable-unclip",sections:[{local:"tips",sections:[{local:"texttoimage-generation",title:"Text-to-Image Generation"},{local:"text-guided-imagetoimage-variation",title:"Text guided Image-to-Image Variation"}],title:"Tips"},{local:"diffusers.StableUnCLIPPipeline",title:"StableUnCLIPPipeline"},{local:"diffusers.StableUnCLIPImg2ImgPipeline",title:"StableUnCLIPImg2ImgPipeline"},{local:"diffusers.ImagePipelineOutput",title:"ImagePipelineOutput"}],title:"Stable unCLIP"};function $r(J){return pr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Er extends ir{constructor(d){super();lr(this,d,$r,wr,rr,{})}}export{Er as default,Pr as metadata};
