import{S as zo,i as Fo,s as Bo,e as a,k as p,w as b,t as r,M as Wo,c as s,d as i,m as f,a as n,x as D,h as l,b as d,G as e,g,y as w,q as y,o as x,B as P,v as Ho,L as qt}from"../../../chunks/vendor-hf-doc-builder.js";import{D as C}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as it}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as De}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Et}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ro(T){let m,$,_,u,v;return u=new it({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=a("p"),$=r("Examples:"),_=p(),b(u.$$.fragment)},l(o){m=s(o,"P",{});var h=n(m);$=l(h,"Examples:"),h.forEach(i),_=f(o),D(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),w(u,o,h),v=!0},p:qt,i(o){v||(y(u.$$.fragment,o),v=!0)},o(o){x(u.$$.fragment,o),v=!1},d(o){o&&i(m),o&&i(_),P(u,o)}}}function Ko(T){let m,$,_,u,v;return u=new it({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=a("p"),$=r("Examples:"),_=p(),b(u.$$.fragment)},l(o){m=s(o,"P",{});var h=n(m);$=l(h,"Examples:"),h.forEach(i),_=f(o),D(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),w(u,o,h),v=!0},p:qt,i(o){v||(y(u.$$.fragment,o),v=!0)},o(o){x(u.$$.fragment,o),v=!1},d(o){o&&i(m),o&&i(_),P(u,o)}}}function Qo(T){let m,$,_,u,v;return u=new it({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=a("p"),$=r("Examples:"),_=p(),b(u.$$.fragment)},l(o){m=s(o,"P",{});var h=n(m);$=l(h,"Examples:"),h.forEach(i),_=f(o),D(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),w(u,o,h),v=!0},p:qt,i(o){v||(y(u.$$.fragment,o),v=!0)},o(o){x(u.$$.fragment,o),v=!1},d(o){o&&i(m),o&&i(_),P(u,o)}}}function Xo(T){let m,$,_,u,v;return u=new it({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=a("p"),$=r("Examples:"),_=p(),b(u.$$.fragment)},l(o){m=s(o,"P",{});var h=n(m);$=l(h,"Examples:"),h.forEach(i),_=f(o),D(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),w(u,o,h),v=!0},p:qt,i(o){v||(y(u.$$.fragment,o),v=!0)},o(o){x(u.$$.fragment,o),v=!1},d(o){o&&i(m),o&&i(_),P(u,o)}}}function Yo(T){let m,$,_,u,v;return u=new it({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=a("p"),$=r("Examples:"),_=p(),b(u.$$.fragment)},l(o){m=s(o,"P",{});var h=n(m);$=l(h,"Examples:"),h.forEach(i),_=f(o),D(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),w(u,o,h),v=!0},p:qt,i(o){v||(y(u.$$.fragment,o),v=!0)},o(o){x(u.$$.fragment,o),v=!1},d(o){o&&i(m),o&&i(_),P(u,o)}}}function Zo(T){let m,$,_,u,v;return u=new it({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=a("p"),$=r("Examples:"),_=p(),b(u.$$.fragment)},l(o){m=s(o,"P",{});var h=n(m);$=l(h,"Examples:"),h.forEach(i),_=f(o),D(u.$$.fragment,o)},m(o,h){g(o,m,h),e(m,$),g(o,_,h),w(u,o,h),v=!0},p:qt,i(o){v||(y(u.$$.fragment,o),v=!0)},o(o){x(u.$$.fragment,o),v=!1},d(o){o&&i(m),o&&i(_),P(u,o)}}}function Jo(T){let m,$,_,u,v,o,h,St,fa,bi,Y,ca,we,ua,ga,Di,at,ma,wi,st,Ct,ha,yi,F,Z,Lt,ye,_a,Gt,va,xi,nt,xe,ba,ot,Da,wa,Pi,B,J,Mt,Pe,ya,Ot,xa,$i,j,Pa,rt,$a,Va,lt,Ia,ka,dt,Ta,ja,pt,Ea,Vi,ft,Nt,qa,Ii,ct,Sa,ki,G,$e,At,Ca,La,ee,Ga,Ut,Ma,Oa,Na,Ve,zt,Aa,Ua,te,za,Ft,Fa,Ba,Wa,Ie,Bt,Ha,Ra,ie,Ka,Wt,Qa,Xa,Ti,W,ae,Ht,ke,Ya,Rt,Za,ji,V,Ja,ut,es,ts,Kt,is,as,gt,ss,ns,mt,os,rs,ht,ls,ds,_t,ps,fs,vt,cs,us,Qt,gs,ms,Xt,hs,_s,bt,vs,bs,Ei,Te,qi,H,se,Yt,je,Ds,Zt,ws,Si,k,Ee,ys,Jt,xs,Ps,qe,$s,Dt,Vs,Is,ks,M,Se,Ts,ei,js,Es,ne,qs,O,Ce,Ss,ti,Cs,Ls,oe,Gs,N,Le,Ms,ii,Os,Ns,re,Ci,R,le,ai,Ge,As,si,Us,Li,E,Me,zs,Oe,Fs,wt,Bs,Ws,Hs,A,Ne,Rs,ni,Ks,Qs,de,Xs,pe,Ae,Ys,Ue,Zs,oi,Js,en,Gi,K,fe,ri,ze,tn,li,an,Mi,q,Fe,sn,Be,nn,yt,on,rn,ln,U,We,dn,di,pn,fn,ce,cn,ue,He,un,Re,gn,pi,mn,hn,Oi,Q,ge,fi,Ke,_n,ci,vn,Ni,S,Qe,bn,Xe,Dn,xt,wn,yn,xn,z,Ye,Pn,ui,$n,Vn,me,In,he,Ze,kn,Je,Tn,gi,jn,En,Ai;return o=new De({}),ye=new De({}),Pe=new De({}),ke=new De({}),Te=new it({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)`}}),je=new De({}),Ee=new C({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:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.12.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.12.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.12.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.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.12.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.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L21"}}),Se=new C({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.12.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.12.0/en/api/pipelines/stable_diffusion/overview#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.12.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>
`}}),ne=new Et({props:{anchor:"diffusers.VersatileDiffusionPipeline.dual_guided.example",$$slots:{default:[Ro]},$$scope:{ctx:T}}}),Ce=new C({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.12.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.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L83",returnDescription:`
<p><a
  href="/docs/diffusers/v0.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),oe=new Et({props:{anchor:"diffusers.VersatileDiffusionPipeline.image_variation.example",$$slots:{default:[Ko]},$$scope:{ctx:T}}}),Le=new C({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.12.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.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py#L199",returnDescription:`
<p><a
  href="/docs/diffusers/v0.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),re=new Et({props:{anchor:"diffusers.VersatileDiffusionPipeline.text_to_image.example",$$slots:{default:[Qo]},$$scope:{ctx:T}}}),Ge=new De({}),Me=new C({props:{name:"class diffusers.VersatileDiffusionTextToImagePipeline",anchor:"diffusers.VersatileDiffusionTextToImagePipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"image_unet",val:": UNet2DConditionModel"},{name:"text_unet",val:": UNetFlatConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.12.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.12.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.12.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.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py#L33"}}),Ne=new C({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.12.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.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py#L341",returnDescription:`
<p><a
  href="/docs/diffusers/v0.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),de=new Et({props:{anchor:"diffusers.VersatileDiffusionTextToImagePipeline.__call__.example",$$slots:{default:[Xo]},$$scope:{ctx:T}}}),Ae=new C({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.VersatileDiffusionTextToImagePipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py#L100"}}),ze=new De({}),Fe=new C({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:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.12.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.12.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.12.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.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py#L34"}}),We=new C({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.12.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.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py#L259",returnDescription:`
<p><a
  href="/docs/diffusers/v0.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),ce=new Et({props:{anchor:"diffusers.VersatileDiffusionImageVariationPipeline.__call__.example",$$slots:{default:[Yo]},$$scope:{ctx:T}}}),He=new C({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.VersatileDiffusionImageVariationPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py#L76"}}),Ke=new De({}),Qe=new C({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:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.12.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.12.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.12.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.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py#L40"}}),Ye=new C({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.12.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.12.0/en/api/pipelines/stable_diffusion/overview#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.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py#L406",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>
`}}),me=new Et({props:{anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.__call__.example",$$slots:{default:[Zo]},$$scope:{ctx:T}}}),Ze=new C({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.VersatileDiffusionDualGuidedPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py#L149"}}),{c(){m=a("meta"),$=p(),_=a("h1"),u=a("a"),v=a("span"),b(o.$$.fragment),h=p(),St=a("span"),fa=r("VersatileDiffusion"),bi=p(),Y=a("p"),ca=r("VersatileDiffusion was proposed in "),we=a("a"),ua=r("Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),ga=r(" by Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, Humphrey Shi ."),Di=p(),at=a("p"),ma=r("The abstract of the paper is the following:"),wi=p(),st=a("p"),Ct=a("em"),ha=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."),yi=p(),F=a("h2"),Z=a("a"),Lt=a("span"),b(ye.$$.fragment),_a=p(),Gt=a("span"),va=r("Tips"),xi=p(),nt=a("ul"),xe=a("li"),ba=r("VersatileDiffusion is conceptually very similar as "),ot=a("a"),Da=r("Stable Diffusion"),wa=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."),Pi=p(),B=a("h3"),J=a("a"),Mt=a("span"),b(Pe.$$.fragment),ya=p(),Ot=a("span"),xa=r("*Run VersatileDiffusion*"),$i=p(),j=a("p"),Pa=r("You can both load the memory intensive \u201Call-in-one\u201D "),rt=a("a"),$a=r("VersatileDiffusionPipeline"),Va=r(` that can run all tasks
with the same class as shown in `),lt=a("a"),Ia=r("VersatileDiffusionPipeline.text_to_image()"),ka=r(", "),dt=a("a"),Ta=r("VersatileDiffusionPipeline.image_variation()"),ja=r(", and "),pt=a("a"),Ea=r("VersatileDiffusionPipeline.dual_guided()"),Vi=p(),ft=a("p"),Nt=a("strong"),qa=r("or"),Ii=p(),ct=a("p"),Sa=r("You can run the individual pipelines which are much more memory efficient:"),ki=p(),G=a("ul"),$e=a("li"),At=a("em"),Ca=r("Text-to-Image"),La=r(": "),ee=a("a"),Ga=r("VersatileDiffusionTextToImagePipeline."),Ut=a("strong"),Ma=r("call"),Oa=r("()"),Na=p(),Ve=a("li"),zt=a("em"),Aa=r("Image Variation"),Ua=r(": "),te=a("a"),za=r("VersatileDiffusionImageVariationPipeline."),Ft=a("strong"),Fa=r("call"),Ba=r("()"),Wa=p(),Ie=a("li"),Bt=a("em"),Ha=r("Dual Text and Image Guided Generation"),Ra=r(": "),ie=a("a"),Ka=r("VersatileDiffusionDualGuidedPipeline."),Wt=a("strong"),Qa=r("call"),Xa=r("()"),Ti=p(),W=a("h3"),ae=a("a"),Ht=a("span"),b(ke.$$.fragment),Ya=p(),Rt=a("span"),Za=r("*How to load and use different schedulers.*"),ji=p(),V=a("p"),Ja=r("The versatile diffusion pipelines uses "),ut=a("a"),es=r("DDIMScheduler"),ts=r(" scheduler by default. But "),Kt=a("code"),is=r("diffusers"),as=r(" provides many other schedulers that can be used with the alt diffusion pipeline such as "),gt=a("a"),ss=r("PNDMScheduler"),ns=r(", "),mt=a("a"),os=r("LMSDiscreteScheduler"),rs=r(", "),ht=a("a"),ls=r("EulerDiscreteScheduler"),ds=r(", "),_t=a("a"),ps=r("EulerAncestralDiscreteScheduler"),fs=r(` etc.
To use a different scheduler, you can either change it via the `),vt=a("a"),cs=r("ConfigMixin.from_config()"),us=r(" method or pass the "),Qt=a("code"),gs=r("scheduler"),ms=r(" argument to the "),Xt=a("code"),hs=r("from_pretrained"),_s=r(" method of the pipeline. For example, to use the "),bt=a("a"),vs=r("EulerDiscreteScheduler"),bs=r(", you can do the following:"),Ei=p(),b(Te.$$.fragment),qi=p(),H=a("h2"),se=a("a"),Yt=a("span"),b(je.$$.fragment),Ds=p(),Zt=a("span"),ws=r("VersatileDiffusionPipeline"),Si=p(),k=a("div"),b(Ee.$$.fragment),ys=p(),Jt=a("p"),xs=r("Pipeline for text-to-image generation using Stable Diffusion."),Ps=p(),qe=a("p"),$s=r("This model inherits from "),Dt=a("a"),Vs=r("DiffusionPipeline"),Is=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.)`),ks=p(),M=a("div"),b(Se.$$.fragment),Ts=p(),ei=a("p"),js=r("Function invoked when calling the pipeline for generation."),Es=p(),b(ne.$$.fragment),qs=p(),O=a("div"),b(Ce.$$.fragment),Ss=p(),ti=a("p"),Cs=r("Function invoked when calling the pipeline for generation."),Ls=p(),b(oe.$$.fragment),Gs=p(),N=a("div"),b(Le.$$.fragment),Ms=p(),ii=a("p"),Os=r("Function invoked when calling the pipeline for generation."),Ns=p(),b(re.$$.fragment),Ci=p(),R=a("h2"),le=a("a"),ai=a("span"),b(Ge.$$.fragment),As=p(),si=a("span"),Us=r("VersatileDiffusionTextToImagePipeline"),Li=p(),E=a("div"),b(Me.$$.fragment),zs=p(),Oe=a("p"),Fs=r("This model inherits from "),wt=a("a"),Bs=r("DiffusionPipeline"),Ws=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.)`),Hs=p(),A=a("div"),b(Ne.$$.fragment),Rs=p(),ni=a("p"),Ks=r("Function invoked when calling the pipeline for generation."),Qs=p(),b(de.$$.fragment),Xs=p(),pe=a("div"),b(Ae.$$.fragment),Ys=p(),Ue=a("p"),Zs=r(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),oi=a("code"),Js=r("torch.device('meta') and loaded to GPU only when their specific submodule has its "),en=r("forward` method called."),Gi=p(),K=a("h2"),fe=a("a"),ri=a("span"),b(ze.$$.fragment),tn=p(),li=a("span"),an=r("VersatileDiffusionImageVariationPipeline"),Mi=p(),q=a("div"),b(Fe.$$.fragment),sn=p(),Be=a("p"),nn=r("This model inherits from "),yt=a("a"),on=r("DiffusionPipeline"),rn=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.)`),ln=p(),U=a("div"),b(We.$$.fragment),dn=p(),di=a("p"),pn=r("Function invoked when calling the pipeline for generation."),fn=p(),b(ce.$$.fragment),cn=p(),ue=a("div"),b(He.$$.fragment),un=p(),Re=a("p"),gn=r(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),pi=a("code"),mn=r("torch.device('meta') and loaded to GPU only when their specific submodule has its "),hn=r("forward` method called."),Oi=p(),Q=a("h2"),ge=a("a"),fi=a("span"),b(Ke.$$.fragment),_n=p(),ci=a("span"),vn=r("VersatileDiffusionDualGuidedPipeline"),Ni=p(),S=a("div"),b(Qe.$$.fragment),bn=p(),Xe=a("p"),Dn=r("This model inherits from "),xt=a("a"),wn=r("DiffusionPipeline"),yn=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.)`),xn=p(),z=a("div"),b(Ye.$$.fragment),Pn=p(),ui=a("p"),$n=r("Function invoked when calling the pipeline for generation."),Vn=p(),b(me.$$.fragment),In=p(),he=a("div"),b(Ze.$$.fragment),kn=p(),Je=a("p"),Tn=r(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),gi=a("code"),jn=r("torch.device('meta') and loaded to GPU only when their specific submodule has its "),En=r("forward` method called."),this.h()},l(t){const c=Wo('[data-svelte="svelte-1phssyn"]',document.head);m=s(c,"META",{name:!0,content:!0}),c.forEach(i),$=f(t),_=s(t,"H1",{class:!0});var et=n(_);u=s(et,"A",{id:!0,class:!0,href:!0});var mi=n(u);v=s(mi,"SPAN",{});var hi=n(v);D(o.$$.fragment,hi),hi.forEach(i),mi.forEach(i),h=f(et),St=s(et,"SPAN",{});var _i=n(St);fa=l(_i,"VersatileDiffusion"),_i.forEach(i),et.forEach(i),bi=f(t),Y=s(t,"P",{});var tt=n(Y);ca=l(tt,"VersatileDiffusion was proposed in "),we=s(tt,"A",{href:!0,rel:!0});var vi=n(we);ua=l(vi,"Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),vi.forEach(i),ga=l(tt," by Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, Humphrey Shi ."),tt.forEach(i),Di=f(t),at=s(t,"P",{});var qn=n(at);ma=l(qn,"The abstract of the paper is the following:"),qn.forEach(i),wi=f(t),st=s(t,"P",{});var Sn=n(st);Ct=s(Sn,"EM",{});var Cn=n(Ct);ha=l(Cn,"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."),Cn.forEach(i),Sn.forEach(i),yi=f(t),F=s(t,"H2",{class:!0});var Ui=n(F);Z=s(Ui,"A",{id:!0,class:!0,href:!0});var Ln=n(Z);Lt=s(Ln,"SPAN",{});var Gn=n(Lt);D(ye.$$.fragment,Gn),Gn.forEach(i),Ln.forEach(i),_a=f(Ui),Gt=s(Ui,"SPAN",{});var Mn=n(Gt);va=l(Mn,"Tips"),Mn.forEach(i),Ui.forEach(i),xi=f(t),nt=s(t,"UL",{});var On=n(nt);xe=s(On,"LI",{});var zi=n(xe);ba=l(zi,"VersatileDiffusion is conceptually very similar as "),ot=s(zi,"A",{href:!0});var Nn=n(ot);Da=l(Nn,"Stable Diffusion"),Nn.forEach(i),wa=l(zi,",  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."),zi.forEach(i),On.forEach(i),Pi=f(t),B=s(t,"H3",{class:!0});var Fi=n(B);J=s(Fi,"A",{id:!0,class:!0,href:!0});var An=n(J);Mt=s(An,"SPAN",{});var Un=n(Mt);D(Pe.$$.fragment,Un),Un.forEach(i),An.forEach(i),ya=f(Fi),Ot=s(Fi,"SPAN",{});var zn=n(Ot);xa=l(zn,"*Run VersatileDiffusion*"),zn.forEach(i),Fi.forEach(i),$i=f(t),j=s(t,"P",{});var X=n(j);Pa=l(X,"You can both load the memory intensive \u201Call-in-one\u201D "),rt=s(X,"A",{href:!0});var Fn=n(rt);$a=l(Fn,"VersatileDiffusionPipeline"),Fn.forEach(i),Va=l(X,` that can run all tasks
with the same class as shown in `),lt=s(X,"A",{href:!0});var Bn=n(lt);Ia=l(Bn,"VersatileDiffusionPipeline.text_to_image()"),Bn.forEach(i),ka=l(X,", "),dt=s(X,"A",{href:!0});var Wn=n(dt);Ta=l(Wn,"VersatileDiffusionPipeline.image_variation()"),Wn.forEach(i),ja=l(X,", and "),pt=s(X,"A",{href:!0});var Hn=n(pt);Ea=l(Hn,"VersatileDiffusionPipeline.dual_guided()"),Hn.forEach(i),X.forEach(i),Vi=f(t),ft=s(t,"P",{});var Rn=n(ft);Nt=s(Rn,"STRONG",{});var Kn=n(Nt);qa=l(Kn,"or"),Kn.forEach(i),Rn.forEach(i),Ii=f(t),ct=s(t,"P",{});var Qn=n(ct);Sa=l(Qn,"You can run the individual pipelines which are much more memory efficient:"),Qn.forEach(i),ki=f(t),G=s(t,"UL",{});var Pt=n(G);$e=s(Pt,"LI",{});var Bi=n($e);At=s(Bi,"EM",{});var Xn=n(At);Ca=l(Xn,"Text-to-Image"),Xn.forEach(i),La=l(Bi,": "),ee=s(Bi,"A",{href:!0});var Wi=n(ee);Ga=l(Wi,"VersatileDiffusionTextToImagePipeline."),Ut=s(Wi,"STRONG",{});var Yn=n(Ut);Ma=l(Yn,"call"),Yn.forEach(i),Oa=l(Wi,"()"),Wi.forEach(i),Bi.forEach(i),Na=f(Pt),Ve=s(Pt,"LI",{});var Hi=n(Ve);zt=s(Hi,"EM",{});var Zn=n(zt);Aa=l(Zn,"Image Variation"),Zn.forEach(i),Ua=l(Hi,": "),te=s(Hi,"A",{href:!0});var Ri=n(te);za=l(Ri,"VersatileDiffusionImageVariationPipeline."),Ft=s(Ri,"STRONG",{});var Jn=n(Ft);Fa=l(Jn,"call"),Jn.forEach(i),Ba=l(Ri,"()"),Ri.forEach(i),Hi.forEach(i),Wa=f(Pt),Ie=s(Pt,"LI",{});var Ki=n(Ie);Bt=s(Ki,"EM",{});var eo=n(Bt);Ha=l(eo,"Dual Text and Image Guided Generation"),eo.forEach(i),Ra=l(Ki,": "),ie=s(Ki,"A",{href:!0});var Qi=n(ie);Ka=l(Qi,"VersatileDiffusionDualGuidedPipeline."),Wt=s(Qi,"STRONG",{});var to=n(Wt);Qa=l(to,"call"),to.forEach(i),Xa=l(Qi,"()"),Qi.forEach(i),Ki.forEach(i),Pt.forEach(i),Ti=f(t),W=s(t,"H3",{class:!0});var Xi=n(W);ae=s(Xi,"A",{id:!0,class:!0,href:!0});var io=n(ae);Ht=s(io,"SPAN",{});var ao=n(Ht);D(ke.$$.fragment,ao),ao.forEach(i),io.forEach(i),Ya=f(Xi),Rt=s(Xi,"SPAN",{});var so=n(Rt);Za=l(so,"*How to load and use different schedulers.*"),so.forEach(i),Xi.forEach(i),ji=f(t),V=s(t,"P",{});var I=n(V);Ja=l(I,"The versatile diffusion pipelines uses "),ut=s(I,"A",{href:!0});var no=n(ut);es=l(no,"DDIMScheduler"),no.forEach(i),ts=l(I," scheduler by default. But "),Kt=s(I,"CODE",{});var oo=n(Kt);is=l(oo,"diffusers"),oo.forEach(i),as=l(I," provides many other schedulers that can be used with the alt diffusion pipeline such as "),gt=s(I,"A",{href:!0});var ro=n(gt);ss=l(ro,"PNDMScheduler"),ro.forEach(i),ns=l(I,", "),mt=s(I,"A",{href:!0});var lo=n(mt);os=l(lo,"LMSDiscreteScheduler"),lo.forEach(i),rs=l(I,", "),ht=s(I,"A",{href:!0});var po=n(ht);ls=l(po,"EulerDiscreteScheduler"),po.forEach(i),ds=l(I,", "),_t=s(I,"A",{href:!0});var fo=n(_t);ps=l(fo,"EulerAncestralDiscreteScheduler"),fo.forEach(i),fs=l(I,` etc.
To use a different scheduler, you can either change it via the `),vt=s(I,"A",{href:!0});var co=n(vt);cs=l(co,"ConfigMixin.from_config()"),co.forEach(i),us=l(I," method or pass the "),Qt=s(I,"CODE",{});var uo=n(Qt);gs=l(uo,"scheduler"),uo.forEach(i),ms=l(I," argument to the "),Xt=s(I,"CODE",{});var go=n(Xt);hs=l(go,"from_pretrained"),go.forEach(i),_s=l(I," method of the pipeline. For example, to use the "),bt=s(I,"A",{href:!0});var mo=n(bt);vs=l(mo,"EulerDiscreteScheduler"),mo.forEach(i),bs=l(I,", you can do the following:"),I.forEach(i),Ei=f(t),D(Te.$$.fragment,t),qi=f(t),H=s(t,"H2",{class:!0});var Yi=n(H);se=s(Yi,"A",{id:!0,class:!0,href:!0});var ho=n(se);Yt=s(ho,"SPAN",{});var _o=n(Yt);D(je.$$.fragment,_o),_o.forEach(i),ho.forEach(i),Ds=f(Yi),Zt=s(Yi,"SPAN",{});var vo=n(Zt);ws=l(vo,"VersatileDiffusionPipeline"),vo.forEach(i),Yi.forEach(i),Si=f(t),k=s(t,"DIV",{class:!0});var L=n(k);D(Ee.$$.fragment,L),ys=f(L),Jt=s(L,"P",{});var bo=n(Jt);xs=l(bo,"Pipeline for text-to-image generation using Stable Diffusion."),bo.forEach(i),Ps=f(L),qe=s(L,"P",{});var Zi=n(qe);$s=l(Zi,"This model inherits from "),Dt=s(Zi,"A",{href:!0});var Do=n(Dt);Vs=l(Do,"DiffusionPipeline"),Do.forEach(i),Is=l(Zi,`. 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.)`),Zi.forEach(i),ks=f(L),M=s(L,"DIV",{class:!0});var $t=n(M);D(Se.$$.fragment,$t),Ts=f($t),ei=s($t,"P",{});var wo=n(ei);js=l(wo,"Function invoked when calling the pipeline for generation."),wo.forEach(i),Es=f($t),D(ne.$$.fragment,$t),$t.forEach(i),qs=f(L),O=s(L,"DIV",{class:!0});var Vt=n(O);D(Ce.$$.fragment,Vt),Ss=f(Vt),ti=s(Vt,"P",{});var yo=n(ti);Cs=l(yo,"Function invoked when calling the pipeline for generation."),yo.forEach(i),Ls=f(Vt),D(oe.$$.fragment,Vt),Vt.forEach(i),Gs=f(L),N=s(L,"DIV",{class:!0});var It=n(N);D(Le.$$.fragment,It),Ms=f(It),ii=s(It,"P",{});var xo=n(ii);Os=l(xo,"Function invoked when calling the pipeline for generation."),xo.forEach(i),Ns=f(It),D(re.$$.fragment,It),It.forEach(i),L.forEach(i),Ci=f(t),R=s(t,"H2",{class:!0});var Ji=n(R);le=s(Ji,"A",{id:!0,class:!0,href:!0});var Po=n(le);ai=s(Po,"SPAN",{});var $o=n(ai);D(Ge.$$.fragment,$o),$o.forEach(i),Po.forEach(i),As=f(Ji),si=s(Ji,"SPAN",{});var Vo=n(si);Us=l(Vo,"VersatileDiffusionTextToImagePipeline"),Vo.forEach(i),Ji.forEach(i),Li=f(t),E=s(t,"DIV",{class:!0});var _e=n(E);D(Me.$$.fragment,_e),zs=f(_e),Oe=s(_e,"P",{});var ea=n(Oe);Fs=l(ea,"This model inherits from "),wt=s(ea,"A",{href:!0});var Io=n(wt);Bs=l(Io,"DiffusionPipeline"),Io.forEach(i),Ws=l(ea,`. 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.)`),ea.forEach(i),Hs=f(_e),A=s(_e,"DIV",{class:!0});var kt=n(A);D(Ne.$$.fragment,kt),Rs=f(kt),ni=s(kt,"P",{});var ko=n(ni);Ks=l(ko,"Function invoked when calling the pipeline for generation."),ko.forEach(i),Qs=f(kt),D(de.$$.fragment,kt),kt.forEach(i),Xs=f(_e),pe=s(_e,"DIV",{class:!0});var ta=n(pe);D(Ae.$$.fragment,ta),Ys=f(ta),Ue=s(ta,"P",{});var ia=n(Ue);Zs=l(ia,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),oi=s(ia,"CODE",{});var To=n(oi);Js=l(To,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),To.forEach(i),en=l(ia,"forward` method called."),ia.forEach(i),ta.forEach(i),_e.forEach(i),Gi=f(t),K=s(t,"H2",{class:!0});var aa=n(K);fe=s(aa,"A",{id:!0,class:!0,href:!0});var jo=n(fe);ri=s(jo,"SPAN",{});var Eo=n(ri);D(ze.$$.fragment,Eo),Eo.forEach(i),jo.forEach(i),tn=f(aa),li=s(aa,"SPAN",{});var qo=n(li);an=l(qo,"VersatileDiffusionImageVariationPipeline"),qo.forEach(i),aa.forEach(i),Mi=f(t),q=s(t,"DIV",{class:!0});var ve=n(q);D(Fe.$$.fragment,ve),sn=f(ve),Be=s(ve,"P",{});var sa=n(Be);nn=l(sa,"This model inherits from "),yt=s(sa,"A",{href:!0});var So=n(yt);on=l(So,"DiffusionPipeline"),So.forEach(i),rn=l(sa,`. 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.)`),sa.forEach(i),ln=f(ve),U=s(ve,"DIV",{class:!0});var Tt=n(U);D(We.$$.fragment,Tt),dn=f(Tt),di=s(Tt,"P",{});var Co=n(di);pn=l(Co,"Function invoked when calling the pipeline for generation."),Co.forEach(i),fn=f(Tt),D(ce.$$.fragment,Tt),Tt.forEach(i),cn=f(ve),ue=s(ve,"DIV",{class:!0});var na=n(ue);D(He.$$.fragment,na),un=f(na),Re=s(na,"P",{});var oa=n(Re);gn=l(oa,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),pi=s(oa,"CODE",{});var Lo=n(pi);mn=l(Lo,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),Lo.forEach(i),hn=l(oa,"forward` method called."),oa.forEach(i),na.forEach(i),ve.forEach(i),Oi=f(t),Q=s(t,"H2",{class:!0});var ra=n(Q);ge=s(ra,"A",{id:!0,class:!0,href:!0});var Go=n(ge);fi=s(Go,"SPAN",{});var Mo=n(fi);D(Ke.$$.fragment,Mo),Mo.forEach(i),Go.forEach(i),_n=f(ra),ci=s(ra,"SPAN",{});var Oo=n(ci);vn=l(Oo,"VersatileDiffusionDualGuidedPipeline"),Oo.forEach(i),ra.forEach(i),Ni=f(t),S=s(t,"DIV",{class:!0});var be=n(S);D(Qe.$$.fragment,be),bn=f(be),Xe=s(be,"P",{});var la=n(Xe);Dn=l(la,"This model inherits from "),xt=s(la,"A",{href:!0});var No=n(xt);wn=l(No,"DiffusionPipeline"),No.forEach(i),yn=l(la,`. 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.forEach(i),xn=f(be),z=s(be,"DIV",{class:!0});var jt=n(z);D(Ye.$$.fragment,jt),Pn=f(jt),ui=s(jt,"P",{});var Ao=n(ui);$n=l(Ao,"Function invoked when calling the pipeline for generation."),Ao.forEach(i),Vn=f(jt),D(me.$$.fragment,jt),jt.forEach(i),In=f(be),he=s(be,"DIV",{class:!0});var da=n(he);D(Ze.$$.fragment,da),kn=f(da),Je=s(da,"P",{});var pa=n(Je);Tn=l(pa,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),gi=s(pa,"CODE",{});var Uo=n(gi);jn=l(Uo,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),Uo.forEach(i),En=l(pa,"forward` method called."),pa.forEach(i),da.forEach(i),be.forEach(i),this.h()},h(){d(m,"name","hf:doc:metadata"),d(m,"content",JSON.stringify(er)),d(u,"id","versatilediffusion"),d(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"),d(u,"href","#versatilediffusion"),d(_,"class","relative group"),d(we,"href","https://arxiv.org/abs/2211.08332"),d(we,"rel","nofollow"),d(Z,"id","tips"),d(Z,"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"),d(Z,"href","#tips"),d(F,"class","relative group"),d(ot,"href","./api/pipelines/stable_diffusion/overview"),d(J,"id","run-versatilediffusion"),d(J,"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"),d(J,"href","#run-versatilediffusion"),d(B,"class","relative group"),d(rt,"href","/docs/diffusers/v0.12.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline"),d(lt,"href","/docs/diffusers/v0.12.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline.text_to_image"),d(dt,"href","/docs/diffusers/v0.12.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline.image_variation"),d(pt,"href","/docs/diffusers/v0.12.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionPipeline.dual_guided"),d(ee,"href","/docs/diffusers/v0.12.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionTextToImagePipeline.__call__"),d(te,"href","/docs/diffusers/v0.12.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionImageVariationPipeline.__call__"),d(ie,"href","/docs/diffusers/v0.12.0/en/api/pipelines/versatile_diffusion#diffusers.VersatileDiffusionDualGuidedPipeline.__call__"),d(ae,"id","how-to-load-and-use-different-schedulers"),d(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"),d(ae,"href","#how-to-load-and-use-different-schedulers"),d(W,"class","relative group"),d(ut,"href","/docs/diffusers/v0.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler"),d(gt,"href","/docs/diffusers/v0.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),d(mt,"href","/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler"),d(ht,"href","/docs/diffusers/v0.12.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),d(_t,"href","/docs/diffusers/v0.12.0/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler"),d(vt,"href","/docs/diffusers/v0.12.0/en/api/configuration#diffusers.ConfigMixin.from_config"),d(bt,"href","/docs/diffusers/v0.12.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),d(se,"id","diffusers.VersatileDiffusionPipeline"),d(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(se,"href","#diffusers.VersatileDiffusionPipeline"),d(H,"class","relative group"),d(Dt,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"id","diffusers.VersatileDiffusionTextToImagePipeline"),d(le,"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"),d(le,"href","#diffusers.VersatileDiffusionTextToImagePipeline"),d(R,"class","relative group"),d(wt,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fe,"id","diffusers.VersatileDiffusionImageVariationPipeline"),d(fe,"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"),d(fe,"href","#diffusers.VersatileDiffusionImageVariationPipeline"),d(K,"class","relative group"),d(yt,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ge,"id","diffusers.VersatileDiffusionDualGuidedPipeline"),d(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"),d(ge,"href","#diffusers.VersatileDiffusionDualGuidedPipeline"),d(Q,"class","relative group"),d(xt,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(S,"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,c){e(document.head,m),g(t,$,c),g(t,_,c),e(_,u),e(u,v),w(o,v,null),e(_,h),e(_,St),e(St,fa),g(t,bi,c),g(t,Y,c),e(Y,ca),e(Y,we),e(we,ua),e(Y,ga),g(t,Di,c),g(t,at,c),e(at,ma),g(t,wi,c),g(t,st,c),e(st,Ct),e(Ct,ha),g(t,yi,c),g(t,F,c),e(F,Z),e(Z,Lt),w(ye,Lt,null),e(F,_a),e(F,Gt),e(Gt,va),g(t,xi,c),g(t,nt,c),e(nt,xe),e(xe,ba),e(xe,ot),e(ot,Da),e(xe,wa),g(t,Pi,c),g(t,B,c),e(B,J),e(J,Mt),w(Pe,Mt,null),e(B,ya),e(B,Ot),e(Ot,xa),g(t,$i,c),g(t,j,c),e(j,Pa),e(j,rt),e(rt,$a),e(j,Va),e(j,lt),e(lt,Ia),e(j,ka),e(j,dt),e(dt,Ta),e(j,ja),e(j,pt),e(pt,Ea),g(t,Vi,c),g(t,ft,c),e(ft,Nt),e(Nt,qa),g(t,Ii,c),g(t,ct,c),e(ct,Sa),g(t,ki,c),g(t,G,c),e(G,$e),e($e,At),e(At,Ca),e($e,La),e($e,ee),e(ee,Ga),e(ee,Ut),e(Ut,Ma),e(ee,Oa),e(G,Na),e(G,Ve),e(Ve,zt),e(zt,Aa),e(Ve,Ua),e(Ve,te),e(te,za),e(te,Ft),e(Ft,Fa),e(te,Ba),e(G,Wa),e(G,Ie),e(Ie,Bt),e(Bt,Ha),e(Ie,Ra),e(Ie,ie),e(ie,Ka),e(ie,Wt),e(Wt,Qa),e(ie,Xa),g(t,Ti,c),g(t,W,c),e(W,ae),e(ae,Ht),w(ke,Ht,null),e(W,Ya),e(W,Rt),e(Rt,Za),g(t,ji,c),g(t,V,c),e(V,Ja),e(V,ut),e(ut,es),e(V,ts),e(V,Kt),e(Kt,is),e(V,as),e(V,gt),e(gt,ss),e(V,ns),e(V,mt),e(mt,os),e(V,rs),e(V,ht),e(ht,ls),e(V,ds),e(V,_t),e(_t,ps),e(V,fs),e(V,vt),e(vt,cs),e(V,us),e(V,Qt),e(Qt,gs),e(V,ms),e(V,Xt),e(Xt,hs),e(V,_s),e(V,bt),e(bt,vs),e(V,bs),g(t,Ei,c),w(Te,t,c),g(t,qi,c),g(t,H,c),e(H,se),e(se,Yt),w(je,Yt,null),e(H,Ds),e(H,Zt),e(Zt,ws),g(t,Si,c),g(t,k,c),w(Ee,k,null),e(k,ys),e(k,Jt),e(Jt,xs),e(k,Ps),e(k,qe),e(qe,$s),e(qe,Dt),e(Dt,Vs),e(qe,Is),e(k,ks),e(k,M),w(Se,M,null),e(M,Ts),e(M,ei),e(ei,js),e(M,Es),w(ne,M,null),e(k,qs),e(k,O),w(Ce,O,null),e(O,Ss),e(O,ti),e(ti,Cs),e(O,Ls),w(oe,O,null),e(k,Gs),e(k,N),w(Le,N,null),e(N,Ms),e(N,ii),e(ii,Os),e(N,Ns),w(re,N,null),g(t,Ci,c),g(t,R,c),e(R,le),e(le,ai),w(Ge,ai,null),e(R,As),e(R,si),e(si,Us),g(t,Li,c),g(t,E,c),w(Me,E,null),e(E,zs),e(E,Oe),e(Oe,Fs),e(Oe,wt),e(wt,Bs),e(Oe,Ws),e(E,Hs),e(E,A),w(Ne,A,null),e(A,Rs),e(A,ni),e(ni,Ks),e(A,Qs),w(de,A,null),e(E,Xs),e(E,pe),w(Ae,pe,null),e(pe,Ys),e(pe,Ue),e(Ue,Zs),e(Ue,oi),e(oi,Js),e(Ue,en),g(t,Gi,c),g(t,K,c),e(K,fe),e(fe,ri),w(ze,ri,null),e(K,tn),e(K,li),e(li,an),g(t,Mi,c),g(t,q,c),w(Fe,q,null),e(q,sn),e(q,Be),e(Be,nn),e(Be,yt),e(yt,on),e(Be,rn),e(q,ln),e(q,U),w(We,U,null),e(U,dn),e(U,di),e(di,pn),e(U,fn),w(ce,U,null),e(q,cn),e(q,ue),w(He,ue,null),e(ue,un),e(ue,Re),e(Re,gn),e(Re,pi),e(pi,mn),e(Re,hn),g(t,Oi,c),g(t,Q,c),e(Q,ge),e(ge,fi),w(Ke,fi,null),e(Q,_n),e(Q,ci),e(ci,vn),g(t,Ni,c),g(t,S,c),w(Qe,S,null),e(S,bn),e(S,Xe),e(Xe,Dn),e(Xe,xt),e(xt,wn),e(Xe,yn),e(S,xn),e(S,z),w(Ye,z,null),e(z,Pn),e(z,ui),e(ui,$n),e(z,Vn),w(me,z,null),e(S,In),e(S,he),w(Ze,he,null),e(he,kn),e(he,Je),e(Je,Tn),e(Je,gi),e(gi,jn),e(Je,En),Ai=!0},p(t,[c]){const et={};c&2&&(et.$$scope={dirty:c,ctx:t}),ne.$set(et);const mi={};c&2&&(mi.$$scope={dirty:c,ctx:t}),oe.$set(mi);const hi={};c&2&&(hi.$$scope={dirty:c,ctx:t}),re.$set(hi);const _i={};c&2&&(_i.$$scope={dirty:c,ctx:t}),de.$set(_i);const tt={};c&2&&(tt.$$scope={dirty:c,ctx:t}),ce.$set(tt);const vi={};c&2&&(vi.$$scope={dirty:c,ctx:t}),me.$set(vi)},i(t){Ai||(y(o.$$.fragment,t),y(ye.$$.fragment,t),y(Pe.$$.fragment,t),y(ke.$$.fragment,t),y(Te.$$.fragment,t),y(je.$$.fragment,t),y(Ee.$$.fragment,t),y(Se.$$.fragment,t),y(ne.$$.fragment,t),y(Ce.$$.fragment,t),y(oe.$$.fragment,t),y(Le.$$.fragment,t),y(re.$$.fragment,t),y(Ge.$$.fragment,t),y(Me.$$.fragment,t),y(Ne.$$.fragment,t),y(de.$$.fragment,t),y(Ae.$$.fragment,t),y(ze.$$.fragment,t),y(Fe.$$.fragment,t),y(We.$$.fragment,t),y(ce.$$.fragment,t),y(He.$$.fragment,t),y(Ke.$$.fragment,t),y(Qe.$$.fragment,t),y(Ye.$$.fragment,t),y(me.$$.fragment,t),y(Ze.$$.fragment,t),Ai=!0)},o(t){x(o.$$.fragment,t),x(ye.$$.fragment,t),x(Pe.$$.fragment,t),x(ke.$$.fragment,t),x(Te.$$.fragment,t),x(je.$$.fragment,t),x(Ee.$$.fragment,t),x(Se.$$.fragment,t),x(ne.$$.fragment,t),x(Ce.$$.fragment,t),x(oe.$$.fragment,t),x(Le.$$.fragment,t),x(re.$$.fragment,t),x(Ge.$$.fragment,t),x(Me.$$.fragment,t),x(Ne.$$.fragment,t),x(de.$$.fragment,t),x(Ae.$$.fragment,t),x(ze.$$.fragment,t),x(Fe.$$.fragment,t),x(We.$$.fragment,t),x(ce.$$.fragment,t),x(He.$$.fragment,t),x(Ke.$$.fragment,t),x(Qe.$$.fragment,t),x(Ye.$$.fragment,t),x(me.$$.fragment,t),x(Ze.$$.fragment,t),Ai=!1},d(t){i(m),t&&i($),t&&i(_),P(o),t&&i(bi),t&&i(Y),t&&i(Di),t&&i(at),t&&i(wi),t&&i(st),t&&i(yi),t&&i(F),P(ye),t&&i(xi),t&&i(nt),t&&i(Pi),t&&i(B),P(Pe),t&&i($i),t&&i(j),t&&i(Vi),t&&i(ft),t&&i(Ii),t&&i(ct),t&&i(ki),t&&i(G),t&&i(Ti),t&&i(W),P(ke),t&&i(ji),t&&i(V),t&&i(Ei),P(Te,t),t&&i(qi),t&&i(H),P(je),t&&i(Si),t&&i(k),P(Ee),P(Se),P(ne),P(Ce),P(oe),P(Le),P(re),t&&i(Ci),t&&i(R),P(Ge),t&&i(Li),t&&i(E),P(Me),P(Ne),P(de),P(Ae),t&&i(Gi),t&&i(K),P(ze),t&&i(Mi),t&&i(q),P(Fe),P(We),P(ce),P(He),t&&i(Oi),t&&i(Q),P(Ke),t&&i(Ni),t&&i(S),P(Qe),P(Ye),P(me),P(Ze)}}}const er={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 tr(T){return Ho(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rr extends zo{constructor(m){super();Fo(this,m,tr,Jo,Bo,{})}}export{rr as default,er as metadata};
