import{S as Pr,i as $r,s as Vr,e as s,k as d,w as v,t as r,M as Ir,c as n,d as i,m as p,a,x as b,h as l,b as c,G as e,g,y as D,q as w,o as y,B as x,v as kr,L as At}from"../../../chunks/vendor-hf-doc-builder.js";import{D as T}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as lt}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as xe}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as zt}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Tr(S){let m,$,_,u,P;return u=new lt({props:{code:`from diffusers import VersatileDiffusionPipeline
import torch
import requests
from io import BytesIO
from PIL import Image

# let's download an initial image
url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"

response = requests.get(url)
image = Image.open(BytesIO(response.content)).convert("RGB")
text = "a red car in the sun"

pipe = VersatileDiffusionPipeline.from_pretrained(
    "shi-labs/versatile-diffusion", torch_dtype=torch.float16
)
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
text_to_image_strength = 0.75

image = pipe.dual_guided(
    prompt=text, image=image, text_to_image_strength=text_to_image_strength, generator=generator
).images[0]
image.save("./car_variation.png")`,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(){m=s("p"),$=r("Examples:"),_=d(),v(u.$$.fragment)},l(o){m=n(o,"P",{});var h=a(m);$=l(h,"Examples:"),h.forEach(i),_=p(o),b(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),D(u,o,h),P=!0},p:At,i(o){P||(w(u.$$.fragment,o),P=!0)},o(o){y(u.$$.fragment,o),P=!1},d(o){o&&i(m),o&&i(_),x(u,o)}}}function jr(S){let m,$,_,u,P;return u=new lt({props:{code:`from diffusers import VersatileDiffusionPipeline
import torch
import requests
from io import BytesIO
from PIL import Image

# let's download an initial image
url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"

response = requests.get(url)
image = Image.open(BytesIO(response.content)).convert("RGB")

pipe = VersatileDiffusionPipeline.from_pretrained(
    "shi-labs/versatile-diffusion", torch_dtype=torch.float16
)
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
image = pipe.image_variation(image, generator=generator).images[0]
image.save("./car_variation.png")`,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(){m=s("p"),$=r("Examples:"),_=d(),v(u.$$.fragment)},l(o){m=n(o,"P",{});var h=a(m);$=l(h,"Examples:"),h.forEach(i),_=p(o),b(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),D(u,o,h),P=!0},p:At,i(o){P||(w(u.$$.fragment,o),P=!0)},o(o){y(u.$$.fragment,o),P=!1},d(o){o&&i(m),o&&i(_),x(u,o)}}}function Er(S){let m,$,_,u,P;return u=new lt({props:{code:`from diffusers import VersatileDiffusionPipeline
import torch

pipe = VersatileDiffusionPipeline.from_pretrained(
    "shi-labs/versatile-diffusion", torch_dtype=torch.float16
)
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
image = pipe.text_to_image("an astronaut riding on a horse on mars", generator=generator).images[0]
image.save("./astronaut.png")`,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(){m=s("p"),$=r("Examples:"),_=d(),v(u.$$.fragment)},l(o){m=n(o,"P",{});var h=a(m);$=l(h,"Examples:"),h.forEach(i),_=p(o),b(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),D(u,o,h),P=!0},p:At,i(o){P||(w(u.$$.fragment,o),P=!0)},o(o){y(u.$$.fragment,o),P=!1},d(o){o&&i(m),o&&i(_),x(u,o)}}}function qr(S){let m,$,_,u,P;return u=new lt({props:{code:`from diffusers import VersatileDiffusionTextToImagePipeline
import torch

pipe = VersatileDiffusionTextToImagePipeline.from_pretrained(
    "shi-labs/versatile-diffusion", torch_dtype=torch.float16
)
pipe.remove_unused_weights()
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
image = pipe("an astronaut riding on a horse on mars", generator=generator).images[0]
image.save("./astronaut.png")`,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(){m=s("p"),$=r("Examples:"),_=d(),v(u.$$.fragment)},l(o){m=n(o,"P",{});var h=a(m);$=l(h,"Examples:"),h.forEach(i),_=p(o),b(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),D(u,o,h),P=!0},p:At,i(o){P||(w(u.$$.fragment,o),P=!0)},o(o){y(u.$$.fragment,o),P=!1},d(o){o&&i(m),o&&i(_),x(u,o)}}}function Sr(S){let m,$,_,u,P;return u=new lt({props:{code:`from diffusers import VersatileDiffusionImageVariationPipeline
import torch
import requests
from io import BytesIO
from PIL import Image

# let's download an initial image
url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"

response = requests.get(url)
image = Image.open(BytesIO(response.content)).convert("RGB")

pipe = VersatileDiffusionImageVariationPipeline.from_pretrained(
    "shi-labs/versatile-diffusion", torch_dtype=torch.float16
)
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
image = pipe(image, generator=generator).images[0]
image.save("./car_variation.png")`,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(){m=s("p"),$=r("Examples:"),_=d(),v(u.$$.fragment)},l(o){m=n(o,"P",{});var h=a(m);$=l(h,"Examples:"),h.forEach(i),_=p(o),b(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),D(u,o,h),P=!0},p:At,i(o){P||(w(u.$$.fragment,o),P=!0)},o(o){y(u.$$.fragment,o),P=!1},d(o){o&&i(m),o&&i(_),x(u,o)}}}function Lr(S){let m,$,_,u,P;return u=new lt({props:{code:`from diffusers import VersatileDiffusionDualGuidedPipeline
import torch
import requests
from io import BytesIO
from PIL import Image

# let's download an initial image
url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"

response = requests.get(url)
image = Image.open(BytesIO(response.content)).convert("RGB")
text = "a red car in the sun"

pipe = VersatileDiffusionDualGuidedPipeline.from_pretrained(
    "shi-labs/versatile-diffusion", torch_dtype=torch.float16
)
pipe.remove_unused_weights()
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
text_to_image_strength = 0.75

image = pipe(
    prompt=text, image=image, text_to_image_strength=text_to_image_strength, generator=generator
).images[0]
image.save("./car_variation.png")`,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(){m=s("p"),$=r("Examples:"),_=d(),v(u.$$.fragment)},l(o){m=n(o,"P",{});var h=a(m);$=l(h,"Examples:"),h.forEach(i),_=p(o),b(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),D(u,o,h),P=!0},p:At,i(o){P||(w(u.$$.fragment,o),P=!0)},o(o){y(u.$$.fragment,o),P=!1},d(o){o&&i(m),o&&i(_),x(u,o)}}}function Mr(S){let m,$,_,u,P,o,h,Ut,Vs,Li,se,Is,Pe,ks,Ts,Mi,dt,js,Gi,pt,Ft,Es,Ci,K,ne,Bt,$e,qs,Wt,Ss,Ni,ct,Ve,Ls,ft,Ms,Gs,Oi,X,ae,Ht,Ie,Cs,Rt,Ns,zi,L,Os,ut,zs,As,gt,Us,Fs,mt,Bs,Ws,ht,Hs,Ai,_t,Qt,Rs,Ui,vt,Qs,Fi,G,ke,Kt,Ks,Xs,oe,Ys,Xt,Zs,Js,en,Te,Yt,tn,sn,re,nn,Zt,an,on,rn,je,Jt,ln,dn,le,pn,ei,cn,fn,Bi,Y,de,ti,Ee,un,ii,gn,Wi,V,mn,bt,hn,_n,si,vn,bn,Dt,Dn,wn,wt,yn,xn,yt,Pn,$n,xt,Vn,In,Pt,kn,Tn,ni,jn,En,ai,qn,Sn,$t,Ln,Mn,Hi,qe,Ri,Z,pe,oi,Se,Gn,ri,Cn,Qi,k,Le,Nn,li,On,zn,Me,An,Vt,Un,Fn,Bn,C,Ge,Wn,di,Hn,Rn,ce,Qn,N,Ce,Kn,pi,Xn,Yn,fe,Zn,O,Ne,Jn,ci,ea,ta,ue,Ki,J,ge,fi,Oe,ia,ui,sa,Xi,j,ze,na,Ae,aa,It,oa,ra,la,z,Ue,da,gi,pa,ca,me,fa,A,Fe,ua,mi,ga,ma,hi,ha,_a,he,Be,va,We,ba,_i,Da,wa,Yi,ee,_e,vi,He,ya,bi,xa,Zi,E,Re,Pa,Qe,$a,kt,Va,Ia,ka,U,Ke,Ta,Di,ja,Ea,ve,qa,F,Xe,Sa,wi,La,Ma,yi,Ga,Ca,be,Ye,Na,Ze,Oa,xi,za,Aa,Ji,te,De,Pi,Je,Ua,$i,Fa,es,q,et,Ba,tt,Wa,Tt,Ha,Ra,Qa,B,it,Ka,Vi,Xa,Ya,we,Za,W,st,Ja,Ii,eo,to,ki,io,so,ye,nt,no,at,ao,Ti,oo,ro,ts;return o=new xe({}),$e=new xe({}),Ie=new xe({}),Ee=new xe({}),qe=new lt({props:{code:`from diffusers import VersatileDiffusionPipeline, EulerDiscreteScheduler

pipeline = VersatileDiffusionPipeline.from_pretrained("shi-labs/versatile-diffusion")
pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)

# or
euler_scheduler = EulerDiscreteScheduler.from_pretrained("shi-labs/versatile-diffusion", subfolder="scheduler")
pipeline = VersatileDiffusionPipeline.from_pretrained("shi-labs/versatile-diffusion", scheduler=euler_scheduler)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VersatileDiffusionPipeline, EulerDiscreteScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = VersatileDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># or</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>euler_scheduler = EulerDiscreteScheduler.from_pretrained(<span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = VersatileDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;shi-labs/versatile-diffusion&quot;</span>, scheduler=euler_scheduler)`}}),Se=new xe({}),Le=new T({props:{name:"class diffusers.VersatileDiffusionPipeline",anchor:"diffusers.VersatileDiffusionPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"image_feature_extractor",val:": CLIPFeatureExtractor"},{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:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#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> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.VersatileDiffusionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.VersatileDiffusionPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.11.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.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.11.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.11.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.VersatileDiffusionPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionMegaSafetyChecker</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 details.`,name:"safety_checker"},{anchor:"diffusers.VersatileDiffusionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L21"}}),Ge=new T({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:": typing.Optional[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 the image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.image_unet.config.sample_size * self.vae_scale_factor) &#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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,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 not to guide the image generation. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</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 will ge 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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.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.11.0/en/api/pipelines/stable_diffusion#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 will be called every <code>callback_steps</code> steps during inference. The function will be
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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L311",returnDescription:`
<p><code>~pipelines.stable_diffusion.ImagePipelineOutput</code> if <code>return_dict</code> is True, otherwise a \`tuple. When
returning a tuple, the first element is a list with the generated images.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.ImagePipelineOutput</code> or <code>tuple</code></p>
`}}),ce=new zt({props:{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.example",$$slots:{default:[Tr]},$$scope:{ctx:S}}}),Ce=new T({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:": typing.Optional[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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,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 not to guide the image generation. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</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 will ge 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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.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.11.0/en/api/pipelines/stable_diffusion#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 will be called every <code>callback_steps</code> steps during inference. The function will be
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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L83",returnDescription:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),fe=new zt({props:{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.example",$$slots:{default:[jr]},$$scope:{ctx:S}}}),Ne=new T({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:": typing.Optional[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 the image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.image_unet.config.sample_size * self.vae_scale_factor) &#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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,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 not to guide the image generation. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</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 will ge 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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.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.11.0/en/api/pipelines/stable_diffusion#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 will be called every <code>callback_steps</code> steps during inference. The function will be
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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L199",returnDescription:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),ue=new zt({props:{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.example",$$slots:{default:[Er]},$$scope:{ctx:S}}}),Oe=new xe({}),ze=new T({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:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#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 <a href="https://huggingface.co/docs/transformers/model_doc/bert" rel="nofollow">BERT</a> architecture.`,name:"bert"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>transformers.BertTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer" rel="nofollow">BertTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.11.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.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.11.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.11.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py#L34"}}),Ue=new T({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:": typing.Optional[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 the image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.image_unet.config.sample_size * self.vae_scale_factor) &#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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,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 not to guide the image generation. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</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 will ge 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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.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.11.0/en/api/pipelines/stable_diffusion#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 will be called every <code>callback_steps</code> steps during inference. The function will be
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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py#L322",returnDescription:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),me=new zt({props:{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.example",$$slots:{default:[qr]},$$scope:{ctx:S}}}),Fe=new T({props:{name:"enable_attention_slicing",anchor:"diffusers.VersatileDiffusionTextToImagePipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maxium amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipeline_utils.py#L849"}}),Be=new T({props:{name:"disable_attention_slicing",anchor:"diffusers.VersatileDiffusionTextToImagePipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipeline_utils.py#L865"}}),He=new xe({}),Re=new T({props:{name:"class diffusers.VersatileDiffusionImageVariationPipeline",anchor:"diffusers.VersatileDiffusionImageVariationPipeline",parameters:[{name:"image_feature_extractor",val:": CLIPFeatureExtractor"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"image_unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#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 <a href="https://huggingface.co/docs/transformers/model_doc/bert" rel="nofollow">BERT</a> architecture.`,name:"bert"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>transformers.BertTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer" rel="nofollow">BertTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.11.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.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.11.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.11.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py#L34"}}),Ke=new T({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:": typing.Optional[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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,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 not to guide the image generation. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</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 will ge 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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.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.11.0/en/api/pipelines/stable_diffusion#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 will be called every <code>callback_steps</code> steps during inference. The function will be
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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py#L271",returnDescription:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),ve=new zt({props:{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.example",$$slots:{default:[Sr]},$$scope:{ctx:S}}}),Xe=new T({props:{name:"enable_attention_slicing",anchor:"diffusers.VersatileDiffusionImageVariationPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maxium amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipeline_utils.py#L849"}}),Ye=new T({props:{name:"disable_attention_slicing",anchor:"diffusers.VersatileDiffusionImageVariationPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipeline_utils.py#L865"}}),Je=new xe({}),et=new T({props:{name:"class diffusers.VersatileDiffusionDualGuidedPipeline",anchor:"diffusers.VersatileDiffusionDualGuidedPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"image_feature_extractor",val:": CLIPFeatureExtractor"},{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:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#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 <a href="https://huggingface.co/docs/transformers/model_doc/bert" rel="nofollow">BERT</a> architecture.`,name:"bert"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>transformers.BertTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer" rel="nofollow">BertTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.11.0/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.11.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.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.11.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.11.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py#L41"}}),it=new T({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:": typing.Optional[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 the image generation.`,name:"prompt"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.image_unet.config.sample_size * self.vae_scale_factor) &#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 self.image_unet.config.sample_size * self.vae_scale_factor) &#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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,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 not to guide the image generation. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</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 will ge 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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.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.11.0/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</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 will be called every <code>callback_steps</code> steps during inference. The function will be
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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py#L419",returnDescription:`
<p><code>~pipelines.stable_diffusion.ImagePipelineOutput</code> if <code>return_dict</code> is True, otherwise a \`tuple. When
returning a tuple, the first element is a list with the generated images.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.ImagePipelineOutput</code> or <code>tuple</code></p>
`}}),we=new zt({props:{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.example",$$slots:{default:[Lr]},$$scope:{ctx:S}}}),st=new T({props:{name:"enable_attention_slicing",anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maxium amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipeline_utils.py#L849"}}),nt=new T({props:{name:"disable_attention_slicing",anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.11.0/src/diffusers/pipeline_utils.py#L865"}}),{c(){m=s("meta"),$=d(),_=s("h1"),u=s("a"),P=s("span"),v(o.$$.fragment),h=d(),Ut=s("span"),Vs=r("VersatileDiffusion"),Li=d(),se=s("p"),Is=r("VersatileDiffusion was proposed in "),Pe=s("a"),ks=r("Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),Ts=r(" by Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, Humphrey Shi ."),Mi=d(),dt=s("p"),js=r("The abstract of the paper is the following:"),Gi=d(),pt=s("p"),Ft=s("em"),Es=r("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."),Ci=d(),K=s("h2"),ne=s("a"),Bt=s("span"),v($e.$$.fragment),qs=d(),Wt=s("span"),Ss=r("Tips"),Ni=d(),ct=s("ul"),Ve=s("li"),Ls=r("VersatileDiffusion is conceptually very similar as "),ft=s("a"),Ms=r("Stable Diffusion"),Gs=r(",  but instead of providing just a image data stream conditioned on text, VersatileDiffusion provides both a image and text data stream and can be conditioned on both text and image."),Oi=d(),X=s("h3"),ae=s("a"),Ht=s("span"),v(Ie.$$.fragment),Cs=d(),Rt=s("span"),Ns=r("*Run VersatileDiffusion*"),zi=d(),L=s("p"),Os=r("You can both load the memory intensive \u201Call-in-one\u201D "),ut=s("a"),zs=r("VersatileDiffusionPipeline"),As=r(` that can run all tasks
with the same class as shown in `),gt=s("a"),Us=r("VersatileDiffusionPipeline.text_to_image()"),Fs=r(", "),mt=s("a"),Bs=r("VersatileDiffusionPipeline.image_variation()"),Ws=r(", and "),ht=s("a"),Hs=r("VersatileDiffusionPipeline.dual_guided()"),Ai=d(),_t=s("p"),Qt=s("strong"),Rs=r("or"),Ui=d(),vt=s("p"),Qs=r("You can run the individual pipelines which are much more memory efficient:"),Fi=d(),G=s("ul"),ke=s("li"),Kt=s("em"),Ks=r("Text-to-Image"),Xs=r(": "),oe=s("a"),Ys=r("VersatileDiffusionTextToImagePipeline."),Xt=s("strong"),Zs=r("call"),Js=r("()"),en=d(),Te=s("li"),Yt=s("em"),tn=r("Image Variation"),sn=r(": "),re=s("a"),nn=r("VersatileDiffusionImageVariationPipeline."),Zt=s("strong"),an=r("call"),on=r("()"),rn=d(),je=s("li"),Jt=s("em"),ln=r("Dual Text and Image Guided Generation"),dn=r(": "),le=s("a"),pn=r("VersatileDiffusionDualGuidedPipeline."),ei=s("strong"),cn=r("call"),fn=r("()"),Bi=d(),Y=s("h3"),de=s("a"),ti=s("span"),v(Ee.$$.fragment),un=d(),ii=s("span"),gn=r("*How to load and use different schedulers.*"),Wi=d(),V=s("p"),mn=r("The versatile diffusion pipelines uses "),bt=s("a"),hn=r("DDIMScheduler"),_n=r(" scheduler by default. But "),si=s("code"),vn=r("diffusers"),bn=r(" provides many other schedulers that can be used with the alt diffusion pipeline such as "),Dt=s("a"),Dn=r("PNDMScheduler"),wn=r(", "),wt=s("a"),yn=r("LMSDiscreteScheduler"),xn=r(", "),yt=s("a"),Pn=r("EulerDiscreteScheduler"),$n=r(", "),xt=s("a"),Vn=r("EulerAncestralDiscreteScheduler"),In=r(` etc.
To use a different scheduler, you can either change it via the `),Pt=s("a"),kn=r("ConfigMixin.from_config()"),Tn=r(" method or pass the "),ni=s("code"),jn=r("scheduler"),En=r(" argument to the "),ai=s("code"),qn=r("from_pretrained"),Sn=r(" method of the pipeline. For example, to use the "),$t=s("a"),Ln=r("EulerDiscreteScheduler"),Mn=r(", you can do the following:"),Hi=d(),v(qe.$$.fragment),Ri=d(),Z=s("h2"),pe=s("a"),oi=s("span"),v(Se.$$.fragment),Gn=d(),ri=s("span"),Cn=r("VersatileDiffusionPipeline"),Qi=d(),k=s("div"),v(Le.$$.fragment),Nn=d(),li=s("p"),On=r("Pipeline for text-to-image generation using Stable Diffusion."),zn=d(),Me=s("p"),An=r("This model inherits from "),Vt=s("a"),Un=r("DiffusionPipeline"),Fn=r(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Bn=d(),C=s("div"),v(Ge.$$.fragment),Wn=d(),di=s("p"),Hn=r("Function invoked when calling the pipeline for generation."),Rn=d(),v(ce.$$.fragment),Qn=d(),N=s("div"),v(Ce.$$.fragment),Kn=d(),pi=s("p"),Xn=r("Function invoked when calling the pipeline for generation."),Yn=d(),v(fe.$$.fragment),Zn=d(),O=s("div"),v(Ne.$$.fragment),Jn=d(),ci=s("p"),ea=r("Function invoked when calling the pipeline for generation."),ta=d(),v(ue.$$.fragment),Ki=d(),J=s("h2"),ge=s("a"),fi=s("span"),v(Oe.$$.fragment),ia=d(),ui=s("span"),sa=r("VersatileDiffusionTextToImagePipeline"),Xi=d(),j=s("div"),v(ze.$$.fragment),na=d(),Ae=s("p"),aa=r("This model inherits from "),It=s("a"),oa=r("DiffusionPipeline"),ra=r(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),la=d(),z=s("div"),v(Ue.$$.fragment),da=d(),gi=s("p"),pa=r("Function invoked when calling the pipeline for generation."),ca=d(),v(me.$$.fragment),fa=d(),A=s("div"),v(Fe.$$.fragment),ua=d(),mi=s("p"),ga=r("Enable sliced attention computation."),ma=d(),hi=s("p"),ha=r(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),_a=d(),he=s("div"),v(Be.$$.fragment),va=d(),We=s("p"),ba=r("Disable sliced attention computation. If "),_i=s("code"),Da=r("enable_attention_slicing"),wa=r(` was previously invoked, this method will go
back to computing attention in one step.`),Yi=d(),ee=s("h2"),_e=s("a"),vi=s("span"),v(He.$$.fragment),ya=d(),bi=s("span"),xa=r("VersatileDiffusionImageVariationPipeline"),Zi=d(),E=s("div"),v(Re.$$.fragment),Pa=d(),Qe=s("p"),$a=r("This model inherits from "),kt=s("a"),Va=r("DiffusionPipeline"),Ia=r(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),ka=d(),U=s("div"),v(Ke.$$.fragment),Ta=d(),Di=s("p"),ja=r("Function invoked when calling the pipeline for generation."),Ea=d(),v(ve.$$.fragment),qa=d(),F=s("div"),v(Xe.$$.fragment),Sa=d(),wi=s("p"),La=r("Enable sliced attention computation."),Ma=d(),yi=s("p"),Ga=r(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),Ca=d(),be=s("div"),v(Ye.$$.fragment),Na=d(),Ze=s("p"),Oa=r("Disable sliced attention computation. If "),xi=s("code"),za=r("enable_attention_slicing"),Aa=r(` was previously invoked, this method will go
back to computing attention in one step.`),Ji=d(),te=s("h2"),De=s("a"),Pi=s("span"),v(Je.$$.fragment),Ua=d(),$i=s("span"),Fa=r("VersatileDiffusionDualGuidedPipeline"),es=d(),q=s("div"),v(et.$$.fragment),Ba=d(),tt=s("p"),Wa=r("This model inherits from "),Tt=s("a"),Ha=r("DiffusionPipeline"),Ra=r(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Qa=d(),B=s("div"),v(it.$$.fragment),Ka=d(),Vi=s("p"),Xa=r("Function invoked when calling the pipeline for generation."),Ya=d(),v(we.$$.fragment),Za=d(),W=s("div"),v(st.$$.fragment),Ja=d(),Ii=s("p"),eo=r("Enable sliced attention computation."),to=d(),ki=s("p"),io=r(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),so=d(),ye=s("div"),v(nt.$$.fragment),no=d(),at=s("p"),ao=r("Disable sliced attention computation. If "),Ti=s("code"),oo=r("enable_attention_slicing"),ro=r(` was previously invoked, this method will go
back to computing attention in one step.`),this.h()},l(t){const f=Ir('[data-svelte="svelte-1phssyn"]',document.head);m=n(f,"META",{name:!0,content:!0}),f.forEach(i),$=p(t),_=n(t,"H1",{class:!0});var ot=a(_);u=n(ot,"A",{id:!0,class:!0,href:!0});var ji=a(u);P=n(ji,"SPAN",{});var Ei=a(P);b(o.$$.fragment,Ei),Ei.forEach(i),ji.forEach(i),h=p(ot),Ut=n(ot,"SPAN",{});var qi=a(Ut);Vs=l(qi,"VersatileDiffusion"),qi.forEach(i),ot.forEach(i),Li=p(t),se=n(t,"P",{});var rt=a(se);Is=l(rt,"VersatileDiffusion was proposed in "),Pe=n(rt,"A",{href:!0,rel:!0});var Si=a(Pe);ks=l(Si,"Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),Si.forEach(i),Ts=l(rt," by Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, Humphrey Shi ."),rt.forEach(i),Mi=p(t),dt=n(t,"P",{});var lo=a(dt);js=l(lo,"The abstract of the paper is the following:"),lo.forEach(i),Gi=p(t),pt=n(t,"P",{});var po=a(pt);Ft=n(po,"EM",{});var co=a(Ft);Es=l(co,"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."),co.forEach(i),po.forEach(i),Ci=p(t),K=n(t,"H2",{class:!0});var is=a(K);ne=n(is,"A",{id:!0,class:!0,href:!0});var fo=a(ne);Bt=n(fo,"SPAN",{});var uo=a(Bt);b($e.$$.fragment,uo),uo.forEach(i),fo.forEach(i),qs=p(is),Wt=n(is,"SPAN",{});var go=a(Wt);Ss=l(go,"Tips"),go.forEach(i),is.forEach(i),Ni=p(t),ct=n(t,"UL",{});var mo=a(ct);Ve=n(mo,"LI",{});var ss=a(Ve);Ls=l(ss,"VersatileDiffusion is conceptually very similar as "),ft=n(ss,"A",{href:!0});var ho=a(ft);Ms=l(ho,"Stable Diffusion"),ho.forEach(i),Gs=l(ss,",  but instead of providing just a image data stream conditioned on text, VersatileDiffusion provides both a image and text data stream and can be conditioned on both text and image."),ss.forEach(i),mo.forEach(i),Oi=p(t),X=n(t,"H3",{class:!0});var ns=a(X);ae=n(ns,"A",{id:!0,class:!0,href:!0});var _o=a(ae);Ht=n(_o,"SPAN",{});var vo=a(Ht);b(Ie.$$.fragment,vo),vo.forEach(i),_o.forEach(i),Cs=p(ns),Rt=n(ns,"SPAN",{});var bo=a(Rt);Ns=l(bo,"*Run VersatileDiffusion*"),bo.forEach(i),ns.forEach(i),zi=p(t),L=n(t,"P",{});var ie=a(L);Os=l(ie,"You can both load the memory intensive \u201Call-in-one\u201D "),ut=n(ie,"A",{href:!0});var Do=a(ut);zs=l(Do,"VersatileDiffusionPipeline"),Do.forEach(i),As=l(ie,` that can run all tasks
with the same class as shown in `),gt=n(ie,"A",{href:!0});var wo=a(gt);Us=l(wo,"VersatileDiffusionPipeline.text_to_image()"),wo.forEach(i),Fs=l(ie,", "),mt=n(ie,"A",{href:!0});var yo=a(mt);Bs=l(yo,"VersatileDiffusionPipeline.image_variation()"),yo.forEach(i),Ws=l(ie,", and "),ht=n(ie,"A",{href:!0});var xo=a(ht);Hs=l(xo,"VersatileDiffusionPipeline.dual_guided()"),xo.forEach(i),ie.forEach(i),Ai=p(t),_t=n(t,"P",{});var Po=a(_t);Qt=n(Po,"STRONG",{});var $o=a(Qt);Rs=l($o,"or"),$o.forEach(i),Po.forEach(i),Ui=p(t),vt=n(t,"P",{});var Vo=a(vt);Qs=l(Vo,"You can run the individual pipelines which are much more memory efficient:"),Vo.forEach(i),Fi=p(t),G=n(t,"UL",{});var jt=a(G);ke=n(jt,"LI",{});var as=a(ke);Kt=n(as,"EM",{});var Io=a(Kt);Ks=l(Io,"Text-to-Image"),Io.forEach(i),Xs=l(as,": "),oe=n(as,"A",{href:!0});var os=a(oe);Ys=l(os,"VersatileDiffusionTextToImagePipeline."),Xt=n(os,"STRONG",{});var ko=a(Xt);Zs=l(ko,"call"),ko.forEach(i),Js=l(os,"()"),os.forEach(i),as.forEach(i),en=p(jt),Te=n(jt,"LI",{});var rs=a(Te);Yt=n(rs,"EM",{});var To=a(Yt);tn=l(To,"Image Variation"),To.forEach(i),sn=l(rs,": "),re=n(rs,"A",{href:!0});var ls=a(re);nn=l(ls,"VersatileDiffusionImageVariationPipeline."),Zt=n(ls,"STRONG",{});var jo=a(Zt);an=l(jo,"call"),jo.forEach(i),on=l(ls,"()"),ls.forEach(i),rs.forEach(i),rn=p(jt),je=n(jt,"LI",{});var ds=a(je);Jt=n(ds,"EM",{});var Eo=a(Jt);ln=l(Eo,"Dual Text and Image Guided Generation"),Eo.forEach(i),dn=l(ds,": "),le=n(ds,"A",{href:!0});var ps=a(le);pn=l(ps,"VersatileDiffusionDualGuidedPipeline."),ei=n(ps,"STRONG",{});var qo=a(ei);cn=l(qo,"call"),qo.forEach(i),fn=l(ps,"()"),ps.forEach(i),ds.forEach(i),jt.forEach(i),Bi=p(t),Y=n(t,"H3",{class:!0});var cs=a(Y);de=n(cs,"A",{id:!0,class:!0,href:!0});var So=a(de);ti=n(So,"SPAN",{});var Lo=a(ti);b(Ee.$$.fragment,Lo),Lo.forEach(i),So.forEach(i),un=p(cs),ii=n(cs,"SPAN",{});var Mo=a(ii);gn=l(Mo,"*How to load and use different schedulers.*"),Mo.forEach(i),cs.forEach(i),Wi=p(t),V=n(t,"P",{});var I=a(V);mn=l(I,"The versatile diffusion pipelines uses "),bt=n(I,"A",{href:!0});var Go=a(bt);hn=l(Go,"DDIMScheduler"),Go.forEach(i),_n=l(I," scheduler by default. But "),si=n(I,"CODE",{});var Co=a(si);vn=l(Co,"diffusers"),Co.forEach(i),bn=l(I," provides many other schedulers that can be used with the alt diffusion pipeline such as "),Dt=n(I,"A",{href:!0});var No=a(Dt);Dn=l(No,"PNDMScheduler"),No.forEach(i),wn=l(I,", "),wt=n(I,"A",{href:!0});var Oo=a(wt);yn=l(Oo,"LMSDiscreteScheduler"),Oo.forEach(i),xn=l(I,", "),yt=n(I,"A",{href:!0});var zo=a(yt);Pn=l(zo,"EulerDiscreteScheduler"),zo.forEach(i),$n=l(I,", "),xt=n(I,"A",{href:!0});var Ao=a(xt);Vn=l(Ao,"EulerAncestralDiscreteScheduler"),Ao.forEach(i),In=l(I,` etc.
To use a different scheduler, you can either change it via the `),Pt=n(I,"A",{href:!0});var Uo=a(Pt);kn=l(Uo,"ConfigMixin.from_config()"),Uo.forEach(i),Tn=l(I," method or pass the "),ni=n(I,"CODE",{});var Fo=a(ni);jn=l(Fo,"scheduler"),Fo.forEach(i),En=l(I," argument to the "),ai=n(I,"CODE",{});var Bo=a(ai);qn=l(Bo,"from_pretrained"),Bo.forEach(i),Sn=l(I," method of the pipeline. For example, to use the "),$t=n(I,"A",{href:!0});var Wo=a($t);Ln=l(Wo,"EulerDiscreteScheduler"),Wo.forEach(i),Mn=l(I,", you can do the following:"),I.forEach(i),Hi=p(t),b(qe.$$.fragment,t),Ri=p(t),Z=n(t,"H2",{class:!0});var fs=a(Z);pe=n(fs,"A",{id:!0,class:!0,href:!0});var Ho=a(pe);oi=n(Ho,"SPAN",{});var Ro=a(oi);b(Se.$$.fragment,Ro),Ro.forEach(i),Ho.forEach(i),Gn=p(fs),ri=n(fs,"SPAN",{});var Qo=a(ri);Cn=l(Qo,"VersatileDiffusionPipeline"),Qo.forEach(i),fs.forEach(i),Qi=p(t),k=n(t,"DIV",{class:!0});var M=a(k);b(Le.$$.fragment,M),Nn=p(M),li=n(M,"P",{});var Ko=a(li);On=l(Ko,"Pipeline for text-to-image generation using Stable Diffusion."),Ko.forEach(i),zn=p(M),Me=n(M,"P",{});var us=a(Me);An=l(us,"This model inherits from "),Vt=n(us,"A",{href:!0});var Xo=a(Vt);Un=l(Xo,"DiffusionPipeline"),Xo.forEach(i),Fn=l(us,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),us.forEach(i),Bn=p(M),C=n(M,"DIV",{class:!0});var Et=a(C);b(Ge.$$.fragment,Et),Wn=p(Et),di=n(Et,"P",{});var Yo=a(di);Hn=l(Yo,"Function invoked when calling the pipeline for generation."),Yo.forEach(i),Rn=p(Et),b(ce.$$.fragment,Et),Et.forEach(i),Qn=p(M),N=n(M,"DIV",{class:!0});var qt=a(N);b(Ce.$$.fragment,qt),Kn=p(qt),pi=n(qt,"P",{});var Zo=a(pi);Xn=l(Zo,"Function invoked when calling the pipeline for generation."),Zo.forEach(i),Yn=p(qt),b(fe.$$.fragment,qt),qt.forEach(i),Zn=p(M),O=n(M,"DIV",{class:!0});var St=a(O);b(Ne.$$.fragment,St),Jn=p(St),ci=n(St,"P",{});var Jo=a(ci);ea=l(Jo,"Function invoked when calling the pipeline for generation."),Jo.forEach(i),ta=p(St),b(ue.$$.fragment,St),St.forEach(i),M.forEach(i),Ki=p(t),J=n(t,"H2",{class:!0});var gs=a(J);ge=n(gs,"A",{id:!0,class:!0,href:!0});var er=a(ge);fi=n(er,"SPAN",{});var tr=a(fi);b(Oe.$$.fragment,tr),tr.forEach(i),er.forEach(i),ia=p(gs),ui=n(gs,"SPAN",{});var ir=a(ui);sa=l(ir,"VersatileDiffusionTextToImagePipeline"),ir.forEach(i),gs.forEach(i),Xi=p(t),j=n(t,"DIV",{class:!0});var H=a(j);b(ze.$$.fragment,H),na=p(H),Ae=n(H,"P",{});var ms=a(Ae);aa=l(ms,"This model inherits from "),It=n(ms,"A",{href:!0});var sr=a(It);oa=l(sr,"DiffusionPipeline"),sr.forEach(i),ra=l(ms,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),ms.forEach(i),la=p(H),z=n(H,"DIV",{class:!0});var Lt=a(z);b(Ue.$$.fragment,Lt),da=p(Lt),gi=n(Lt,"P",{});var nr=a(gi);pa=l(nr,"Function invoked when calling the pipeline for generation."),nr.forEach(i),ca=p(Lt),b(me.$$.fragment,Lt),Lt.forEach(i),fa=p(H),A=n(H,"DIV",{class:!0});var Mt=a(A);b(Fe.$$.fragment,Mt),ua=p(Mt),mi=n(Mt,"P",{});var ar=a(mi);ga=l(ar,"Enable sliced attention computation."),ar.forEach(i),ma=p(Mt),hi=n(Mt,"P",{});var or=a(hi);ha=l(or,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),or.forEach(i),Mt.forEach(i),_a=p(H),he=n(H,"DIV",{class:!0});var hs=a(he);b(Be.$$.fragment,hs),va=p(hs),We=n(hs,"P",{});var _s=a(We);ba=l(_s,"Disable sliced attention computation. If "),_i=n(_s,"CODE",{});var rr=a(_i);Da=l(rr,"enable_attention_slicing"),rr.forEach(i),wa=l(_s,` was previously invoked, this method will go
back to computing attention in one step.`),_s.forEach(i),hs.forEach(i),H.forEach(i),Yi=p(t),ee=n(t,"H2",{class:!0});var vs=a(ee);_e=n(vs,"A",{id:!0,class:!0,href:!0});var lr=a(_e);vi=n(lr,"SPAN",{});var dr=a(vi);b(He.$$.fragment,dr),dr.forEach(i),lr.forEach(i),ya=p(vs),bi=n(vs,"SPAN",{});var pr=a(bi);xa=l(pr,"VersatileDiffusionImageVariationPipeline"),pr.forEach(i),vs.forEach(i),Zi=p(t),E=n(t,"DIV",{class:!0});var R=a(E);b(Re.$$.fragment,R),Pa=p(R),Qe=n(R,"P",{});var bs=a(Qe);$a=l(bs,"This model inherits from "),kt=n(bs,"A",{href:!0});var cr=a(kt);Va=l(cr,"DiffusionPipeline"),cr.forEach(i),Ia=l(bs,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),bs.forEach(i),ka=p(R),U=n(R,"DIV",{class:!0});var Gt=a(U);b(Ke.$$.fragment,Gt),Ta=p(Gt),Di=n(Gt,"P",{});var fr=a(Di);ja=l(fr,"Function invoked when calling the pipeline for generation."),fr.forEach(i),Ea=p(Gt),b(ve.$$.fragment,Gt),Gt.forEach(i),qa=p(R),F=n(R,"DIV",{class:!0});var Ct=a(F);b(Xe.$$.fragment,Ct),Sa=p(Ct),wi=n(Ct,"P",{});var ur=a(wi);La=l(ur,"Enable sliced attention computation."),ur.forEach(i),Ma=p(Ct),yi=n(Ct,"P",{});var gr=a(yi);Ga=l(gr,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),gr.forEach(i),Ct.forEach(i),Ca=p(R),be=n(R,"DIV",{class:!0});var Ds=a(be);b(Ye.$$.fragment,Ds),Na=p(Ds),Ze=n(Ds,"P",{});var ws=a(Ze);Oa=l(ws,"Disable sliced attention computation. If "),xi=n(ws,"CODE",{});var mr=a(xi);za=l(mr,"enable_attention_slicing"),mr.forEach(i),Aa=l(ws,` was previously invoked, this method will go
back to computing attention in one step.`),ws.forEach(i),Ds.forEach(i),R.forEach(i),Ji=p(t),te=n(t,"H2",{class:!0});var ys=a(te);De=n(ys,"A",{id:!0,class:!0,href:!0});var hr=a(De);Pi=n(hr,"SPAN",{});var _r=a(Pi);b(Je.$$.fragment,_r),_r.forEach(i),hr.forEach(i),Ua=p(ys),$i=n(ys,"SPAN",{});var vr=a($i);Fa=l(vr,"VersatileDiffusionDualGuidedPipeline"),vr.forEach(i),ys.forEach(i),es=p(t),q=n(t,"DIV",{class:!0});var Q=a(q);b(et.$$.fragment,Q),Ba=p(Q),tt=n(Q,"P",{});var xs=a(tt);Wa=l(xs,"This model inherits from "),Tt=n(xs,"A",{href:!0});var br=a(Tt);Ha=l(br,"DiffusionPipeline"),br.forEach(i),Ra=l(xs,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),xs.forEach(i),Qa=p(Q),B=n(Q,"DIV",{class:!0});var Nt=a(B);b(it.$$.fragment,Nt),Ka=p(Nt),Vi=n(Nt,"P",{});var Dr=a(Vi);Xa=l(Dr,"Function invoked when calling the pipeline for generation."),Dr.forEach(i),Ya=p(Nt),b(we.$$.fragment,Nt),Nt.forEach(i),Za=p(Q),W=n(Q,"DIV",{class:!0});var Ot=a(W);b(st.$$.fragment,Ot),Ja=p(Ot),Ii=n(Ot,"P",{});var wr=a(Ii);eo=l(wr,"Enable sliced attention computation."),wr.forEach(i),to=p(Ot),ki=n(Ot,"P",{});var yr=a(ki);io=l(yr,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),yr.forEach(i),Ot.forEach(i),so=p(Q),ye=n(Q,"DIV",{class:!0});var Ps=a(ye);b(nt.$$.fragment,Ps),no=p(Ps),at=n(Ps,"P",{});var $s=a(at);ao=l($s,"Disable sliced attention computation. If "),Ti=n($s,"CODE",{});var xr=a(Ti);oo=l(xr,"enable_attention_slicing"),xr.forEach(i),ro=l($s,` was previously invoked, this method will go
back to computing attention in one step.`),$s.forEach(i),Ps.forEach(i),Q.forEach(i),this.h()},h(){c(m,"name","hf:doc:metadata"),c(m,"content",JSON.stringify(Gr)),c(u,"id","versatilediffusion"),c(u,"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"),c(u,"href","#versatilediffusion"),c(_,"class","relative group"),c(Pe,"href","https://arxiv.org/abs/2211.08332"),c(Pe,"rel","nofollow"),c(ne,"id","tips"),c(ne,"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"),c(ne,"href","#tips"),c(K,"class","relative group"),c(ft,"href","./api/pipelines/stable_diffusion"),c(ae,"id","run-versatilediffusion"),c(ae,"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"),c(ae,"href","#run-versatilediffusion"),c(X,"class","relative group"),c(ut,"href","/docs/diffusers/v0.11.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline"),c(gt,"href","/docs/diffusers/v0.11.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline.text_to_image"),c(mt,"href","/docs/diffusers/v0.11.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline.image_variation"),c(ht,"href","/docs/diffusers/v0.11.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline.dual_guided"),c(oe,"href","/docs/diffusers/v0.11.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionTextToImagePipeline.__call__"),c(re,"href","/docs/diffusers/v0.11.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionImageVariationPipeline.__call__"),c(le,"href","/docs/diffusers/v0.11.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionDualGuidedPipeline.__call__"),c(de,"id","how-to-load-and-use-different-schedulers"),c(de,"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"),c(de,"href","#how-to-load-and-use-different-schedulers"),c(Y,"class","relative group"),c(bt,"href","/docs/diffusers/v0.11.0/en/api/schedulers/ddim#diffusers.DDIMScheduler"),c(Dt,"href","/docs/diffusers/v0.11.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),c(wt,"href","/docs/diffusers/v0.11.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler"),c(yt,"href","/docs/diffusers/v0.11.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),c(xt,"href","/docs/diffusers/v0.11.0/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler"),c(Pt,"href","/docs/diffusers/v0.11.0/en/api/configuration#diffusers.ConfigMixin.from_config"),c($t,"href","/docs/diffusers/v0.11.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),c(pe,"id","diffusers.VersatileDiffusionPipeline"),c(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(pe,"href","#diffusers.VersatileDiffusionPipeline"),c(Z,"class","relative group"),c(Vt,"href","/docs/diffusers/v0.11.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ge,"id","diffusers.VersatileDiffusionTextToImagePipeline"),c(ge,"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"),c(ge,"href","#diffusers.VersatileDiffusionTextToImagePipeline"),c(J,"class","relative group"),c(It,"href","/docs/diffusers/v0.11.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_e,"id","diffusers.VersatileDiffusionImageVariationPipeline"),c(_e,"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"),c(_e,"href","#diffusers.VersatileDiffusionImageVariationPipeline"),c(ee,"class","relative group"),c(kt,"href","/docs/diffusers/v0.11.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(De,"id","diffusers.VersatileDiffusionDualGuidedPipeline"),c(De,"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"),c(De,"href","#diffusers.VersatileDiffusionDualGuidedPipeline"),c(te,"class","relative group"),c(Tt,"href","/docs/diffusers/v0.11.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),c(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"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,f){e(document.head,m),g(t,$,f),g(t,_,f),e(_,u),e(u,P),D(o,P,null),e(_,h),e(_,Ut),e(Ut,Vs),g(t,Li,f),g(t,se,f),e(se,Is),e(se,Pe),e(Pe,ks),e(se,Ts),g(t,Mi,f),g(t,dt,f),e(dt,js),g(t,Gi,f),g(t,pt,f),e(pt,Ft),e(Ft,Es),g(t,Ci,f),g(t,K,f),e(K,ne),e(ne,Bt),D($e,Bt,null),e(K,qs),e(K,Wt),e(Wt,Ss),g(t,Ni,f),g(t,ct,f),e(ct,Ve),e(Ve,Ls),e(Ve,ft),e(ft,Ms),e(Ve,Gs),g(t,Oi,f),g(t,X,f),e(X,ae),e(ae,Ht),D(Ie,Ht,null),e(X,Cs),e(X,Rt),e(Rt,Ns),g(t,zi,f),g(t,L,f),e(L,Os),e(L,ut),e(ut,zs),e(L,As),e(L,gt),e(gt,Us),e(L,Fs),e(L,mt),e(mt,Bs),e(L,Ws),e(L,ht),e(ht,Hs),g(t,Ai,f),g(t,_t,f),e(_t,Qt),e(Qt,Rs),g(t,Ui,f),g(t,vt,f),e(vt,Qs),g(t,Fi,f),g(t,G,f),e(G,ke),e(ke,Kt),e(Kt,Ks),e(ke,Xs),e(ke,oe),e(oe,Ys),e(oe,Xt),e(Xt,Zs),e(oe,Js),e(G,en),e(G,Te),e(Te,Yt),e(Yt,tn),e(Te,sn),e(Te,re),e(re,nn),e(re,Zt),e(Zt,an),e(re,on),e(G,rn),e(G,je),e(je,Jt),e(Jt,ln),e(je,dn),e(je,le),e(le,pn),e(le,ei),e(ei,cn),e(le,fn),g(t,Bi,f),g(t,Y,f),e(Y,de),e(de,ti),D(Ee,ti,null),e(Y,un),e(Y,ii),e(ii,gn),g(t,Wi,f),g(t,V,f),e(V,mn),e(V,bt),e(bt,hn),e(V,_n),e(V,si),e(si,vn),e(V,bn),e(V,Dt),e(Dt,Dn),e(V,wn),e(V,wt),e(wt,yn),e(V,xn),e(V,yt),e(yt,Pn),e(V,$n),e(V,xt),e(xt,Vn),e(V,In),e(V,Pt),e(Pt,kn),e(V,Tn),e(V,ni),e(ni,jn),e(V,En),e(V,ai),e(ai,qn),e(V,Sn),e(V,$t),e($t,Ln),e(V,Mn),g(t,Hi,f),D(qe,t,f),g(t,Ri,f),g(t,Z,f),e(Z,pe),e(pe,oi),D(Se,oi,null),e(Z,Gn),e(Z,ri),e(ri,Cn),g(t,Qi,f),g(t,k,f),D(Le,k,null),e(k,Nn),e(k,li),e(li,On),e(k,zn),e(k,Me),e(Me,An),e(Me,Vt),e(Vt,Un),e(Me,Fn),e(k,Bn),e(k,C),D(Ge,C,null),e(C,Wn),e(C,di),e(di,Hn),e(C,Rn),D(ce,C,null),e(k,Qn),e(k,N),D(Ce,N,null),e(N,Kn),e(N,pi),e(pi,Xn),e(N,Yn),D(fe,N,null),e(k,Zn),e(k,O),D(Ne,O,null),e(O,Jn),e(O,ci),e(ci,ea),e(O,ta),D(ue,O,null),g(t,Ki,f),g(t,J,f),e(J,ge),e(ge,fi),D(Oe,fi,null),e(J,ia),e(J,ui),e(ui,sa),g(t,Xi,f),g(t,j,f),D(ze,j,null),e(j,na),e(j,Ae),e(Ae,aa),e(Ae,It),e(It,oa),e(Ae,ra),e(j,la),e(j,z),D(Ue,z,null),e(z,da),e(z,gi),e(gi,pa),e(z,ca),D(me,z,null),e(j,fa),e(j,A),D(Fe,A,null),e(A,ua),e(A,mi),e(mi,ga),e(A,ma),e(A,hi),e(hi,ha),e(j,_a),e(j,he),D(Be,he,null),e(he,va),e(he,We),e(We,ba),e(We,_i),e(_i,Da),e(We,wa),g(t,Yi,f),g(t,ee,f),e(ee,_e),e(_e,vi),D(He,vi,null),e(ee,ya),e(ee,bi),e(bi,xa),g(t,Zi,f),g(t,E,f),D(Re,E,null),e(E,Pa),e(E,Qe),e(Qe,$a),e(Qe,kt),e(kt,Va),e(Qe,Ia),e(E,ka),e(E,U),D(Ke,U,null),e(U,Ta),e(U,Di),e(Di,ja),e(U,Ea),D(ve,U,null),e(E,qa),e(E,F),D(Xe,F,null),e(F,Sa),e(F,wi),e(wi,La),e(F,Ma),e(F,yi),e(yi,Ga),e(E,Ca),e(E,be),D(Ye,be,null),e(be,Na),e(be,Ze),e(Ze,Oa),e(Ze,xi),e(xi,za),e(Ze,Aa),g(t,Ji,f),g(t,te,f),e(te,De),e(De,Pi),D(Je,Pi,null),e(te,Ua),e(te,$i),e($i,Fa),g(t,es,f),g(t,q,f),D(et,q,null),e(q,Ba),e(q,tt),e(tt,Wa),e(tt,Tt),e(Tt,Ha),e(tt,Ra),e(q,Qa),e(q,B),D(it,B,null),e(B,Ka),e(B,Vi),e(Vi,Xa),e(B,Ya),D(we,B,null),e(q,Za),e(q,W),D(st,W,null),e(W,Ja),e(W,Ii),e(Ii,eo),e(W,to),e(W,ki),e(ki,io),e(q,so),e(q,ye),D(nt,ye,null),e(ye,no),e(ye,at),e(at,ao),e(at,Ti),e(Ti,oo),e(at,ro),ts=!0},p(t,[f]){const ot={};f&2&&(ot.$$scope={dirty:f,ctx:t}),ce.$set(ot);const ji={};f&2&&(ji.$$scope={dirty:f,ctx:t}),fe.$set(ji);const Ei={};f&2&&(Ei.$$scope={dirty:f,ctx:t}),ue.$set(Ei);const qi={};f&2&&(qi.$$scope={dirty:f,ctx:t}),me.$set(qi);const rt={};f&2&&(rt.$$scope={dirty:f,ctx:t}),ve.$set(rt);const Si={};f&2&&(Si.$$scope={dirty:f,ctx:t}),we.$set(Si)},i(t){ts||(w(o.$$.fragment,t),w($e.$$.fragment,t),w(Ie.$$.fragment,t),w(Ee.$$.fragment,t),w(qe.$$.fragment,t),w(Se.$$.fragment,t),w(Le.$$.fragment,t),w(Ge.$$.fragment,t),w(ce.$$.fragment,t),w(Ce.$$.fragment,t),w(fe.$$.fragment,t),w(Ne.$$.fragment,t),w(ue.$$.fragment,t),w(Oe.$$.fragment,t),w(ze.$$.fragment,t),w(Ue.$$.fragment,t),w(me.$$.fragment,t),w(Fe.$$.fragment,t),w(Be.$$.fragment,t),w(He.$$.fragment,t),w(Re.$$.fragment,t),w(Ke.$$.fragment,t),w(ve.$$.fragment,t),w(Xe.$$.fragment,t),w(Ye.$$.fragment,t),w(Je.$$.fragment,t),w(et.$$.fragment,t),w(it.$$.fragment,t),w(we.$$.fragment,t),w(st.$$.fragment,t),w(nt.$$.fragment,t),ts=!0)},o(t){y(o.$$.fragment,t),y($e.$$.fragment,t),y(Ie.$$.fragment,t),y(Ee.$$.fragment,t),y(qe.$$.fragment,t),y(Se.$$.fragment,t),y(Le.$$.fragment,t),y(Ge.$$.fragment,t),y(ce.$$.fragment,t),y(Ce.$$.fragment,t),y(fe.$$.fragment,t),y(Ne.$$.fragment,t),y(ue.$$.fragment,t),y(Oe.$$.fragment,t),y(ze.$$.fragment,t),y(Ue.$$.fragment,t),y(me.$$.fragment,t),y(Fe.$$.fragment,t),y(Be.$$.fragment,t),y(He.$$.fragment,t),y(Re.$$.fragment,t),y(Ke.$$.fragment,t),y(ve.$$.fragment,t),y(Xe.$$.fragment,t),y(Ye.$$.fragment,t),y(Je.$$.fragment,t),y(et.$$.fragment,t),y(it.$$.fragment,t),y(we.$$.fragment,t),y(st.$$.fragment,t),y(nt.$$.fragment,t),ts=!1},d(t){i(m),t&&i($),t&&i(_),x(o),t&&i(Li),t&&i(se),t&&i(Mi),t&&i(dt),t&&i(Gi),t&&i(pt),t&&i(Ci),t&&i(K),x($e),t&&i(Ni),t&&i(ct),t&&i(Oi),t&&i(X),x(Ie),t&&i(zi),t&&i(L),t&&i(Ai),t&&i(_t),t&&i(Ui),t&&i(vt),t&&i(Fi),t&&i(G),t&&i(Bi),t&&i(Y),x(Ee),t&&i(Wi),t&&i(V),t&&i(Hi),x(qe,t),t&&i(Ri),t&&i(Z),x(Se),t&&i(Qi),t&&i(k),x(Le),x(Ge),x(ce),x(Ce),x(fe),x(Ne),x(ue),t&&i(Ki),t&&i(J),x(Oe),t&&i(Xi),t&&i(j),x(ze),x(Ue),x(me),x(Fe),x(Be),t&&i(Yi),t&&i(ee),x(He),t&&i(Zi),t&&i(E),x(Re),x(Ke),x(ve),x(Xe),x(Ye),t&&i(Ji),t&&i(te),x(Je),t&&i(es),t&&i(q),x(et),x(it),x(we),x(st),x(nt)}}}const Gr={local:"versatilediffusion",sections:[{local:"tips",sections:[{local:"run-versatilediffusion",title:"*Run VersatileDiffusion*"},{local:"how-to-load-and-use-different-schedulers",title:"*How to load and use different schedulers.*"}],title:"Tips"},{local:"diffusers.VersatileDiffusionPipeline",title:"VersatileDiffusionPipeline"},{local:"diffusers.VersatileDiffusionTextToImagePipeline",title:"VersatileDiffusionTextToImagePipeline"},{local:"diffusers.VersatileDiffusionImageVariationPipeline",title:"VersatileDiffusionImageVariationPipeline"},{local:"diffusers.VersatileDiffusionDualGuidedPipeline",title:"VersatileDiffusionDualGuidedPipeline"}],title:"VersatileDiffusion"};function Cr(S){return kr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fr extends Pr{constructor(m){super();$r(this,m,Cr,Mr,Vr,{})}}export{Fr as default,Gr as metadata};
