import{S as Ya,i as Oa,s as Ha,e as a,k as r,w as b,t as c,M as Ka,c as i,d as n,m as l,a as o,x as w,h as f,b as g,G as e,g as _,y as M,q as T,o as D,B as V,v as ei,L as ot}from"../../../chunks/vendor-hf-doc-builder.js";import{T as ti}from"../../../chunks/Tip-hf-doc-builder.js";import{D as B}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as rt}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as at}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as it}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ni(I){let p,y,h,d,v,s,m,F;return{c(){p=a("p"),y=c("Make sure to check out the Schedulers "),h=a("a"),d=c("guide"),v=c(" to learn how to explore the tradeoff between scheduler speed and quality, and see the "),s=a("a"),m=c("reuse components across pipelines"),F=c(" section to learn how to efficiently load the same components into multiple pipelines."),this.h()},l(R){p=i(R,"P",{});var P=o(p);y=f(P,"Make sure to check out the Schedulers "),h=i(P,"A",{href:!0});var $=o(h);d=f($,"guide"),$.forEach(n),v=f(P," to learn how to explore the tradeoff between scheduler speed and quality, and see the "),s=i(P,"A",{href:!0});var Ce=o(s);m=f(Ce,"reuse components across pipelines"),Ce.forEach(n),F=f(P," section to learn how to efficiently load the same components into multiple pipelines."),P.forEach(n),this.h()},h(){g(h,"href","/using-diffusers/schedulers"),g(s,"href","/using-diffusers/loading#reuse-components-across-pipelines")},m(R,P){_(R,p,P),e(p,y),e(p,h),e(h,d),e(p,v),e(p,s),e(s,m),e(p,F)},d(R){R&&n(p)}}}function si(I){let p,y,h,d,v;return d=new rt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFZlcnNhdGlsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEElMEElMjMlMjBsZXQncyUyMGRvd25sb2FkJTIwYW4lMjBpbml0aWFsJTIwaW1hZ2UlMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZkaWZmdXNlcnMlMkZpbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmJlbnouanBnJTIyJTBBJTBBcmVzcG9uc2UlMjAlM0QlMjByZXF1ZXN0cy5nZXQodXJsKSUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihCeXRlc0lPKHJlc3BvbnNlLmNvbnRlbnQpKS5jb252ZXJ0KCUyMlJHQiUyMiklMEF0ZXh0JTIwJTNEJTIwJTIyYSUyMHJlZCUyMGNhciUyMGluJTIwdGhlJTIwc3VuJTIyJTBBJTBBcGlwZSUyMCUzRCUyMFZlcnNhdGlsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzaGktbGFicyUyRnZlcnNhdGlsZS1kaWZmdXNpb24lMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3VkYSUyMikubWFudWFsX3NlZWQoMCklMEF0ZXh0X3RvX2ltYWdlX3N0cmVuZ3RoJTIwJTNEJTIwMC43NSUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZS5kdWFsX2d1aWRlZCglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0R0ZXh0JTJDJTIwaW1hZ2UlM0RpbWFnZSUyQyUyMHRleHRfdG9faW1hZ2Vfc3RyZW5ndGglM0R0ZXh0X3RvX2ltYWdlX3N0cmVuZ3RoJTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTBBKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjIuJTJGY2FyX3ZhcmlhdGlvbi5wbmclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VersatileDiffusionPipeline
<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">import</span> requests
<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> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s download an initial image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>response = requests.get(url)
<span class="hljs-meta">&gt;&gt;&gt; </span>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>text = <span class="hljs-string">&quot;a red car in the sun&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = VersatileDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </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>generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_to_image_strength = <span class="hljs-number">0.75</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe.dual_guided(
<span class="hljs-meta">... </span>    prompt=text, image=image, text_to_image_strength=text_to_image_strength, generator=generator
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;./car_variation.png&quot;</span>)`}}),{c(){p=a("p"),y=c("Examples:"),h=r(),b(d.$$.fragment)},l(s){p=i(s,"P",{});var m=o(p);y=f(m,"Examples:"),m.forEach(n),h=l(s),w(d.$$.fragment,s)},m(s,m){_(s,p,m),e(p,y),_(s,h,m),M(d,s,m),v=!0},p:ot,i(s){v||(T(d.$$.fragment,s),v=!0)},o(s){D(d.$$.fragment,s),v=!1},d(s){s&&n(p),s&&n(h),V(d,s)}}}function ai(I){let p,y,h,d,v;return d=new rt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFZlcnNhdGlsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEElMEElMjMlMjBsZXQncyUyMGRvd25sb2FkJTIwYW4lMjBpbml0aWFsJTIwaW1hZ2UlMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZkaWZmdXNlcnMlMkZpbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmJlbnouanBnJTIyJTBBJTBBcmVzcG9uc2UlMjAlM0QlMjByZXF1ZXN0cy5nZXQodXJsKSUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihCeXRlc0lPKHJlc3BvbnNlLmNvbnRlbnQpKS5jb252ZXJ0KCUyMlJHQiUyMiklMEElMEFwaXBlJTIwJTNEJTIwVmVyc2F0aWxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnNoaS1sYWJzJTJGdmVyc2F0aWxlLWRpZmZ1c2lvbiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgwKSUwQWltYWdlJTIwJTNEJTIwcGlwZS5pbWFnZV92YXJpYXRpb24oaW1hZ2UlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMi4lMkZjYXJfdmFyaWF0aW9uLnBuZyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VersatileDiffusionPipeline
<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">import</span> requests
<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> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s download an initial image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>response = requests.get(url)
<span class="hljs-meta">&gt;&gt;&gt; </span>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>pipe = VersatileDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </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>generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe.image_variation(image, generator=generator).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;./car_variation.png&quot;</span>)`}}),{c(){p=a("p"),y=c("Examples:"),h=r(),b(d.$$.fragment)},l(s){p=i(s,"P",{});var m=o(p);y=f(m,"Examples:"),m.forEach(n),h=l(s),w(d.$$.fragment,s)},m(s,m){_(s,p,m),e(p,y),_(s,h,m),M(d,s,m),v=!0},p:ot,i(s){v||(T(d.$$.fragment,s),v=!0)},o(s){D(d.$$.fragment,s),v=!1},d(s){s&&n(p),s&&n(h),V(d,s)}}}function ii(I){let p,y,h,d,v;return d=new rt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFZlcnNhdGlsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwVmVyc2F0aWxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnNoaS1sYWJzJTJGdmVyc2F0aWxlLWRpZmZ1c2lvbiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgwKSUwQWltYWdlJTIwJTNEJTIwcGlwZS50ZXh0X3RvX2ltYWdlKCUyMmFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwb24lMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMi4lMkZhc3Ryb25hdXQucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VersatileDiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = VersatileDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </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>generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe.text_to_image(<span class="hljs-string">&quot;an astronaut riding on a horse on mars&quot;</span>, generator=generator).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;./astronaut.png&quot;</span>)`}}),{c(){p=a("p"),y=c("Examples:"),h=r(),b(d.$$.fragment)},l(s){p=i(s,"P",{});var m=o(p);y=f(m,"Examples:"),m.forEach(n),h=l(s),w(d.$$.fragment,s)},m(s,m){_(s,p,m),e(p,y),_(s,h,m),M(d,s,m),v=!0},p:ot,i(s){v||(T(d.$$.fragment,s),v=!0)},o(s){D(d.$$.fragment,s),v=!1},d(s){s&&n(p),s&&n(h),V(d,s)}}}function oi(I){let p,y,h,d,v;return d=new rt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFZlcnNhdGlsZURpZmZ1c2lvblRleHRUb0ltYWdlUGlwZWxpbmUlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGUlMjAlM0QlMjBWZXJzYXRpbGVEaWZmdXNpb25UZXh0VG9JbWFnZVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzaGktbGFicyUyRnZlcnNhdGlsZS1kaWZmdXNpb24lMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTBBcGlwZS5yZW1vdmVfdW51c2VkX3dlaWdodHMoKSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDApJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUyMmFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwb24lMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMi4lMkZhc3Ryb25hdXQucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VersatileDiffusionTextToImagePipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = VersatileDiffusionTextToImagePipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.remove_unused_weights()
<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>generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(<span class="hljs-string">&quot;an astronaut riding on a horse on mars&quot;</span>, generator=generator).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;./astronaut.png&quot;</span>)`}}),{c(){p=a("p"),y=c("Examples:"),h=r(),b(d.$$.fragment)},l(s){p=i(s,"P",{});var m=o(p);y=f(m,"Examples:"),m.forEach(n),h=l(s),w(d.$$.fragment,s)},m(s,m){_(s,p,m),e(p,y),_(s,h,m),M(d,s,m),v=!0},p:ot,i(s){v||(T(d.$$.fragment,s),v=!0)},o(s){D(d.$$.fragment,s),v=!1},d(s){s&&n(p),s&&n(h),V(d,s)}}}function ri(I){let p,y,h,d,v;return d=new rt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFZlcnNhdGlsZURpZmZ1c2lvbkltYWdlVmFyaWF0aW9uUGlwZWxpbmUlMEFpbXBvcnQlMjB0b3JjaCUwQWltcG9ydCUyMHJlcXVlc3RzJTBBZnJvbSUyMGlvJTIwaW1wb3J0JTIwQnl0ZXNJTyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQSUyMyUyMGxldCdzJTIwZG93bmxvYWQlMjBhbiUyMGluaXRpYWwlMjBpbWFnZSUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGYmVuei5qcGclMjIlMEElMEFyZXNwb25zZSUyMCUzRCUyMHJlcXVlc3RzLmdldCh1cmwpJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKEJ5dGVzSU8ocmVzcG9uc2UuY29udGVudCkpLmNvbnZlcnQoJTIyUkdCJTIyKSUwQSUwQXBpcGUlMjAlM0QlMjBWZXJzYXRpbGVEaWZmdXNpb25JbWFnZVZhcmlhdGlvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzaGktbGFicyUyRnZlcnNhdGlsZS1kaWZmdXNpb24lMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3VkYSUyMikubWFudWFsX3NlZWQoMCklMEFpbWFnZSUyMCUzRCUyMHBpcGUoaW1hZ2UlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMi4lMkZjYXJfdmFyaWF0aW9uLnBuZyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VersatileDiffusionImageVariationPipeline
<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">import</span> requests
<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> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s download an initial image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>response = requests.get(url)
<span class="hljs-meta">&gt;&gt;&gt; </span>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>pipe = VersatileDiffusionImageVariationPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </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>generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(image, generator=generator).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;./car_variation.png&quot;</span>)`}}),{c(){p=a("p"),y=c("Examples:"),h=r(),b(d.$$.fragment)},l(s){p=i(s,"P",{});var m=o(p);y=f(m,"Examples:"),m.forEach(n),h=l(s),w(d.$$.fragment,s)},m(s,m){_(s,p,m),e(p,y),_(s,h,m),M(d,s,m),v=!0},p:ot,i(s){v||(T(d.$$.fragment,s),v=!0)},o(s){D(d.$$.fragment,s),v=!1},d(s){s&&n(p),s&&n(h),V(d,s)}}}function li(I){let p,y,h,d,v;return d=new rt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFZlcnNhdGlsZURpZmZ1c2lvbkR1YWxHdWlkZWRQaXBlbGluZSUwQWltcG9ydCUyMHRvcmNoJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwaW8lMjBpbXBvcnQlMjBCeXRlc0lPJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBJTIzJTIwbGV0J3MlMjBkb3dubG9hZCUyMGFuJTIwaW5pdGlhbCUyMGltYWdlJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZiZW56LmpwZyUyMiUwQSUwQXJlc3BvbnNlJTIwJTNEJTIwcmVxdWVzdHMuZ2V0KHVybCklMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4oQnl0ZXNJTyhyZXNwb25zZS5jb250ZW50KSkuY29udmVydCglMjJSR0IlMjIpJTBBdGV4dCUyMCUzRCUyMCUyMmElMjByZWQlMjBjYXIlMjBpbiUyMHRoZSUyMHN1biUyMiUwQSUwQXBpcGUlMjAlM0QlMjBWZXJzYXRpbGVEaWZmdXNpb25EdWFsR3VpZGVkUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnNoaS1sYWJzJTJGdmVyc2F0aWxlLWRpZmZ1c2lvbiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEFwaXBlLnJlbW92ZV91bnVzZWRfd2VpZ2h0cygpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3VkYSUyMikubWFudWFsX3NlZWQoMCklMEF0ZXh0X3RvX2ltYWdlX3N0cmVuZ3RoJTIwJTNEJTIwMC43NSUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0R0ZXh0JTJDJTIwaW1hZ2UlM0RpbWFnZSUyQyUyMHRleHRfdG9faW1hZ2Vfc3RyZW5ndGglM0R0ZXh0X3RvX2ltYWdlX3N0cmVuZ3RoJTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTBBKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjIuJTJGY2FyX3ZhcmlhdGlvbi5wbmclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VersatileDiffusionDualGuidedPipeline
<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">import</span> requests
<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> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s download an initial image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>response = requests.get(url)
<span class="hljs-meta">&gt;&gt;&gt; </span>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>text = <span class="hljs-string">&quot;a red car in the sun&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = VersatileDiffusionDualGuidedPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.remove_unused_weights()
<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>generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_to_image_strength = <span class="hljs-number">0.75</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    prompt=text, image=image, text_to_image_strength=text_to_image_strength, generator=generator
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;./car_variation.png&quot;</span>)`}}),{c(){p=a("p"),y=c("Examples:"),h=r(),b(d.$$.fragment)},l(s){p=i(s,"P",{});var m=o(p);y=f(m,"Examples:"),m.forEach(n),h=l(s),w(d.$$.fragment,s)},m(s,m){_(s,p,m),e(p,y),_(s,h,m),M(d,s,m),v=!0},p:ot,i(s){v||(T(d.$$.fragment,s),v=!0)},o(s){D(d.$$.fragment,s),v=!1},d(s){s&&n(p),s&&n(h),V(d,s)}}}function pi(I){let p,y,h,d,v,s,m,F,R,P,$,Ce,ue,Vn,xn,At,Be,In,zt,Fe,lt,Pn,Qt,X,Q,pt,me,jn,dt,kn,Yt,Y,Un,Re,Zn,$n,Ot,O,ct,ge,ft,ut,Jn,Gn,mt,gt,En,Sn,J,he,ht,Xe,Wn,Nn,_t,Cn,Bn,_e,vt,qe,Fn,Rn,yt,Xn,qn,ve,bt,Le,Ln,An,wt,zn,Qn,ye,Mt,Ae,Yn,On,Tt,Hn,Ht,H,Kt,q,K,Dt,be,Kn,Vt,es,en,x,we,ts,xt,ns,ss,Me,as,ze,is,os,rs,G,Te,ls,It,ps,ds,ee,cs,E,De,fs,Pt,us,ms,te,gs,S,Ve,hs,jt,_s,vs,ne,tn,L,se,kt,xe,ys,Ut,bs,nn,j,Ie,ws,Zt,Ms,Ts,Pe,Ds,Qe,Vs,xs,Is,W,je,Ps,$t,js,ks,ae,sn,A,ie,Jt,ke,Us,Gt,Zs,an,k,Ue,$s,Et,Js,Gs,Ze,Es,Ye,Ss,Ws,Ns,N,$e,Cs,St,Bs,Fs,oe,on,z,re,Wt,Je,Rs,Nt,Xs,rn,U,Ge,qs,Ct,Ls,As,Ee,zs,Oe,Qs,Ys,Os,C,Se,Hs,Bt,Ks,ea,le,ln;return s=new at({}),me=new at({}),H=new ti({props:{$$slots:{default:[ni]},$$scope:{ctx:I}}}),be=new at({}),we=new B({props:{name:"class diffusers.VersatileDiffusionPipeline",anchor:"diffusers.VersatileDiffusionPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"image_feature_extractor",val:": CLIPImageProcessor"},{name:"text_encoder",val:": CLIPTextModel"},{name:"image_encoder",val:": CLIPVisionModel"},{name:"image_unet",val:": UNet2DConditionModel"},{name:"text_unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionPipeline.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"},{anchor:"diffusers.VersatileDiffusionPipeline.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 text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.VersatileDiffusionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.VersatileDiffusionPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.VersatileDiffusionPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.VersatileDiffusionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L20"}}),Te=new B({props:{name:"dual_guided",anchor:"diffusers.VersatileDiffusionPipeline.dual_guided",parameters:[{name:"prompt",val:": typing.Union[PIL.Image.Image, typing.List[PIL.Image.Image]]"},{name:"image",val:": typing.Union[str, typing.List[str]]"},{name:"text_to_image_strength",val:": float = 0.5"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",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"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.VersatileDiffusionPipeline.dual_guided.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#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.VersatileDiffusionPipeline.dual_guided.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.VersatileDiffusionPipeline.dual_guided.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.VersatileDiffusionPipeline.dual_guided.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.VersatileDiffusionPipeline.dual_guided.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.VersatileDiffusionPipeline.dual_guided.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.VersatileDiffusionPipeline.dual_guided.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.VersatileDiffusionPipeline.dual_guided.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/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.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.VersatileDiffusionPipeline.dual_guided.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L301",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/ddim#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> is returned, otherwise a <code>tuple</code> is
returned where 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>
`}}),ee=new it({props:{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.example",$$slots:{default:[si]},$$scope:{ctx:I}}}),De=new B({props:{name:"image_variation",anchor:"diffusers.VersatileDiffusionPipeline.image_variation",parameters:[{name:"image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image]"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",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"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code>, <code>List[PIL.Image.Image]</code> or <code>torch.Tensor</code>) &#x2014;
The image prompt or prompts to guide the image generation.`,name:"image"},{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.VersatileDiffusionPipeline.image_variation.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#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.VersatileDiffusionPipeline.image_variation.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.VersatileDiffusionPipeline.image_variation.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.VersatileDiffusionPipeline.image_variation.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.VersatileDiffusionPipeline.image_variation.generator",description:`<strong>generator</strong> (<code>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.VersatileDiffusionPipeline.image_variation.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.VersatileDiffusionPipeline.image_variation.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.VersatileDiffusionPipeline.image_variation.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/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.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.VersatileDiffusionPipeline.image_variation.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L81",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
\u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),te=new it({props:{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.example",$$slots:{default:[ai]},$$scope:{ctx:I}}}),Ve=new B({props:{name:"text_to_image",anchor:"diffusers.VersatileDiffusionPipeline.text_to_image",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",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"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.VersatileDiffusionPipeline.text_to_image.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#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.VersatileDiffusionPipeline.text_to_image.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.VersatileDiffusionPipeline.text_to_image.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.VersatileDiffusionPipeline.text_to_image.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.VersatileDiffusionPipeline.text_to_image.generator",description:`<strong>generator</strong> (<code>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.VersatileDiffusionPipeline.text_to_image.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.VersatileDiffusionPipeline.text_to_image.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.VersatileDiffusionPipeline.text_to_image.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/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.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.VersatileDiffusionPipeline.text_to_image.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L193",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
\u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),ne=new it({props:{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.example",$$slots:{default:[ii]},$$scope:{ctx:I}}}),xe=new at({}),Ie=new B({props:{name:"class diffusers.VersatileDiffusionTextToImagePipeline",anchor:"diffusers.VersatileDiffusionTextToImagePipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"image_unet",val:": UNet2DConditionModel"},{name:"text_unet",val:": UNetFlatConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/vq#diffusers.VQModel">VQModel</a>) &#x2014;
Vector-quantized (VQ) model to encode and decode images to and from latent representations.`,name:"vqvae"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.bert",description:`<strong>bert</strong> (<code>LDMBertModel</code>) &#x2014;
Text-encoder model based on <code>BERT</code>.`,name:"bert"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/bert#transformers.BertTokenizer" rel="nofollow">BertTokenizer</a>) &#x2014;
A <code>BertTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py#L34"}}),je=new B({props:{name:"__call__",anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",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:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.VersatileDiffusionTextToImagePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#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.VersatileDiffusionTextToImagePipeline.__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.VersatileDiffusionTextToImagePipeline.__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.VersatileDiffusionTextToImagePipeline.__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.VersatileDiffusionTextToImagePipeline.__call__.generator",description:`<strong>generator</strong> (<code>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.VersatileDiffusionTextToImagePipeline.__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.VersatileDiffusionTextToImagePipeline.__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.VersatileDiffusionTextToImagePipeline.__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/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__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.VersatileDiffusionTextToImagePipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py#L314",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),ae=new it({props:{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.example",$$slots:{default:[oi]},$$scope:{ctx:I}}}),ke=new at({}),Ue=new B({props:{name:"class diffusers.VersatileDiffusionImageVariationPipeline",anchor:"diffusers.VersatileDiffusionImageVariationPipeline",parameters:[{name:"image_feature_extractor",val:": CLIPImageProcessor"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"image_unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/vq#diffusers.VQModel">VQModel</a>) &#x2014;
Vector-quantized (VQ) model to encode and decode images to and from latent representations.`,name:"vqvae"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.bert",description:`<strong>bert</strong> (<code>LDMBertModel</code>) &#x2014;
Text-encoder model based on <code>BERT</code>.`,name:"bert"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/bert#transformers.BertTokenizer" rel="nofollow">BertTokenizer</a>) &#x2014;
A <code>BertTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py#L35"}}),$e=new B({props:{name:"__call__",anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__",parameters:[{name:"image",val:": typing.Union[PIL.Image.Image, typing.List[PIL.Image.Image], torch.Tensor]"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",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:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code>, <code>List[PIL.Image.Image]</code> or <code>torch.Tensor</code>) &#x2014;
The image prompt or prompts to guide the image generation.`,name:"image"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.VersatileDiffusionImageVariationPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#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.VersatileDiffusionImageVariationPipeline.__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.VersatileDiffusionImageVariationPipeline.__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.VersatileDiffusionImageVariationPipeline.__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.VersatileDiffusionImageVariationPipeline.__call__.generator",description:`<strong>generator</strong> (<code>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.VersatileDiffusionImageVariationPipeline.__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.VersatileDiffusionImageVariationPipeline.__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.VersatileDiffusionImageVariationPipeline.__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/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__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.VersatileDiffusionImageVariationPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py#L232",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),oe=new it({props:{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.example",$$slots:{default:[ri]},$$scope:{ctx:I}}}),Je=new at({}),Ge=new B({props:{name:"class diffusers.VersatileDiffusionDualGuidedPipeline",anchor:"diffusers.VersatileDiffusionDualGuidedPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"image_feature_extractor",val:": CLIPImageProcessor"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"image_unet",val:": UNet2DConditionModel"},{name:"text_unet",val:": UNetFlatConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/vq#diffusers.VQModel">VQModel</a>) &#x2014;
Vector-quantized (VQ) model to encode and decode images to and from latent representations.`,name:"vqvae"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.bert",description:`<strong>bert</strong> (<code>LDMBertModel</code>) &#x2014;
Text-encoder model based on <code>BERT</code>.`,name:"bert"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/bert#transformers.BertTokenizer" rel="nofollow">BertTokenizer</a>) &#x2014;
A <code>BertTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py#L41"}}),Se=new B({props:{name:"__call__",anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[PIL.Image.Image, typing.List[PIL.Image.Image]]"},{name:"image",val:": typing.Union[str, typing.List[str]]"},{name:"text_to_image_strength",val:": float = 0.5"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",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:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.image_unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.VersatileDiffusionDualGuidedPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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.VersatileDiffusionDualGuidedPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py#L379",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/ddim#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> is returned, otherwise a <code>tuple</code> is
returned where 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>
`}}),le=new it({props:{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.example",$$slots:{default:[li]},$$scope:{ctx:I}}}),{c(){p=a("meta"),y=r(),h=a("h1"),d=a("a"),v=a("span"),b(s.$$.fragment),m=r(),F=a("span"),R=c("Versatile Diffusion"),P=r(),$=a("p"),Ce=c("Versatile Diffusion was proposed in "),ue=a("a"),Vn=c("Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),xn=c(" by Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, Humphrey Shi ."),At=r(),Be=a("p"),In=c("The abstract from the paper is:"),zt=r(),Fe=a("p"),lt=a("em"),Pn=c("The recent advances in diffusion models have set an impressive milestone in many generation tasks. Trending works such as DALL-E2, Imagen, and Stable Diffusion have attracted great interest in academia and industry. Despite the rapid landscape changes, recent new approaches focus on extensions and performance rather than capacity, thus requiring separate models for separate tasks. In this work, we expand the existing single-flow diffusion pipeline into a multi-flow network, dubbed Versatile Diffusion (VD), that handles text-to-image, image-to-text, image-variation, and text-variation in one unified model. Moreover, we generalize VD to a unified multi-flow multimodal diffusion framework with grouped layers, swappable streams, and other propositions that can process modalities beyond images and text. Through our experiments, we demonstrate that VD and its underlying framework have the following merits: a) VD handles all subtasks with competitive quality; b) VD initiates novel extensions and applications such as disentanglement of style and semantic, image-text dual-guided generation, etc.; c) Through these experiments and applications, VD provides more semantic insights of the generated outputs."),Qt=r(),X=a("h2"),Q=a("a"),pt=a("span"),b(me.$$.fragment),jn=r(),dt=a("span"),kn=c("Tips"),Yt=r(),Y=a("p"),Un=c("You can load the more memory intensive \u201Call-in-one\u201D "),Re=a("a"),Zn=c("VersatileDiffusionPipeline"),$n=c(" that supports all the tasks or use the individual pipelines which are more memory efficient."),Ot=r(),O=a("table"),ct=a("thead"),ge=a("tr"),ft=a("th"),ut=a("strong"),Jn=c("Pipeline"),Gn=r(),mt=a("th"),gt=a("strong"),En=c("Supported tasks"),Sn=r(),J=a("tbody"),he=a("tr"),ht=a("td"),Xe=a("a"),Wn=c("VersatileDiffusionPipeline"),Nn=r(),_t=a("td"),Cn=c("all of the below"),Bn=r(),_e=a("tr"),vt=a("td"),qe=a("a"),Fn=c("VersatileDiffusionTextToImagePipeline"),Rn=r(),yt=a("td"),Xn=c("text-to-image"),qn=r(),ve=a("tr"),bt=a("td"),Le=a("a"),Ln=c("VersatileDiffusionImageVariationPipeline"),An=r(),wt=a("td"),zn=c("image variation"),Qn=r(),ye=a("tr"),Mt=a("td"),Ae=a("a"),Yn=c("VersatileDiffusionDualGuidedPipeline"),On=r(),Tt=a("td"),Hn=c("image-text dual guided generation"),Ht=r(),b(H.$$.fragment),Kt=r(),q=a("h2"),K=a("a"),Dt=a("span"),b(be.$$.fragment),Kn=r(),Vt=a("span"),es=c("VersatileDiffusionPipeline"),en=r(),x=a("div"),b(we.$$.fragment),ts=r(),xt=a("p"),ns=c("Pipeline for text-to-image generation using Stable Diffusion."),ss=r(),Me=a("p"),as=c("This model inherits from "),ze=a("a"),is=c("DiffusionPipeline"),os=c(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),rs=r(),G=a("div"),b(Te.$$.fragment),ls=r(),It=a("p"),ps=c("The call function to the pipeline for generation."),ds=r(),b(ee.$$.fragment),cs=r(),E=a("div"),b(De.$$.fragment),fs=r(),Pt=a("p"),us=c("The call function to the pipeline for generation."),ms=r(),b(te.$$.fragment),gs=r(),S=a("div"),b(Ve.$$.fragment),hs=r(),jt=a("p"),_s=c("The call function to the pipeline for generation."),vs=r(),b(ne.$$.fragment),tn=r(),L=a("h2"),se=a("a"),kt=a("span"),b(xe.$$.fragment),ys=r(),Ut=a("span"),bs=c("VersatileDiffusionTextToImagePipeline"),nn=r(),j=a("div"),b(Ie.$$.fragment),ws=r(),Zt=a("p"),Ms=c("Pipeline for text-to-image generation using Versatile Diffusion."),Ts=r(),Pe=a("p"),Ds=c("This model inherits from "),Qe=a("a"),Vs=c("DiffusionPipeline"),xs=c(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Is=r(),W=a("div"),b(je.$$.fragment),Ps=r(),$t=a("p"),js=c("The call function to the pipeline for generation."),ks=r(),b(ae.$$.fragment),sn=r(),A=a("h2"),ie=a("a"),Jt=a("span"),b(ke.$$.fragment),Us=r(),Gt=a("span"),Zs=c("VersatileDiffusionImageVariationPipeline"),an=r(),k=a("div"),b(Ue.$$.fragment),$s=r(),Et=a("p"),Js=c("Pipeline for image variation using Versatile Diffusion."),Gs=r(),Ze=a("p"),Es=c("This model inherits from "),Ye=a("a"),Ss=c("DiffusionPipeline"),Ws=c(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Ns=r(),N=a("div"),b($e.$$.fragment),Cs=r(),St=a("p"),Bs=c("The call function to the pipeline for generation."),Fs=r(),b(oe.$$.fragment),on=r(),z=a("h2"),re=a("a"),Wt=a("span"),b(Je.$$.fragment),Rs=r(),Nt=a("span"),Xs=c("VersatileDiffusionDualGuidedPipeline"),rn=r(),U=a("div"),b(Ge.$$.fragment),qs=r(),Ct=a("p"),Ls=c("Pipeline for image-text dual-guided generation using Versatile Diffusion."),As=r(),Ee=a("p"),zs=c("This model inherits from "),Oe=a("a"),Qs=c("DiffusionPipeline"),Ys=c(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Os=r(),C=a("div"),b(Se.$$.fragment),Hs=r(),Bt=a("p"),Ks=c("The call function to the pipeline for generation."),ea=r(),b(le.$$.fragment),this.h()},l(t){const u=Ka('[data-svelte="svelte-1phssyn"]',document.head);p=i(u,"META",{name:!0,content:!0}),u.forEach(n),y=l(t),h=i(t,"H1",{class:!0});var We=o(h);d=i(We,"A",{id:!0,class:!0,href:!0});var Ft=o(d);v=i(Ft,"SPAN",{});var Rt=o(v);w(s.$$.fragment,Rt),Rt.forEach(n),Ft.forEach(n),m=l(We),F=i(We,"SPAN",{});var Xt=o(F);R=f(Xt,"Versatile Diffusion"),Xt.forEach(n),We.forEach(n),P=l(t),$=i(t,"P",{});var Ne=o($);Ce=f(Ne,"Versatile Diffusion was proposed in "),ue=i(Ne,"A",{href:!0,rel:!0});var qt=o(ue);Vn=f(qt,"Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),qt.forEach(n),xn=f(Ne," by Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, Humphrey Shi ."),Ne.forEach(n),At=l(t),Be=i(t,"P",{});var Lt=o(Be);In=f(Lt,"The abstract from the paper is:"),Lt.forEach(n),zt=l(t),Fe=i(t,"P",{});var ta=o(Fe);lt=i(ta,"EM",{});var na=o(lt);Pn=f(na,"The recent advances in diffusion models have set an impressive milestone in many generation tasks. Trending works such as DALL-E2, Imagen, and Stable Diffusion have attracted great interest in academia and industry. Despite the rapid landscape changes, recent new approaches focus on extensions and performance rather than capacity, thus requiring separate models for separate tasks. In this work, we expand the existing single-flow diffusion pipeline into a multi-flow network, dubbed Versatile Diffusion (VD), that handles text-to-image, image-to-text, image-variation, and text-variation in one unified model. Moreover, we generalize VD to a unified multi-flow multimodal diffusion framework with grouped layers, swappable streams, and other propositions that can process modalities beyond images and text. Through our experiments, we demonstrate that VD and its underlying framework have the following merits: a) VD handles all subtasks with competitive quality; b) VD initiates novel extensions and applications such as disentanglement of style and semantic, image-text dual-guided generation, etc.; c) Through these experiments and applications, VD provides more semantic insights of the generated outputs."),na.forEach(n),ta.forEach(n),Qt=l(t),X=i(t,"H2",{class:!0});var pn=o(X);Q=i(pn,"A",{id:!0,class:!0,href:!0});var sa=o(Q);pt=i(sa,"SPAN",{});var aa=o(pt);w(me.$$.fragment,aa),aa.forEach(n),sa.forEach(n),jn=l(pn),dt=i(pn,"SPAN",{});var ia=o(dt);kn=f(ia,"Tips"),ia.forEach(n),pn.forEach(n),Yt=l(t),Y=i(t,"P",{});var dn=o(Y);Un=f(dn,"You can load the more memory intensive \u201Call-in-one\u201D "),Re=i(dn,"A",{href:!0});var oa=o(Re);Zn=f(oa,"VersatileDiffusionPipeline"),oa.forEach(n),$n=f(dn," that supports all the tasks or use the individual pipelines which are more memory efficient."),dn.forEach(n),Ot=l(t),O=i(t,"TABLE",{});var cn=o(O);ct=i(cn,"THEAD",{});var ra=o(ct);ge=i(ra,"TR",{});var fn=o(ge);ft=i(fn,"TH",{});var la=o(ft);ut=i(la,"STRONG",{});var pa=o(ut);Jn=f(pa,"Pipeline"),pa.forEach(n),la.forEach(n),Gn=l(fn),mt=i(fn,"TH",{});var da=o(mt);gt=i(da,"STRONG",{});var ca=o(gt);En=f(ca,"Supported tasks"),ca.forEach(n),da.forEach(n),fn.forEach(n),ra.forEach(n),Sn=l(cn),J=i(cn,"TBODY",{});var pe=o(J);he=i(pe,"TR",{});var un=o(he);ht=i(un,"TD",{});var fa=o(ht);Xe=i(fa,"A",{href:!0});var ua=o(Xe);Wn=f(ua,"VersatileDiffusionPipeline"),ua.forEach(n),fa.forEach(n),Nn=l(un),_t=i(un,"TD",{});var ma=o(_t);Cn=f(ma,"all of the below"),ma.forEach(n),un.forEach(n),Bn=l(pe),_e=i(pe,"TR",{});var mn=o(_e);vt=i(mn,"TD",{});var ga=o(vt);qe=i(ga,"A",{href:!0});var ha=o(qe);Fn=f(ha,"VersatileDiffusionTextToImagePipeline"),ha.forEach(n),ga.forEach(n),Rn=l(mn),yt=i(mn,"TD",{});var _a=o(yt);Xn=f(_a,"text-to-image"),_a.forEach(n),mn.forEach(n),qn=l(pe),ve=i(pe,"TR",{});var gn=o(ve);bt=i(gn,"TD",{});var va=o(bt);Le=i(va,"A",{href:!0});var ya=o(Le);Ln=f(ya,"VersatileDiffusionImageVariationPipeline"),ya.forEach(n),va.forEach(n),An=l(gn),wt=i(gn,"TD",{});var ba=o(wt);zn=f(ba,"image variation"),ba.forEach(n),gn.forEach(n),Qn=l(pe),ye=i(pe,"TR",{});var hn=o(ye);Mt=i(hn,"TD",{});var wa=o(Mt);Ae=i(wa,"A",{href:!0});var Ma=o(Ae);Yn=f(Ma,"VersatileDiffusionDualGuidedPipeline"),Ma.forEach(n),wa.forEach(n),On=l(hn),Tt=i(hn,"TD",{});var Ta=o(Tt);Hn=f(Ta,"image-text dual guided generation"),Ta.forEach(n),hn.forEach(n),pe.forEach(n),cn.forEach(n),Ht=l(t),w(H.$$.fragment,t),Kt=l(t),q=i(t,"H2",{class:!0});var _n=o(q);K=i(_n,"A",{id:!0,class:!0,href:!0});var Da=o(K);Dt=i(Da,"SPAN",{});var Va=o(Dt);w(be.$$.fragment,Va),Va.forEach(n),Da.forEach(n),Kn=l(_n),Vt=i(_n,"SPAN",{});var xa=o(Vt);es=f(xa,"VersatileDiffusionPipeline"),xa.forEach(n),_n.forEach(n),en=l(t),x=i(t,"DIV",{class:!0});var Z=o(x);w(we.$$.fragment,Z),ts=l(Z),xt=i(Z,"P",{});var Ia=o(xt);ns=f(Ia,"Pipeline for text-to-image generation using Stable Diffusion."),Ia.forEach(n),ss=l(Z),Me=i(Z,"P",{});var vn=o(Me);as=f(vn,"This model inherits from "),ze=i(vn,"A",{href:!0});var Pa=o(ze);is=f(Pa,"DiffusionPipeline"),Pa.forEach(n),os=f(vn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),vn.forEach(n),rs=l(Z),G=i(Z,"DIV",{class:!0});var He=o(G);w(Te.$$.fragment,He),ls=l(He),It=i(He,"P",{});var ja=o(It);ps=f(ja,"The call function to the pipeline for generation."),ja.forEach(n),ds=l(He),w(ee.$$.fragment,He),He.forEach(n),cs=l(Z),E=i(Z,"DIV",{class:!0});var Ke=o(E);w(De.$$.fragment,Ke),fs=l(Ke),Pt=i(Ke,"P",{});var ka=o(Pt);us=f(ka,"The call function to the pipeline for generation."),ka.forEach(n),ms=l(Ke),w(te.$$.fragment,Ke),Ke.forEach(n),gs=l(Z),S=i(Z,"DIV",{class:!0});var et=o(S);w(Ve.$$.fragment,et),hs=l(et),jt=i(et,"P",{});var Ua=o(jt);_s=f(Ua,"The call function to the pipeline for generation."),Ua.forEach(n),vs=l(et),w(ne.$$.fragment,et),et.forEach(n),Z.forEach(n),tn=l(t),L=i(t,"H2",{class:!0});var yn=o(L);se=i(yn,"A",{id:!0,class:!0,href:!0});var Za=o(se);kt=i(Za,"SPAN",{});var $a=o(kt);w(xe.$$.fragment,$a),$a.forEach(n),Za.forEach(n),ys=l(yn),Ut=i(yn,"SPAN",{});var Ja=o(Ut);bs=f(Ja,"VersatileDiffusionTextToImagePipeline"),Ja.forEach(n),yn.forEach(n),nn=l(t),j=i(t,"DIV",{class:!0});var de=o(j);w(Ie.$$.fragment,de),ws=l(de),Zt=i(de,"P",{});var Ga=o(Zt);Ms=f(Ga,"Pipeline for text-to-image generation using Versatile Diffusion."),Ga.forEach(n),Ts=l(de),Pe=i(de,"P",{});var bn=o(Pe);Ds=f(bn,"This model inherits from "),Qe=i(bn,"A",{href:!0});var Ea=o(Qe);Vs=f(Ea,"DiffusionPipeline"),Ea.forEach(n),xs=f(bn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),bn.forEach(n),Is=l(de),W=i(de,"DIV",{class:!0});var tt=o(W);w(je.$$.fragment,tt),Ps=l(tt),$t=i(tt,"P",{});var Sa=o($t);js=f(Sa,"The call function to the pipeline for generation."),Sa.forEach(n),ks=l(tt),w(ae.$$.fragment,tt),tt.forEach(n),de.forEach(n),sn=l(t),A=i(t,"H2",{class:!0});var wn=o(A);ie=i(wn,"A",{id:!0,class:!0,href:!0});var Wa=o(ie);Jt=i(Wa,"SPAN",{});var Na=o(Jt);w(ke.$$.fragment,Na),Na.forEach(n),Wa.forEach(n),Us=l(wn),Gt=i(wn,"SPAN",{});var Ca=o(Gt);Zs=f(Ca,"VersatileDiffusionImageVariationPipeline"),Ca.forEach(n),wn.forEach(n),an=l(t),k=i(t,"DIV",{class:!0});var ce=o(k);w(Ue.$$.fragment,ce),$s=l(ce),Et=i(ce,"P",{});var Ba=o(Et);Js=f(Ba,"Pipeline for image variation using Versatile Diffusion."),Ba.forEach(n),Gs=l(ce),Ze=i(ce,"P",{});var Mn=o(Ze);Es=f(Mn,"This model inherits from "),Ye=i(Mn,"A",{href:!0});var Fa=o(Ye);Ss=f(Fa,"DiffusionPipeline"),Fa.forEach(n),Ws=f(Mn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Mn.forEach(n),Ns=l(ce),N=i(ce,"DIV",{class:!0});var nt=o(N);w($e.$$.fragment,nt),Cs=l(nt),St=i(nt,"P",{});var Ra=o(St);Bs=f(Ra,"The call function to the pipeline for generation."),Ra.forEach(n),Fs=l(nt),w(oe.$$.fragment,nt),nt.forEach(n),ce.forEach(n),on=l(t),z=i(t,"H2",{class:!0});var Tn=o(z);re=i(Tn,"A",{id:!0,class:!0,href:!0});var Xa=o(re);Wt=i(Xa,"SPAN",{});var qa=o(Wt);w(Je.$$.fragment,qa),qa.forEach(n),Xa.forEach(n),Rs=l(Tn),Nt=i(Tn,"SPAN",{});var La=o(Nt);Xs=f(La,"VersatileDiffusionDualGuidedPipeline"),La.forEach(n),Tn.forEach(n),rn=l(t),U=i(t,"DIV",{class:!0});var fe=o(U);w(Ge.$$.fragment,fe),qs=l(fe),Ct=i(fe,"P",{});var Aa=o(Ct);Ls=f(Aa,"Pipeline for image-text dual-guided generation using Versatile Diffusion."),Aa.forEach(n),As=l(fe),Ee=i(fe,"P",{});var Dn=o(Ee);zs=f(Dn,"This model inherits from "),Oe=i(Dn,"A",{href:!0});var za=o(Oe);Qs=f(za,"DiffusionPipeline"),za.forEach(n),Ys=f(Dn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Dn.forEach(n),Os=l(fe),C=i(fe,"DIV",{class:!0});var st=o(C);w(Se.$$.fragment,st),Hs=l(st),Bt=i(st,"P",{});var Qa=o(Bt);Ks=f(Qa,"The call function to the pipeline for generation."),Qa.forEach(n),ea=l(st),w(le.$$.fragment,st),st.forEach(n),fe.forEach(n),this.h()},h(){g(p,"name","hf:doc:metadata"),g(p,"content",JSON.stringify(di)),g(d,"id","versatile-diffusion"),g(d,"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"),g(d,"href","#versatile-diffusion"),g(h,"class","relative group"),g(ue,"href","https://huggingface.co/papers/2211.08332"),g(ue,"rel","nofollow"),g(Q,"id","tips"),g(Q,"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"),g(Q,"href","#tips"),g(X,"class","relative group"),g(Re,"href","/docs/diffusers/v0.20.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline"),g(Xe,"href","/docs/diffusers/v0.20.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline"),g(qe,"href","/docs/diffusers/v0.20.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionTextToImagePipeline"),g(Le,"href","/docs/diffusers/v0.20.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionImageVariationPipeline"),g(Ae,"href","/docs/diffusers/v0.20.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionDualGuidedPipeline"),g(K,"id","diffusers.VersatileDiffusionPipeline"),g(K,"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"),g(K,"href","#diffusers.VersatileDiffusionPipeline"),g(q,"class","relative group"),g(ze,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),g(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(se,"id","diffusers.VersatileDiffusionTextToImagePipeline"),g(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"),g(se,"href","#diffusers.VersatileDiffusionTextToImagePipeline"),g(L,"class","relative group"),g(Qe,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),g(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ie,"id","diffusers.VersatileDiffusionImageVariationPipeline"),g(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"),g(ie,"href","#diffusers.VersatileDiffusionImageVariationPipeline"),g(A,"class","relative group"),g(Ye,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),g(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(re,"id","diffusers.VersatileDiffusionDualGuidedPipeline"),g(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"),g(re,"href","#diffusers.VersatileDiffusionDualGuidedPipeline"),g(z,"class","relative group"),g(Oe,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),g(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(U,"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,u){e(document.head,p),_(t,y,u),_(t,h,u),e(h,d),e(d,v),M(s,v,null),e(h,m),e(h,F),e(F,R),_(t,P,u),_(t,$,u),e($,Ce),e($,ue),e(ue,Vn),e($,xn),_(t,At,u),_(t,Be,u),e(Be,In),_(t,zt,u),_(t,Fe,u),e(Fe,lt),e(lt,Pn),_(t,Qt,u),_(t,X,u),e(X,Q),e(Q,pt),M(me,pt,null),e(X,jn),e(X,dt),e(dt,kn),_(t,Yt,u),_(t,Y,u),e(Y,Un),e(Y,Re),e(Re,Zn),e(Y,$n),_(t,Ot,u),_(t,O,u),e(O,ct),e(ct,ge),e(ge,ft),e(ft,ut),e(ut,Jn),e(ge,Gn),e(ge,mt),e(mt,gt),e(gt,En),e(O,Sn),e(O,J),e(J,he),e(he,ht),e(ht,Xe),e(Xe,Wn),e(he,Nn),e(he,_t),e(_t,Cn),e(J,Bn),e(J,_e),e(_e,vt),e(vt,qe),e(qe,Fn),e(_e,Rn),e(_e,yt),e(yt,Xn),e(J,qn),e(J,ve),e(ve,bt),e(bt,Le),e(Le,Ln),e(ve,An),e(ve,wt),e(wt,zn),e(J,Qn),e(J,ye),e(ye,Mt),e(Mt,Ae),e(Ae,Yn),e(ye,On),e(ye,Tt),e(Tt,Hn),_(t,Ht,u),M(H,t,u),_(t,Kt,u),_(t,q,u),e(q,K),e(K,Dt),M(be,Dt,null),e(q,Kn),e(q,Vt),e(Vt,es),_(t,en,u),_(t,x,u),M(we,x,null),e(x,ts),e(x,xt),e(xt,ns),e(x,ss),e(x,Me),e(Me,as),e(Me,ze),e(ze,is),e(Me,os),e(x,rs),e(x,G),M(Te,G,null),e(G,ls),e(G,It),e(It,ps),e(G,ds),M(ee,G,null),e(x,cs),e(x,E),M(De,E,null),e(E,fs),e(E,Pt),e(Pt,us),e(E,ms),M(te,E,null),e(x,gs),e(x,S),M(Ve,S,null),e(S,hs),e(S,jt),e(jt,_s),e(S,vs),M(ne,S,null),_(t,tn,u),_(t,L,u),e(L,se),e(se,kt),M(xe,kt,null),e(L,ys),e(L,Ut),e(Ut,bs),_(t,nn,u),_(t,j,u),M(Ie,j,null),e(j,ws),e(j,Zt),e(Zt,Ms),e(j,Ts),e(j,Pe),e(Pe,Ds),e(Pe,Qe),e(Qe,Vs),e(Pe,xs),e(j,Is),e(j,W),M(je,W,null),e(W,Ps),e(W,$t),e($t,js),e(W,ks),M(ae,W,null),_(t,sn,u),_(t,A,u),e(A,ie),e(ie,Jt),M(ke,Jt,null),e(A,Us),e(A,Gt),e(Gt,Zs),_(t,an,u),_(t,k,u),M(Ue,k,null),e(k,$s),e(k,Et),e(Et,Js),e(k,Gs),e(k,Ze),e(Ze,Es),e(Ze,Ye),e(Ye,Ss),e(Ze,Ws),e(k,Ns),e(k,N),M($e,N,null),e(N,Cs),e(N,St),e(St,Bs),e(N,Fs),M(oe,N,null),_(t,on,u),_(t,z,u),e(z,re),e(re,Wt),M(Je,Wt,null),e(z,Rs),e(z,Nt),e(Nt,Xs),_(t,rn,u),_(t,U,u),M(Ge,U,null),e(U,qs),e(U,Ct),e(Ct,Ls),e(U,As),e(U,Ee),e(Ee,zs),e(Ee,Oe),e(Oe,Qs),e(Ee,Ys),e(U,Os),e(U,C),M(Se,C,null),e(C,Hs),e(C,Bt),e(Bt,Ks),e(C,ea),M(le,C,null),ln=!0},p(t,[u]){const We={};u&2&&(We.$$scope={dirty:u,ctx:t}),H.$set(We);const Ft={};u&2&&(Ft.$$scope={dirty:u,ctx:t}),ee.$set(Ft);const Rt={};u&2&&(Rt.$$scope={dirty:u,ctx:t}),te.$set(Rt);const Xt={};u&2&&(Xt.$$scope={dirty:u,ctx:t}),ne.$set(Xt);const Ne={};u&2&&(Ne.$$scope={dirty:u,ctx:t}),ae.$set(Ne);const qt={};u&2&&(qt.$$scope={dirty:u,ctx:t}),oe.$set(qt);const Lt={};u&2&&(Lt.$$scope={dirty:u,ctx:t}),le.$set(Lt)},i(t){ln||(T(s.$$.fragment,t),T(me.$$.fragment,t),T(H.$$.fragment,t),T(be.$$.fragment,t),T(we.$$.fragment,t),T(Te.$$.fragment,t),T(ee.$$.fragment,t),T(De.$$.fragment,t),T(te.$$.fragment,t),T(Ve.$$.fragment,t),T(ne.$$.fragment,t),T(xe.$$.fragment,t),T(Ie.$$.fragment,t),T(je.$$.fragment,t),T(ae.$$.fragment,t),T(ke.$$.fragment,t),T(Ue.$$.fragment,t),T($e.$$.fragment,t),T(oe.$$.fragment,t),T(Je.$$.fragment,t),T(Ge.$$.fragment,t),T(Se.$$.fragment,t),T(le.$$.fragment,t),ln=!0)},o(t){D(s.$$.fragment,t),D(me.$$.fragment,t),D(H.$$.fragment,t),D(be.$$.fragment,t),D(we.$$.fragment,t),D(Te.$$.fragment,t),D(ee.$$.fragment,t),D(De.$$.fragment,t),D(te.$$.fragment,t),D(Ve.$$.fragment,t),D(ne.$$.fragment,t),D(xe.$$.fragment,t),D(Ie.$$.fragment,t),D(je.$$.fragment,t),D(ae.$$.fragment,t),D(ke.$$.fragment,t),D(Ue.$$.fragment,t),D($e.$$.fragment,t),D(oe.$$.fragment,t),D(Je.$$.fragment,t),D(Ge.$$.fragment,t),D(Se.$$.fragment,t),D(le.$$.fragment,t),ln=!1},d(t){n(p),t&&n(y),t&&n(h),V(s),t&&n(P),t&&n($),t&&n(At),t&&n(Be),t&&n(zt),t&&n(Fe),t&&n(Qt),t&&n(X),V(me),t&&n(Yt),t&&n(Y),t&&n(Ot),t&&n(O),t&&n(Ht),V(H,t),t&&n(Kt),t&&n(q),V(be),t&&n(en),t&&n(x),V(we),V(Te),V(ee),V(De),V(te),V(Ve),V(ne),t&&n(tn),t&&n(L),V(xe),t&&n(nn),t&&n(j),V(Ie),V(je),V(ae),t&&n(sn),t&&n(A),V(ke),t&&n(an),t&&n(k),V(Ue),V($e),V(oe),t&&n(on),t&&n(z),V(Je),t&&n(rn),t&&n(U),V(Ge),V(Se),V(le)}}}const di={local:"versatile-diffusion",sections:[{local:"tips",title:"Tips"},{local:"diffusers.VersatileDiffusionPipeline",title:"VersatileDiffusionPipeline"},{local:"diffusers.VersatileDiffusionTextToImagePipeline",title:"VersatileDiffusionTextToImagePipeline"},{local:"diffusers.VersatileDiffusionImageVariationPipeline",title:"VersatileDiffusionImageVariationPipeline"},{local:"diffusers.VersatileDiffusionDualGuidedPipeline",title:"VersatileDiffusionDualGuidedPipeline"}],title:"Versatile Diffusion"};function ci(I){return ei(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vi extends Ya{constructor(p){super();Oa(this,p,ci,pi,Ha,{})}}export{vi as default,di as metadata};
