import{S as us,i as hs,s as ms,e as o,k as c,w as g,t as s,M as fs,c as r,d as n,m as p,a as i,x as _,h as a,b as u,N as ds,G as t,g as d,y as v,q as b,o as y,B as w,v as gs,L as zr}from"../../../chunks/vendor-hf-doc-builder.js";import{D as fe}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as rt}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as H}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Hr}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function _s(z){let f,J,M,m,T;return m=new rt({props:{code:"ZnJvbSUyMGRpZmZ1c2lvbnMlMjBpbXBvcnQlMjBXdWVyc3RjaGVuQ29tYmluZWRQaXBlbGluZSUwQSUwQXBpcGUlMjAlM0QlMjBXdWVyc3RjaGVuQ29tYmluZWRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyd2FycC1haSUyRld1ZXJzdGNoZW4lMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUwQSUyMCUyMCUyMCUyMCUyMmN1ZGElMjIlMEEpJTBBcHJvbXB0JTIwJTNEJTIwJTIyYW4lMjBpbWFnZSUyMG9mJTIwYSUyMHNoaWJhJTIwaW51JTJDJTIwZG9ubmluZyUyMGElMjBzcGFjZXN1aXQlMjBhbmQlMjBoZWxtZXQlMjIlMEFpbWFnZXMlMjAlM0QlMjBwaXBlKHByb21wdCUzRHByb21wdCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusions <span class="hljs-keyword">import</span> WuerstchenCombinedPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = WuerstchenCombinedPipeline.from_pretrained(<span class="hljs-string">&quot;warp-ai/Wuerstchen&quot;</span>, torch_dtype=torch.float16).to(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cuda&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;an image of a shiba inu, donning a spacesuit and helmet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipe(prompt=prompt)`}}),{c(){f=o("p"),J=s("Examples:"),M=c(),g(m.$$.fragment)},l(h){f=r(h,"P",{});var W=i(f);J=a(W,"Examples:"),W.forEach(n),M=p(h),_(m.$$.fragment,h)},m(h,W){d(h,f,W),t(f,J),d(h,M,W),v(m,h,W),T=!0},p:zr,i(h){T||(b(m.$$.fragment,h),T=!0)},o(h){y(m.$$.fragment,h),T=!1},d(h){h&&n(f),h&&n(M),w(m,h)}}}function vs(z){let f,J,M,m,T;return m=new rt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwV3VlcnN0Y2hlblByaW9yUGlwZWxpbmUlMkMlMjBXdWVyc3RjaGVuRGVjb2RlclBpcGVsaW5lJTBBJTBBcHJpb3JfcGlwZSUyMCUzRCUyMFd1ZXJzdGNoZW5QcmlvclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ3YXJwLWFpJTJGd3VlcnN0Y2hlbi1wcmlvciUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEFnZW5fcGlwZSUyMCUzRCUyMFd1ZXJzdGNoZW5EZWNvZGVyUGlwZWxpbmUuZnJvbV9wcmV0cmFpbiglMjJ3YXJwLWFpJTJGd3VlcnN0Y2hlbiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTBBJTIwJTIwJTIwJTIwJTIyY3VkYSUyMiUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhbiUyMGltYWdlJTIwb2YlMjBhJTIwc2hpYmElMjBpbnUlMkMlMjBkb25uaW5nJTIwYSUyMHNwYWNlc3VpdCUyMGFuZCUyMGhlbG1ldCUyMiUwQXByaW9yX291dHB1dCUyMCUzRCUyMHBpcGUocHJvbXB0KSUwQWltYWdlcyUyMCUzRCUyMGdlbl9waXBlKHByaW9yX291dHB1dC5pbWFnZV9lbWJlZGRpbmdzJTJDJTIwcHJvbXB0JTNEcHJvbXB0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> WuerstchenPriorPipeline, WuerstchenDecoderPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>prior_pipe = WuerstchenPriorPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;warp-ai/wuerstchen-prior&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>gen_pipe = WuerstchenDecoderPipeline.from_pretrain(<span class="hljs-string">&quot;warp-ai/wuerstchen&quot;</span>, torch_dtype=torch.float16).to(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cuda&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;an image of a shiba inu, donning a spacesuit and helmet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prior_output = pipe(prompt)
<span class="hljs-meta">&gt;&gt;&gt; </span>images = gen_pipe(prior_output.image_embeddings, prompt=prompt)`}}),{c(){f=o("p"),J=s("Examples:"),M=c(),g(m.$$.fragment)},l(h){f=r(h,"P",{});var W=i(f);J=a(W,"Examples:"),W.forEach(n),M=p(h),_(m.$$.fragment,h)},m(h,W){d(h,f,W),t(f,J),d(h,M,W),v(m,h,W),T=!0},p:zr,i(h){T||(b(m.$$.fragment,h),T=!0)},o(h){y(m.$$.fragment,h),T=!1},d(h){h&&n(f),h&&n(M),w(m,h)}}}function bs(z){let f,J,M,m,T;return m=new rt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwV3VlcnN0Y2hlblByaW9yUGlwZWxpbmUlMkMlMjBXdWVyc3RjaGVuRGVjb2RlclBpcGVsaW5lJTBBJTBBcHJpb3JfcGlwZSUyMCUzRCUyMFd1ZXJzdGNoZW5QcmlvclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ3YXJwLWFpJTJGd3VlcnN0Y2hlbi1wcmlvciUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEFnZW5fcGlwZSUyMCUzRCUyMFd1ZXJzdGNoZW5EZWNvZGVyUGlwZWxpbmUuZnJvbV9wcmV0cmFpbiglMjJ3YXJwLWFpJTJGd3VlcnN0Y2hlbiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTBBJTIwJTIwJTIwJTIwJTIyY3VkYSUyMiUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhbiUyMGltYWdlJTIwb2YlMjBhJTIwc2hpYmElMjBpbnUlMkMlMjBkb25uaW5nJTIwYSUyMHNwYWNlc3VpdCUyMGFuZCUyMGhlbG1ldCUyMiUwQXByaW9yX291dHB1dCUyMCUzRCUyMHBpcGUocHJvbXB0KSUwQWltYWdlcyUyMCUzRCUyMGdlbl9waXBlKHByaW9yX291dHB1dC5pbWFnZV9lbWJlZGRpbmdzJTJDJTIwcHJvbXB0JTNEcHJvbXB0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> WuerstchenPriorPipeline, WuerstchenDecoderPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>prior_pipe = WuerstchenPriorPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;warp-ai/wuerstchen-prior&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>gen_pipe = WuerstchenDecoderPipeline.from_pretrain(<span class="hljs-string">&quot;warp-ai/wuerstchen&quot;</span>, torch_dtype=torch.float16).to(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cuda&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;an image of a shiba inu, donning a spacesuit and helmet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prior_output = pipe(prompt)
<span class="hljs-meta">&gt;&gt;&gt; </span>images = gen_pipe(prior_output.image_embeddings, prompt=prompt)`}}),{c(){f=o("p"),J=s("Examples:"),M=c(),g(m.$$.fragment)},l(h){f=r(h,"P",{});var W=i(f);J=a(W,"Examples:"),W.forEach(n),M=p(h),_(m.$$.fragment,h)},m(h,W){d(h,f,W),t(f,J),d(h,M,W),v(m,h,W),T=!0},p:zr,i(h){T||(b(m.$$.fragment,h),T=!0)},o(h){y(m.$$.fragment,h),T=!1},d(h){h&&n(f),h&&n(M),w(m,h)}}}function ys(z){let f,J,M,m,T,h,W,it,Rn,en,Qe,Yr,tn,ge,_e,Fn,Ln,nn,qe,Hn,on,Re,st,zn,rn,N,Y,at,ve,Yn,lt,On,sn,Fe,Kn,an,I,ct,eo,to,pt,no,oo,dt,ro,io,ut,so,ln,Le,ao,cn,G,ht,lo,co,mt,po,uo,ft,ho,pn,He,mo,dn,be,Or,un,A,O,gt,ye,fo,_t,go,hn,K,_o,vt,vo,bo,mn,we,fn,C,yo,bt,wo,Mo,yt,Wo,To,Me,Po,Jo,gn,We,_n,X,ee,wt,Te,Uo,Mt,xo,vn,Pe,bn,S,te,Wt,Je,$o,Tt,Eo,yn,$,Pt,jo,Io,ze,Jt,Co,Go,ko,Ut,Bo,Zo,xt,Do,Vo,$t,No,wn,ne,Ao,Ue,Xo,So,Mn,Q,oe,Et,xe,Qo,jt,qo,Wn,x,$e,Ro,It,Fo,Lo,Ee,Ho,Ye,zo,Yo,Oo,k,je,Ko,Ct,er,tr,re,nr,ie,Ie,or,P,rr,Gt,ir,sr,kt,ar,lr,Bt,cr,pr,Zt,dr,ur,Dt,hr,mr,Vt,fr,gr,Nt,_r,vr,Tn,q,se,At,Ce,br,Xt,yr,Pn,E,Ge,wr,St,Mr,Wr,ke,Tr,Oe,Pr,Jr,Ur,B,Be,xr,Qt,$r,Er,ae,Jn,R,le,qt,Ze,jr,Rt,Ir,Un,F,De,Cr,Ft,Gr,xn,L,ce,Lt,Ve,kr,Ht,Br,$n,j,Ne,Zr,zt,Dr,Vr,Ae,Nr,Ke,Ar,Xr,Sr,Z,Xe,Qr,Yt,qr,Rr,pe,En;return h=new H({}),ve=new H({}),ye=new H({}),we=new rt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQWZyb20lMjBkaWZmdXNlcnMucGlwZWxpbmVzLnd1ZXJzdGNoZW4lMjBpbXBvcnQlMjBERUZBVUxUX1NUQUdFX0NfVElNRVNURVBTJTBBJTBBcGlwZSUyMCUzRCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UuZnJvbV9wcmV0cmFpbmVkKCUyMndhcnAtYWklMkZ3dWVyc3RjaGVuJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQSUwQWNhcHRpb24lMjAlM0QlMjAlMjJBbnRocm9wb21vcnBoaWMlMjBjYXQlMjBkcmVzc2VkJTIwYXMlMjBhJTIwZmlyZSUyMGZpZ2h0ZXIlMjIlMEFpbWFnZXMlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMGNhcHRpb24lMkMlMjAlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjBoZWlnaHQlM0QxNTM2JTJDJTBBJTIwJTIwJTIwJTIwcHJpb3JfdGltZXN0ZXBzJTNEREVGQVVMVF9TVEFHRV9DX1RJTUVTVEVQUyUyQyUwQSUyMCUyMCUyMCUyMHByaW9yX2d1aWRhbmNlX3NjYWxlJTNENC4wJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ltYWdlc19wZXJfcHJvbXB0JTNEMiUyQyUwQSkuaW1hZ2Vz",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">from</span> diffusers.pipelines.wuerstchen <span class="hljs-keyword">import</span> DEFAULT_STAGE_C_TIMESTEPS

pipe = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;warp-ai/wuerstchen&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

caption = <span class="hljs-string">&quot;Anthropomorphic cat dressed as a fire fighter&quot;</span>
images = pipe(
    caption, 
    width=<span class="hljs-number">1024</span>,
    height=<span class="hljs-number">1536</span>,
    prior_timesteps=DEFAULT_STAGE_C_TIMESTEPS,
    prior_guidance_scale=<span class="hljs-number">4.0</span>,
    num_images_per_prompt=<span class="hljs-number">2</span>,
).images`}}),We=new rt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwV3VlcnN0Y2hlbkRlY29kZXJQaXBlbGluZSUyQyUyMFd1ZXJzdGNoZW5QcmlvclBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy5waXBlbGluZXMud3VlcnN0Y2hlbiUyMGltcG9ydCUyMERFRkFVTFRfU1RBR0VfQ19USU1FU1RFUFMlMEElMEFkZXZpY2UlMjAlM0QlMjAlMjJjdWRhJTIyJTBBZHR5cGUlMjAlM0QlMjB0b3JjaC5mbG9hdDE2JTBBbnVtX2ltYWdlc19wZXJfcHJvbXB0JTIwJTNEJTIwMiUwQSUwQXByaW9yX3BpcGVsaW5lJTIwJTNEJTIwV3VlcnN0Y2hlblByaW9yUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMndhcnAtYWklMkZ3dWVyc3RjaGVuLXByaW9yJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0RkdHlwZSUwQSkudG8oZGV2aWNlKSUwQWRlY29kZXJfcGlwZWxpbmUlMjAlM0QlMjBXdWVyc3RjaGVuRGVjb2RlclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ3YXJwLWFpJTJGd3VlcnN0Y2hlbiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEZHR5cGUlMEEpLnRvKGRldmljZSklMEElMEFjYXB0aW9uJTIwJTNEJTIwJTIyQW50aHJvcG9tb3JwaGljJTIwY2F0JTIwZHJlc3NlZCUyMGFzJTIwYSUyMGZpcmUlMjBmaWdodGVyJTIyJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTIyJTIyJTBBJTBBcHJpb3Jfb3V0cHV0JTIwJTNEJTIwcHJpb3JfcGlwZWxpbmUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEY2FwdGlvbiUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDE1MzYlMkMlMEElMjAlMjAlMjAlMjB0aW1lc3RlcHMlM0RERUZBVUxUX1NUQUdFX0NfVElNRVNURVBTJTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q0LjAlMkMlMEElMjAlMjAlMjAlMjBudW1faW1hZ2VzX3Blcl9wcm9tcHQlM0RudW1faW1hZ2VzX3Blcl9wcm9tcHQlMkMlMEEpJTBBZGVjb2Rlcl9vdXRwdXQlMjAlM0QlMjBkZWNvZGVyX3BpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMGltYWdlX2VtYmVkZGluZ3MlM0Rwcmlvcl9vdXRwdXQuaW1hZ2VfZW1iZWRkaW5ncyUyQyUwQSUyMCUyMCUyMCUyMHByb21wdCUzRGNhcHRpb24lMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBudW1faW1hZ2VzX3Blcl9wcm9tcHQlM0RudW1faW1hZ2VzX3Blcl9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDAuMCUyQyUwQSUyMCUyMCUyMCUyMG91dHB1dF90eXBlJTNEJTIycGlsJTIyJTJDJTBBKS5pbWFnZXM=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> WuerstchenDecoderPipeline, WuerstchenPriorPipeline
<span class="hljs-keyword">from</span> diffusers.pipelines.wuerstchen <span class="hljs-keyword">import</span> DEFAULT_STAGE_C_TIMESTEPS

device = <span class="hljs-string">&quot;cuda&quot;</span>
dtype = torch.float16
num_images_per_prompt = <span class="hljs-number">2</span>

prior_pipeline = WuerstchenPriorPipeline.from_pretrained(
    <span class="hljs-string">&quot;warp-ai/wuerstchen-prior&quot;</span>, torch_dtype=dtype
).to(device)
decoder_pipeline = WuerstchenDecoderPipeline.from_pretrained(
    <span class="hljs-string">&quot;warp-ai/wuerstchen&quot;</span>, torch_dtype=dtype
).to(device)

caption = <span class="hljs-string">&quot;Anthropomorphic cat dressed as a fire fighter&quot;</span>
negative_prompt = <span class="hljs-string">&quot;&quot;</span>

prior_output = prior_pipeline(
    prompt=caption,
    height=<span class="hljs-number">1024</span>,
    width=<span class="hljs-number">1536</span>,
    timesteps=DEFAULT_STAGE_C_TIMESTEPS,
    negative_prompt=negative_prompt,
    guidance_scale=<span class="hljs-number">4.0</span>,
    num_images_per_prompt=num_images_per_prompt,
)
decoder_output = decoder_pipeline(
    image_embeddings=prior_output.image_embeddings,
    prompt=caption,
    negative_prompt=negative_prompt,
    num_images_per_prompt=num_images_per_prompt,
    guidance_scale=<span class="hljs-number">0.0</span>,
    output_type=<span class="hljs-string">&quot;pil&quot;</span>,
).images`}}),Te=new H({}),Pe=new rt({props:{code:"cGlwZWxpbmUucHJpb3IlMjAlM0QlMjB0b3JjaC5jb21waWxlKHBpcGVsaW5lLnByaW9yJTJDJTIwbW9kZSUzRCUyMnJlZHVjZS1vdmVyaGVhZCUyMiUyQyUyMGZ1bGxncmFwaCUzRFRydWUpJTBBcGlwZWxpbmUuZGVjb2RlciUyMCUzRCUyMHRvcmNoLmNvbXBpbGUocGlwZWxpbmUuZGVjb2RlciUyQyUyMG1vZGUlM0QlMjJyZWR1Y2Utb3ZlcmhlYWQlMjIlMkMlMjBmdWxsZ3JhcGglM0RUcnVlKQ==",highlighted:`pipeline.prior = torch.<span class="hljs-built_in">compile</span>(pipeline.prior, mode=<span class="hljs-string">&quot;reduce-overhead&quot;</span>, fullgraph=<span class="hljs-literal">True</span>)
pipeline.decoder = torch.<span class="hljs-built_in">compile</span>(pipeline.decoder, mode=<span class="hljs-string">&quot;reduce-overhead&quot;</span>, fullgraph=<span class="hljs-literal">True</span>)`}}),Je=new H({}),xe=new H({}),$e=new fe({props:{name:"class diffusers.WuerstchenCombinedPipeline",anchor:"diffusers.WuerstchenCombinedPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModel"},{name:"decoder",val:": WuerstchenDiffNeXt"},{name:"scheduler",val:": DDPMWuerstchenScheduler"},{name:"vqgan",val:": PaellaVQModel"},{name:"prior_tokenizer",val:": CLIPTokenizer"},{name:"prior_text_encoder",val:": CLIPTextModel"},{name:"prior_prior",val:": WuerstchenPrior"},{name:"prior_scheduler",val:": DDPMWuerstchenScheduler"}],parametersDescription:[{anchor:"diffusers.WuerstchenCombinedPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
The decoder tokenizer to be used for text inputs.`,name:"tokenizer"},{anchor:"diffusers.WuerstchenCombinedPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
The decoder text encoder to be used for text inputs.`,name:"text_encoder"},{anchor:"diffusers.WuerstchenCombinedPipeline.decoder",description:`<strong>decoder</strong> (<code>WuerstchenDiffNeXt</code>) &#x2014;
The decoder model to be used for decoder image generation pipeline.`,name:"decoder"},{anchor:"diffusers.WuerstchenCombinedPipeline.scheduler",description:`<strong>scheduler</strong> (<code>DDPMWuerstchenScheduler</code>) &#x2014;
The scheduler to be used for decoder image generation pipeline.`,name:"scheduler"},{anchor:"diffusers.WuerstchenCombinedPipeline.vqgan",description:`<strong>vqgan</strong> (<code>PaellaVQModel</code>) &#x2014;
The VQGAN model to be used for decoder image generation pipeline.`,name:"vqgan"},{anchor:"diffusers.WuerstchenCombinedPipeline.prior_tokenizer",description:`<strong>prior_tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
The prior tokenizer to be used for text inputs.`,name:"prior_tokenizer"},{anchor:"diffusers.WuerstchenCombinedPipeline.prior_text_encoder",description:`<strong>prior_text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
The prior text encoder to be used for text inputs.`,name:"prior_text_encoder"},{anchor:"diffusers.WuerstchenCombinedPipeline.prior",description:`<strong>prior</strong> (<code>WuerstchenPrior</code>) &#x2014;
The prior model to be used for prior pipeline.`,name:"prior"},{anchor:"diffusers.WuerstchenCombinedPipeline.prior_scheduler",description:`<strong>prior_scheduler</strong> (<code>DDPMWuerstchenScheduler</code>) &#x2014;
The scheduler to be used for prior pipeline.`,name:"prior_scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py#L43"}}),je=new fe({props:{name:"__call__",anchor:"diffusers.WuerstchenCombinedPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"height",val:": int = 512"},{name:"width",val:": int = 512"},{name:"prior_num_inference_steps",val:": int = 60"},{name:"prior_timesteps",val:": typing.Optional[typing.List[float]] = None"},{name:"prior_guidance_scale",val:": float = 4.0"},{name:"num_inference_steps",val:": int = 12"},{name:"decoder_timesteps",val:": typing.Optional[typing.List[float]] = None"},{name:"decoder_guidance_scale",val:": float = 0.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"num_images_per_prompt",val:": int = 1"},{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"}],parametersDescription:[{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation for the prior and decoder.`,name:"prompt"},{anchor:"diffusers.WuerstchenCombinedPipeline.__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.WuerstchenCombinedPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings for the prior. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings for the prior. Can be used to easily tweak text inputs, <em>e.g.</em>
prompt weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.WuerstchenCombinedPipeline.__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.WuerstchenCombinedPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.prior_guidance_scale",description:`<strong>prior_guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>prior_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>prior_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:"prior_guidance_scale"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.prior_num_inference_steps",description:`<strong>prior_num_inference_steps</strong> (<code>Union[int, Dict[float, int]]</code>, <em>optional</em>, defaults to 30) &#x2014;
The number of prior denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference. For more specific timestep spacing, you can pass customized
<code>prior_timesteps</code>`,name:"prior_num_inference_steps"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
The number of decoder denoising steps. More denoising steps usually lead to a higher quality image at
the expense of slower inference. For more specific timestep spacing, you can pass customized
<code>timesteps</code>`,name:"num_inference_steps"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.prior_timesteps",description:`<strong>prior_timesteps</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process for the prior. If not defined, equal spaced
<code>prior_num_inference_steps</code> timesteps are used. Must be in descending order.`,name:"prior_timesteps"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.decoder_timesteps",description:`<strong>decoder_timesteps</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process for the decoder. If not defined, equal spaced
<code>num_inference_steps</code> timesteps are used. Must be in descending order.`,name:"decoder_timesteps"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.decoder_guidance_scale",description:`<strong>decoder_guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#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:"decoder_guidance_scale"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[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.WuerstchenCombinedPipeline.__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.WuerstchenCombinedPipeline.__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: <code>&quot;pil&quot;</code> (<code>PIL.Image.Image</code>), <code>&quot;np&quot;</code>
(<code>np.array</code>) or <code>&quot;pt&quot;</code> (<code>torch.Tensor</code>).`,name:"output_type"},{anchor:"diffusers.WuerstchenCombinedPipeline.__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.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py#L143",returnDescription:`
<p><a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code> <a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> if <code>return_dict</code> is True,
otherwise a <code>tuple</code>. When returning a tuple, the first element is a list with the generated images.</p>
`}}),re=new Hr({props:{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.example",$$slots:{default:[_s]},$$scope:{ctx:z}}}),Ie=new fe({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.WuerstchenCombinedPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py#L125"}}),Ce=new H({}),Ge=new fe({props:{name:"class diffusers.WuerstchenDecoderPipeline",anchor:"diffusers.WuerstchenDecoderPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModel"},{name:"decoder",val:": WuerstchenDiffNeXt"},{name:"scheduler",val:": DDPMWuerstchenScheduler"},{name:"vqgan",val:": PaellaVQModel"},{name:"latent_dim_scale",val:": float = 10.67"}],parametersDescription:[{anchor:"diffusers.WuerstchenDecoderPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
The CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.WuerstchenDecoderPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
The CLIP text encoder.`,name:"text_encoder"},{anchor:"diffusers.WuerstchenDecoderPipeline.decoder",description:`<strong>decoder</strong> (<code>WuerstchenDiffNeXt</code>) &#x2014;
The WuerstchenDiffNeXt unet decoder.`,name:"decoder"},{anchor:"diffusers.WuerstchenDecoderPipeline.vqgan",description:`<strong>vqgan</strong> (<code>PaellaVQModel</code>) &#x2014;
The VQGAN model.`,name:"vqgan"},{anchor:"diffusers.WuerstchenDecoderPipeline.scheduler",description:`<strong>scheduler</strong> (<code>DDPMWuerstchenScheduler</code>) &#x2014;
A scheduler to be used in combination with <code>prior</code> to generate image embedding.`,name:"scheduler"},{anchor:"diffusers.WuerstchenDecoderPipeline.latent_dim_scale",description:`<strong>latent_dim_scale</strong> (float, <code>optional</code>, defaults to 10.67) &#x2014;
Multiplier to determine the VQ latent space size from the image embeddings. If the image embeddings are
height=24 and width=24, the VQ latent shape needs to be height=int(24<em>10.67)=256 and
width=int(24</em>10.67)=256 in order to match the training conditions.`,name:"latent_dim_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py#L51"}}),Be=new fe({props:{name:"__call__",anchor:"diffusers.WuerstchenDecoderPipeline.__call__",parameters:[{name:"image_embeddings",val:": typing.Union[torch.FloatTensor, typing.List[torch.FloatTensor]]"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"num_inference_steps",val:": int = 12"},{name:"timesteps",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 0.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": int = 1"},{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"}],parametersDescription:[{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.image_embedding",description:`<strong>image_embedding</strong> (<code>torch.FloatTensor</code> or <code>List[torch.FloatTensor]</code>) &#x2014;
Image Embeddings either extracted from an image or generated by a Prior Model.`,name:"image_embedding"},{anchor:"diffusers.WuerstchenDecoderPipeline.__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.WuerstchenDecoderPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 30) &#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.WuerstchenDecoderPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process. If not defined, equal spaced <code>num_inference_steps</code>
timesteps are used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>decoder_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>decoder_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.WuerstchenDecoderPipeline.__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>decoder_guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WuerstchenDecoderPipeline.__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.WuerstchenDecoderPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[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.WuerstchenDecoderPipeline.__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.WuerstchenDecoderPipeline.__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: <code>&quot;pil&quot;</code> (<code>PIL.Image.Image</code>), <code>&quot;np&quot;</code>
(<code>np.array</code>) or <code>&quot;pt&quot;</code> (<code>torch.Tensor</code>).`,name:"output_type"},{anchor:"diffusers.WuerstchenDecoderPipeline.__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.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py#L259",returnDescription:`
<p><a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code> <a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> if <code>return_dict</code> is True,
otherwise a <code>tuple</code>. When returning a tuple, the first element is a list with the generated image
embeddings.</p>
`}}),ae=new Hr({props:{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.example",$$slots:{default:[vs]},$$scope:{ctx:z}}}),Ze=new H({}),De=new fe({props:{name:"class diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput",anchor:"diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput",parameters:[{name:"image_embeddings",val:": typing.Union[torch.FloatTensor, numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput.image_embeddings",description:`<strong>image_embeddings</strong> (<code>torch.FloatTensor</code> or <code>np.ndarray</code>) &#x2014;
Prior image embeddings for text prompt`,name:"image_embeddings"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py#L57"}}),Ve=new H({}),Ne=new fe({props:{name:"class diffusers.WuerstchenDecoderPipeline",anchor:"diffusers.WuerstchenDecoderPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModel"},{name:"decoder",val:": WuerstchenDiffNeXt"},{name:"scheduler",val:": DDPMWuerstchenScheduler"},{name:"vqgan",val:": PaellaVQModel"},{name:"latent_dim_scale",val:": float = 10.67"}],parametersDescription:[{anchor:"diffusers.WuerstchenDecoderPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
The CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.WuerstchenDecoderPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
The CLIP text encoder.`,name:"text_encoder"},{anchor:"diffusers.WuerstchenDecoderPipeline.decoder",description:`<strong>decoder</strong> (<code>WuerstchenDiffNeXt</code>) &#x2014;
The WuerstchenDiffNeXt unet decoder.`,name:"decoder"},{anchor:"diffusers.WuerstchenDecoderPipeline.vqgan",description:`<strong>vqgan</strong> (<code>PaellaVQModel</code>) &#x2014;
The VQGAN model.`,name:"vqgan"},{anchor:"diffusers.WuerstchenDecoderPipeline.scheduler",description:`<strong>scheduler</strong> (<code>DDPMWuerstchenScheduler</code>) &#x2014;
A scheduler to be used in combination with <code>prior</code> to generate image embedding.`,name:"scheduler"},{anchor:"diffusers.WuerstchenDecoderPipeline.latent_dim_scale",description:`<strong>latent_dim_scale</strong> (float, <code>optional</code>, defaults to 10.67) &#x2014;
Multiplier to determine the VQ latent space size from the image embeddings. If the image embeddings are
height=24 and width=24, the VQ latent shape needs to be height=int(24<em>10.67)=256 and
width=int(24</em>10.67)=256 in order to match the training conditions.`,name:"latent_dim_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py#L51"}}),Xe=new fe({props:{name:"__call__",anchor:"diffusers.WuerstchenDecoderPipeline.__call__",parameters:[{name:"image_embeddings",val:": typing.Union[torch.FloatTensor, typing.List[torch.FloatTensor]]"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"num_inference_steps",val:": int = 12"},{name:"timesteps",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 0.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": int = 1"},{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"}],parametersDescription:[{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.image_embedding",description:`<strong>image_embedding</strong> (<code>torch.FloatTensor</code> or <code>List[torch.FloatTensor]</code>) &#x2014;
Image Embeddings either extracted from an image or generated by a Prior Model.`,name:"image_embedding"},{anchor:"diffusers.WuerstchenDecoderPipeline.__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.WuerstchenDecoderPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 30) &#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.WuerstchenDecoderPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process. If not defined, equal spaced <code>num_inference_steps</code>
timesteps are used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>decoder_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>decoder_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.WuerstchenDecoderPipeline.__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>decoder_guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WuerstchenDecoderPipeline.__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.WuerstchenDecoderPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[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.WuerstchenDecoderPipeline.__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.WuerstchenDecoderPipeline.__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: <code>&quot;pil&quot;</code> (<code>PIL.Image.Image</code>), <code>&quot;np&quot;</code>
(<code>np.array</code>) or <code>&quot;pt&quot;</code> (<code>torch.Tensor</code>).`,name:"output_type"},{anchor:"diffusers.WuerstchenDecoderPipeline.__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.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py#L259",returnDescription:`
<p><a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code> <a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> if <code>return_dict</code> is True,
otherwise a <code>tuple</code>. When returning a tuple, the first element is a list with the generated image
embeddings.</p>
`}}),pe=new Hr({props:{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.example",$$slots:{default:[bs]},$$scope:{ctx:z}}}),{c(){f=o("meta"),J=c(),M=o("h1"),m=o("a"),T=o("span"),g(h.$$.fragment),W=c(),it=o("span"),Rn=s("W\xFCrstchen"),en=c(),Qe=o("img"),tn=c(),ge=o("p"),_e=o("a"),Fn=s("W\xFCrstchen: Efficient Pretraining of Text-to-Image Models"),Ln=s(" is by Pablo Pernias, Dominic Rampas, and Marc Aubreville."),nn=c(),qe=o("p"),Hn=s("The abstract from the paper is:"),on=c(),Re=o("p"),st=o("em"),zn=s("We introduce W\xFCrstchen, a novel technique for text-to-image synthesis that unites competitive performance with unprecedented cost-effectiveness and ease of training on constrained hardware. Building on recent advancements in machine learning, our approach, which utilizes latent diffusion strategies at strong latent image compression rates, significantly reduces the computational burden, typically associated with state-of-the-art models, while preserving, if not enhancing, the quality of generated images. Wuerstchen achieves notable speed improvements at inference time, thereby rendering real-time applications more viable. One of the key advantages of our method lies in its modest training requirements of only 9,200 GPU hours, slashing the usual costs significantly without compromising the end performance. In a comparison against the state-of-the-art, we found the approach to yield strong competitiveness. This paper opens the door to a new line of research that prioritizes both performance and computational accessibility, hence democratizing the use of sophisticated AI technologies. Through Wuerstchen, we demonstrate a compelling stride forward in the realm of text-to-image synthesis, offering an innovative path to explore in future research."),rn=c(),N=o("h2"),Y=o("a"),at=o("span"),g(ve.$$.fragment),Yn=c(),lt=o("span"),On=s("W\xFCrstchen v2 comes to Diffusers"),sn=c(),Fe=o("p"),Kn=s("After the initial paper release, we have improved numerous things in the architecture, training and sampling, making W\xFCrstchen competetive to current state-of-the-art models in many ways. We are excited to release this new version together with Diffusers. Here is a list of the improvements."),an=c(),I=o("ul"),ct=o("li"),eo=s("Higher resolution (1024x1024 up to 2048x2048)"),to=c(),pt=o("li"),no=s("Faster inference"),oo=c(),dt=o("li"),ro=s("Multi Aspect Resolution Sampling"),io=c(),ut=o("li"),so=s("Better quality"),ln=c(),Le=o("p"),ao=s("We are releasing 3 checkpoints for the text-conditional image generation model (Stage C). Those are:"),cn=c(),G=o("ul"),ht=o("li"),lo=s("v2-base"),co=c(),mt=o("li"),po=s("v2-aesthetic"),uo=c(),ft=o("li"),ho=s("v2-interpolated (50% interpolation between v2-base and v2-aesthetic)"),pn=c(),He=o("p"),mo=s(`We recommend to use v2-interpolated, as it has a nice touch of both photorealism and aesthetic. Use v2-base for finetunings as it does not have a style bias and use v2-aesthetic for very artistic generations.
A comparison can be seen here:`),dn=c(),be=o("img"),un=c(),A=o("h2"),O=o("a"),gt=o("span"),g(ye.$$.fragment),fo=c(),_t=o("span"),go=s("Text-to-Image Generation"),hn=c(),K=o("p"),_o=s("For the sake of usability W\xFCrstchen can be used with a single pipeline. This pipeline is called "),vt=o("code"),vo=s("WuerstchenCombinedPipeline"),bo=s(" and can be used as follows:"),mn=c(),g(we.$$.fragment),fn=c(),C=o("p"),yo=s("For explanation purposes, we can also initialize the two main pipelines of W\xFCrstchen individually. W\xFCrstchen consists of 3 stages: Stage C, Stage B, Stage A. They all have different jobs and work only together. When generating text-conditional images, Stage C will first generate the latents in a very compressed latent space. This is what happens in the "),bt=o("code"),wo=s("prior_pipeline"),Mo=s(". Afterwards, the generated latents will be passed to Stage B, which decompresses the latents into a bigger latent space of a VQGAN. These latents can then be decoded by Stage A, which is a VQGAN, into the pixel-space. Stage B & Stage A are both encapsulated in the "),yt=o("code"),Wo=s("decoder_pipeline"),To=s(". For more details, take a look at the "),Me=o("a"),Po=s("paper"),Jo=s("."),gn=c(),g(We.$$.fragment),_n=c(),X=o("h2"),ee=o("a"),wt=o("span"),g(Te.$$.fragment),Uo=c(),Mt=o("span"),xo=s("Speed-Up Inference"),vn=s(`

You can make use of \`torch.compile\` function and gain a speed-up of about 2-3x:

	`),g(Pe.$$.fragment),bn=c(),S=o("h2"),te=o("a"),Wt=o("span"),g(Je.$$.fragment),$o=c(),Tt=o("span"),Eo=s("Limitations"),yn=c(),$=o("ul"),Pt=o("li"),jo=s(`Due to the high compression employed by W\xFCrstchen, generations can lack a good amount
of detail. To our human eye, this is especially noticeable in faces, hands etc.`),Io=c(),ze=o("li"),Jt=o("strong"),Co=s("Images can only be generated in 128-pixel steps"),Go=s(`, e.g. the next higher resolution
after 1024x1024 is 1152x1152`),ko=c(),Ut=o("li"),Bo=s("The model lacks the ability to render correct text in images"),Zo=c(),xt=o("li"),Do=s("The model often does not achieve photorealism"),Vo=c(),$t=o("li"),No=s("Difficult compositional prompts are hard for the model"),wn=c(),ne=o("p"),Ao=s("The original codebase, as well as experimental ideas, can be found at "),Ue=o("a"),Xo=s("dome272/Wuerstchen"),So=s("."),Mn=c(),Q=o("h2"),oe=o("a"),Et=o("span"),g(xe.$$.fragment),Qo=c(),jt=o("span"),qo=s("WuerschenPipeline"),Wn=c(),x=o("div"),g($e.$$.fragment),Ro=c(),It=o("p"),Fo=s("Combined Pipeline for text-to-image generation using Wuerstchen"),Lo=c(),Ee=o("p"),Ho=s("This model inherits from "),Ye=o("a"),zo=s("DiffusionPipeline"),Yo=s(`. 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.)`),Oo=c(),k=o("div"),g(je.$$.fragment),Ko=c(),Ct=o("p"),er=s("Function invoked when calling the pipeline for generation."),tr=c(),g(re.$$.fragment),nr=c(),ie=o("div"),g(Ie.$$.fragment),or=c(),P=o("p"),rr=s("Offloads all models ("),Gt=o("code"),ir=s("unet"),sr=s(", "),kt=o("code"),ar=s("text_encoder"),lr=s(", "),Bt=o("code"),cr=s("vae"),pr=s(", and "),Zt=o("code"),dr=s("safety checker"),ur=s(` state dicts) to CPU using \u{1F917}
Accelerate, significantly reducing memory usage. Models are moved to a `),Dt=o("code"),hr=s("torch.device('meta')"),mr=s(` and loaded on a
GPU only when their specific submodule\u2019s `),Vt=o("code"),fr=s("forward"),gr=s(` method is called. Offloading happens on a submodule basis.
Memory savings are higher than using `),Nt=o("code"),_r=s("enable_model_cpu_offload"),vr=s(", but performance is lower."),Tn=c(),q=o("h2"),se=o("a"),At=o("span"),g(Ce.$$.fragment),br=c(),Xt=o("span"),yr=s("WuerstchenPriorPipeline"),Pn=c(),E=o("div"),g(Ge.$$.fragment),wr=c(),St=o("p"),Mr=s("Pipeline for generating images from the Wuerstchen model."),Wr=c(),ke=o("p"),Tr=s("This model inherits from "),Oe=o("a"),Pr=s("DiffusionPipeline"),Jr=s(`. 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.)`),Ur=c(),B=o("div"),g(Be.$$.fragment),xr=c(),Qt=o("p"),$r=s("Function invoked when calling the pipeline for generation."),Er=c(),g(ae.$$.fragment),Jn=c(),R=o("h2"),le=o("a"),qt=o("span"),g(Ze.$$.fragment),jr=c(),Rt=o("span"),Ir=s("WuerstchenPriorPipelineOutput"),Un=c(),F=o("div"),g(De.$$.fragment),Cr=c(),Ft=o("p"),Gr=s("Output class for WuerstchenPriorPipeline."),xn=c(),L=o("h2"),ce=o("a"),Lt=o("span"),g(Ve.$$.fragment),kr=c(),Ht=o("span"),Br=s("WuerstchenDecoderPipeline"),$n=c(),j=o("div"),g(Ne.$$.fragment),Zr=c(),zt=o("p"),Dr=s("Pipeline for generating images from the Wuerstchen model."),Vr=c(),Ae=o("p"),Nr=s("This model inherits from "),Ke=o("a"),Ar=s("DiffusionPipeline"),Xr=s(`. 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.)`),Sr=c(),Z=o("div"),g(Xe.$$.fragment),Qr=c(),Yt=o("p"),qr=s("Function invoked when calling the pipeline for generation."),Rr=c(),g(pe.$$.fragment),this.h()},l(e){const l=fs('[data-svelte="svelte-1phssyn"]',document.head);f=r(l,"META",{name:!0,content:!0}),l.forEach(n),J=p(e),M=r(e,"H1",{class:!0});var Se=i(M);m=r(Se,"A",{id:!0,class:!0,href:!0});var Ot=i(m);T=r(Ot,"SPAN",{});var Kt=i(T);_(h.$$.fragment,Kt),Kt.forEach(n),Ot.forEach(n),W=p(Se),it=r(Se,"SPAN",{});var Kr=i(it);Rn=a(Kr,"W\xFCrstchen"),Kr.forEach(n),Se.forEach(n),en=p(e),Qe=r(e,"IMG",{src:!0}),tn=p(e),ge=r(e,"P",{});var Fr=i(ge);_e=r(Fr,"A",{href:!0,rel:!0});var ei=i(_e);Fn=a(ei,"W\xFCrstchen: Efficient Pretraining of Text-to-Image Models"),ei.forEach(n),Ln=a(Fr," is by Pablo Pernias, Dominic Rampas, and Marc Aubreville."),Fr.forEach(n),nn=p(e),qe=r(e,"P",{});var ti=i(qe);Hn=a(ti,"The abstract from the paper is:"),ti.forEach(n),on=p(e),Re=r(e,"P",{});var ni=i(Re);st=r(ni,"EM",{});var oi=i(st);zn=a(oi,"We introduce W\xFCrstchen, a novel technique for text-to-image synthesis that unites competitive performance with unprecedented cost-effectiveness and ease of training on constrained hardware. Building on recent advancements in machine learning, our approach, which utilizes latent diffusion strategies at strong latent image compression rates, significantly reduces the computational burden, typically associated with state-of-the-art models, while preserving, if not enhancing, the quality of generated images. Wuerstchen achieves notable speed improvements at inference time, thereby rendering real-time applications more viable. One of the key advantages of our method lies in its modest training requirements of only 9,200 GPU hours, slashing the usual costs significantly without compromising the end performance. In a comparison against the state-of-the-art, we found the approach to yield strong competitiveness. This paper opens the door to a new line of research that prioritizes both performance and computational accessibility, hence democratizing the use of sophisticated AI technologies. Through Wuerstchen, we demonstrate a compelling stride forward in the realm of text-to-image synthesis, offering an innovative path to explore in future research."),oi.forEach(n),ni.forEach(n),rn=p(e),N=r(e,"H2",{class:!0});var jn=i(N);Y=r(jn,"A",{id:!0,class:!0,href:!0});var ri=i(Y);at=r(ri,"SPAN",{});var ii=i(at);_(ve.$$.fragment,ii),ii.forEach(n),ri.forEach(n),Yn=p(jn),lt=r(jn,"SPAN",{});var si=i(lt);On=a(si,"W\xFCrstchen v2 comes to Diffusers"),si.forEach(n),jn.forEach(n),sn=p(e),Fe=r(e,"P",{});var ai=i(Fe);Kn=a(ai,"After the initial paper release, we have improved numerous things in the architecture, training and sampling, making W\xFCrstchen competetive to current state-of-the-art models in many ways. We are excited to release this new version together with Diffusers. Here is a list of the improvements."),ai.forEach(n),an=p(e),I=r(e,"UL",{});var de=i(I);ct=r(de,"LI",{});var li=i(ct);eo=a(li,"Higher resolution (1024x1024 up to 2048x2048)"),li.forEach(n),to=p(de),pt=r(de,"LI",{});var ci=i(pt);no=a(ci,"Faster inference"),ci.forEach(n),oo=p(de),dt=r(de,"LI",{});var pi=i(dt);ro=a(pi,"Multi Aspect Resolution Sampling"),pi.forEach(n),io=p(de),ut=r(de,"LI",{});var di=i(ut);so=a(di,"Better quality"),di.forEach(n),de.forEach(n),ln=p(e),Le=r(e,"P",{});var ui=i(Le);ao=a(ui,"We are releasing 3 checkpoints for the text-conditional image generation model (Stage C). Those are:"),ui.forEach(n),cn=p(e),G=r(e,"UL",{});var et=i(G);ht=r(et,"LI",{});var hi=i(ht);lo=a(hi,"v2-base"),hi.forEach(n),co=p(et),mt=r(et,"LI",{});var mi=i(mt);po=a(mi,"v2-aesthetic"),mi.forEach(n),uo=p(et),ft=r(et,"LI",{});var fi=i(ft);ho=a(fi,"v2-interpolated (50% interpolation between v2-base and v2-aesthetic)"),fi.forEach(n),et.forEach(n),pn=p(e),He=r(e,"P",{});var gi=i(He);mo=a(gi,`We recommend to use v2-interpolated, as it has a nice touch of both photorealism and aesthetic. Use v2-base for finetunings as it does not have a style bias and use v2-aesthetic for very artistic generations.
A comparison can be seen here:`),gi.forEach(n),dn=p(e),be=r(e,"IMG",{src:!0,width:!0}),un=p(e),A=r(e,"H2",{class:!0});var In=i(A);O=r(In,"A",{id:!0,class:!0,href:!0});var _i=i(O);gt=r(_i,"SPAN",{});var vi=i(gt);_(ye.$$.fragment,vi),vi.forEach(n),_i.forEach(n),fo=p(In),_t=r(In,"SPAN",{});var bi=i(_t);go=a(bi,"Text-to-Image Generation"),bi.forEach(n),In.forEach(n),hn=p(e),K=r(e,"P",{});var Cn=i(K);_o=a(Cn,"For the sake of usability W\xFCrstchen can be used with a single pipeline. This pipeline is called "),vt=r(Cn,"CODE",{});var yi=i(vt);vo=a(yi,"WuerstchenCombinedPipeline"),yi.forEach(n),bo=a(Cn," and can be used as follows:"),Cn.forEach(n),mn=p(e),_(we.$$.fragment,e),fn=p(e),C=r(e,"P",{});var ue=i(C);yo=a(ue,"For explanation purposes, we can also initialize the two main pipelines of W\xFCrstchen individually. W\xFCrstchen consists of 3 stages: Stage C, Stage B, Stage A. They all have different jobs and work only together. When generating text-conditional images, Stage C will first generate the latents in a very compressed latent space. This is what happens in the "),bt=r(ue,"CODE",{});var wi=i(bt);wo=a(wi,"prior_pipeline"),wi.forEach(n),Mo=a(ue,". Afterwards, the generated latents will be passed to Stage B, which decompresses the latents into a bigger latent space of a VQGAN. These latents can then be decoded by Stage A, which is a VQGAN, into the pixel-space. Stage B & Stage A are both encapsulated in the "),yt=r(ue,"CODE",{});var Mi=i(yt);Wo=a(Mi,"decoder_pipeline"),Mi.forEach(n),To=a(ue,". For more details, take a look at the "),Me=r(ue,"A",{href:!0,rel:!0});var Wi=i(Me);Po=a(Wi,"paper"),Wi.forEach(n),Jo=a(ue,"."),ue.forEach(n),gn=p(e),_(We.$$.fragment,e),_n=p(e),X=r(e,"H2",{class:!0});var Gn=i(X);ee=r(Gn,"A",{id:!0,class:!0,href:!0});var Ti=i(ee);wt=r(Ti,"SPAN",{});var Pi=i(wt);_(Te.$$.fragment,Pi),Pi.forEach(n),Ti.forEach(n),Uo=p(Gn),Mt=r(Gn,"SPAN",{});var Ji=i(Mt);xo=a(Ji,"Speed-Up Inference"),Ji.forEach(n),Gn.forEach(n),vn=a(e,`

You can make use of \`torch.compile\` function and gain a speed-up of about 2-3x:

	`),_(Pe.$$.fragment,e),bn=p(e),S=r(e,"H2",{class:!0});var kn=i(S);te=r(kn,"A",{id:!0,class:!0,href:!0});var Ui=i(te);Wt=r(Ui,"SPAN",{});var xi=i(Wt);_(Je.$$.fragment,xi),xi.forEach(n),Ui.forEach(n),$o=p(kn),Tt=r(kn,"SPAN",{});var $i=i(Tt);Eo=a($i,"Limitations"),$i.forEach(n),kn.forEach(n),yn=p(e),$=r(e,"UL",{});var D=i($);Pt=r(D,"LI",{});var Ei=i(Pt);jo=a(Ei,`Due to the high compression employed by W\xFCrstchen, generations can lack a good amount
of detail. To our human eye, this is especially noticeable in faces, hands etc.`),Ei.forEach(n),Io=p(D),ze=r(D,"LI",{});var Lr=i(ze);Jt=r(Lr,"STRONG",{});var ji=i(Jt);Co=a(ji,"Images can only be generated in 128-pixel steps"),ji.forEach(n),Go=a(Lr,`, e.g. the next higher resolution
after 1024x1024 is 1152x1152`),Lr.forEach(n),ko=p(D),Ut=r(D,"LI",{});var Ii=i(Ut);Bo=a(Ii,"The model lacks the ability to render correct text in images"),Ii.forEach(n),Zo=p(D),xt=r(D,"LI",{});var Ci=i(xt);Do=a(Ci,"The model often does not achieve photorealism"),Ci.forEach(n),Vo=p(D),$t=r(D,"LI",{});var Gi=i($t);No=a(Gi,"Difficult compositional prompts are hard for the model"),Gi.forEach(n),D.forEach(n),wn=p(e),ne=r(e,"P",{});var Bn=i(ne);Ao=a(Bn,"The original codebase, as well as experimental ideas, can be found at "),Ue=r(Bn,"A",{href:!0,rel:!0});var ki=i(Ue);Xo=a(ki,"dome272/Wuerstchen"),ki.forEach(n),So=a(Bn,"."),Bn.forEach(n),Mn=p(e),Q=r(e,"H2",{class:!0});var Zn=i(Q);oe=r(Zn,"A",{id:!0,class:!0,href:!0});var Bi=i(oe);Et=r(Bi,"SPAN",{});var Zi=i(Et);_(xe.$$.fragment,Zi),Zi.forEach(n),Bi.forEach(n),Qo=p(Zn),jt=r(Zn,"SPAN",{});var Di=i(jt);qo=a(Di,"WuerschenPipeline"),Di.forEach(n),Zn.forEach(n),Wn=p(e),x=r(e,"DIV",{class:!0});var V=i(x);_($e.$$.fragment,V),Ro=p(V),It=r(V,"P",{});var Vi=i(It);Fo=a(Vi,"Combined Pipeline for text-to-image generation using Wuerstchen"),Vi.forEach(n),Lo=p(V),Ee=r(V,"P",{});var Dn=i(Ee);Ho=a(Dn,"This model inherits from "),Ye=r(Dn,"A",{href:!0});var Ni=i(Ye);zo=a(Ni,"DiffusionPipeline"),Ni.forEach(n),Yo=a(Dn,`. 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.)`),Dn.forEach(n),Oo=p(V),k=r(V,"DIV",{class:!0});var tt=i(k);_(je.$$.fragment,tt),Ko=p(tt),Ct=r(tt,"P",{});var Ai=i(Ct);er=a(Ai,"Function invoked when calling the pipeline for generation."),Ai.forEach(n),tr=p(tt),_(re.$$.fragment,tt),tt.forEach(n),nr=p(V),ie=r(V,"DIV",{class:!0});var Vn=i(ie);_(Ie.$$.fragment,Vn),or=p(Vn),P=r(Vn,"P",{});var U=i(P);rr=a(U,"Offloads all models ("),Gt=r(U,"CODE",{});var Xi=i(Gt);ir=a(Xi,"unet"),Xi.forEach(n),sr=a(U,", "),kt=r(U,"CODE",{});var Si=i(kt);ar=a(Si,"text_encoder"),Si.forEach(n),lr=a(U,", "),Bt=r(U,"CODE",{});var Qi=i(Bt);cr=a(Qi,"vae"),Qi.forEach(n),pr=a(U,", and "),Zt=r(U,"CODE",{});var qi=i(Zt);dr=a(qi,"safety checker"),qi.forEach(n),ur=a(U,` state dicts) to CPU using \u{1F917}
Accelerate, significantly reducing memory usage. Models are moved to a `),Dt=r(U,"CODE",{});var Ri=i(Dt);hr=a(Ri,"torch.device('meta')"),Ri.forEach(n),mr=a(U,` and loaded on a
GPU only when their specific submodule\u2019s `),Vt=r(U,"CODE",{});var Fi=i(Vt);fr=a(Fi,"forward"),Fi.forEach(n),gr=a(U,` method is called. Offloading happens on a submodule basis.
Memory savings are higher than using `),Nt=r(U,"CODE",{});var Li=i(Nt);_r=a(Li,"enable_model_cpu_offload"),Li.forEach(n),vr=a(U,", but performance is lower."),U.forEach(n),Vn.forEach(n),V.forEach(n),Tn=p(e),q=r(e,"H2",{class:!0});var Nn=i(q);se=r(Nn,"A",{id:!0,class:!0,href:!0});var Hi=i(se);At=r(Hi,"SPAN",{});var zi=i(At);_(Ce.$$.fragment,zi),zi.forEach(n),Hi.forEach(n),br=p(Nn),Xt=r(Nn,"SPAN",{});var Yi=i(Xt);yr=a(Yi,"WuerstchenPriorPipeline"),Yi.forEach(n),Nn.forEach(n),Pn=p(e),E=r(e,"DIV",{class:!0});var he=i(E);_(Ge.$$.fragment,he),wr=p(he),St=r(he,"P",{});var Oi=i(St);Mr=a(Oi,"Pipeline for generating images from the Wuerstchen model."),Oi.forEach(n),Wr=p(he),ke=r(he,"P",{});var An=i(ke);Tr=a(An,"This model inherits from "),Oe=r(An,"A",{href:!0});var Ki=i(Oe);Pr=a(Ki,"DiffusionPipeline"),Ki.forEach(n),Jr=a(An,`. 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.)`),An.forEach(n),Ur=p(he),B=r(he,"DIV",{class:!0});var nt=i(B);_(Be.$$.fragment,nt),xr=p(nt),Qt=r(nt,"P",{});var es=i(Qt);$r=a(es,"Function invoked when calling the pipeline for generation."),es.forEach(n),Er=p(nt),_(ae.$$.fragment,nt),nt.forEach(n),he.forEach(n),Jn=p(e),R=r(e,"H2",{class:!0});var Xn=i(R);le=r(Xn,"A",{id:!0,class:!0,href:!0});var ts=i(le);qt=r(ts,"SPAN",{});var ns=i(qt);_(Ze.$$.fragment,ns),ns.forEach(n),ts.forEach(n),jr=p(Xn),Rt=r(Xn,"SPAN",{});var os=i(Rt);Ir=a(os,"WuerstchenPriorPipelineOutput"),os.forEach(n),Xn.forEach(n),Un=p(e),F=r(e,"DIV",{class:!0});var Sn=i(F);_(De.$$.fragment,Sn),Cr=p(Sn),Ft=r(Sn,"P",{});var rs=i(Ft);Gr=a(rs,"Output class for WuerstchenPriorPipeline."),rs.forEach(n),Sn.forEach(n),xn=p(e),L=r(e,"H2",{class:!0});var Qn=i(L);ce=r(Qn,"A",{id:!0,class:!0,href:!0});var is=i(ce);Lt=r(is,"SPAN",{});var ss=i(Lt);_(Ve.$$.fragment,ss),ss.forEach(n),is.forEach(n),kr=p(Qn),Ht=r(Qn,"SPAN",{});var as=i(Ht);Br=a(as,"WuerstchenDecoderPipeline"),as.forEach(n),Qn.forEach(n),$n=p(e),j=r(e,"DIV",{class:!0});var me=i(j);_(Ne.$$.fragment,me),Zr=p(me),zt=r(me,"P",{});var ls=i(zt);Dr=a(ls,"Pipeline for generating images from the Wuerstchen model."),ls.forEach(n),Vr=p(me),Ae=r(me,"P",{});var qn=i(Ae);Nr=a(qn,"This model inherits from "),Ke=r(qn,"A",{href:!0});var cs=i(Ke);Ar=a(cs,"DiffusionPipeline"),cs.forEach(n),Xr=a(qn,`. 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.)`),qn.forEach(n),Sr=p(me),Z=r(me,"DIV",{class:!0});var ot=i(Z);_(Xe.$$.fragment,ot),Qr=p(ot),Yt=r(ot,"P",{});var ps=i(Yt);qr=a(ps,"Function invoked when calling the pipeline for generation."),ps.forEach(n),Rr=p(ot),_(pe.$$.fragment,ot),ot.forEach(n),me.forEach(n),this.h()},h(){u(f,"name","hf:doc:metadata"),u(f,"content",JSON.stringify(ws)),u(m,"id","wrstchen"),u(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(m,"href","#wrstchen"),u(M,"class","relative group"),ds(Qe.src,Yr="https://github.com/dome272/Wuerstchen/assets/61938694/0617c863-165a-43ee-9303-2a17299a0cf9")||u(Qe,"src",Yr),u(_e,"href","https://huggingface.co/papers/2306.00637"),u(_e,"rel","nofollow"),u(Y,"id","wrstchen-v2-comes-to-diffusers"),u(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Y,"href","#wrstchen-v2-comes-to-diffusers"),u(N,"class","relative group"),ds(be.src,Or="https://github.com/dome272/Wuerstchen/assets/61938694/2914830f-cbd3-461c-be64-d50734f4b49d")||u(be,"src",Or),u(be,"width","500"),u(O,"id","texttoimage-generation"),u(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(O,"href","#texttoimage-generation"),u(A,"class","relative group"),u(Me,"href","https://huggingface.co/papers/2306.00637"),u(Me,"rel","nofollow"),u(ee,"id","speedup-inference"),u(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ee,"href","#speedup-inference"),u(X,"class","relative group"),u(te,"id","limitations"),u(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(te,"href","#limitations"),u(S,"class","relative group"),u(Ue,"href","https://github.com/dome272/Wuerstchen"),u(Ue,"rel","nofollow"),u(oe,"id","diffusers.WuerstchenCombinedPipeline"),u(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(oe,"href","#diffusers.WuerstchenCombinedPipeline"),u(Q,"class","relative group"),u(Ye,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),u(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(se,"id","diffusers.WuerstchenDecoderPipeline"),u(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(se,"href","#diffusers.WuerstchenDecoderPipeline"),u(q,"class","relative group"),u(Oe,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),u(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(le,"id","diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput"),u(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"),u(le,"href","#diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput"),u(R,"class","relative group"),u(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ce,"id","diffusers.WuerstchenDecoderPipeline"),u(ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ce,"href","#diffusers.WuerstchenDecoderPipeline"),u(L,"class","relative group"),u(Ke,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),u(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){t(document.head,f),d(e,J,l),d(e,M,l),t(M,m),t(m,T),v(h,T,null),t(M,W),t(M,it),t(it,Rn),d(e,en,l),d(e,Qe,l),d(e,tn,l),d(e,ge,l),t(ge,_e),t(_e,Fn),t(ge,Ln),d(e,nn,l),d(e,qe,l),t(qe,Hn),d(e,on,l),d(e,Re,l),t(Re,st),t(st,zn),d(e,rn,l),d(e,N,l),t(N,Y),t(Y,at),v(ve,at,null),t(N,Yn),t(N,lt),t(lt,On),d(e,sn,l),d(e,Fe,l),t(Fe,Kn),d(e,an,l),d(e,I,l),t(I,ct),t(ct,eo),t(I,to),t(I,pt),t(pt,no),t(I,oo),t(I,dt),t(dt,ro),t(I,io),t(I,ut),t(ut,so),d(e,ln,l),d(e,Le,l),t(Le,ao),d(e,cn,l),d(e,G,l),t(G,ht),t(ht,lo),t(G,co),t(G,mt),t(mt,po),t(G,uo),t(G,ft),t(ft,ho),d(e,pn,l),d(e,He,l),t(He,mo),d(e,dn,l),d(e,be,l),d(e,un,l),d(e,A,l),t(A,O),t(O,gt),v(ye,gt,null),t(A,fo),t(A,_t),t(_t,go),d(e,hn,l),d(e,K,l),t(K,_o),t(K,vt),t(vt,vo),t(K,bo),d(e,mn,l),v(we,e,l),d(e,fn,l),d(e,C,l),t(C,yo),t(C,bt),t(bt,wo),t(C,Mo),t(C,yt),t(yt,Wo),t(C,To),t(C,Me),t(Me,Po),t(C,Jo),d(e,gn,l),v(We,e,l),d(e,_n,l),d(e,X,l),t(X,ee),t(ee,wt),v(Te,wt,null),t(X,Uo),t(X,Mt),t(Mt,xo),d(e,vn,l),v(Pe,e,l),d(e,bn,l),d(e,S,l),t(S,te),t(te,Wt),v(Je,Wt,null),t(S,$o),t(S,Tt),t(Tt,Eo),d(e,yn,l),d(e,$,l),t($,Pt),t(Pt,jo),t($,Io),t($,ze),t(ze,Jt),t(Jt,Co),t(ze,Go),t($,ko),t($,Ut),t(Ut,Bo),t($,Zo),t($,xt),t(xt,Do),t($,Vo),t($,$t),t($t,No),d(e,wn,l),d(e,ne,l),t(ne,Ao),t(ne,Ue),t(Ue,Xo),t(ne,So),d(e,Mn,l),d(e,Q,l),t(Q,oe),t(oe,Et),v(xe,Et,null),t(Q,Qo),t(Q,jt),t(jt,qo),d(e,Wn,l),d(e,x,l),v($e,x,null),t(x,Ro),t(x,It),t(It,Fo),t(x,Lo),t(x,Ee),t(Ee,Ho),t(Ee,Ye),t(Ye,zo),t(Ee,Yo),t(x,Oo),t(x,k),v(je,k,null),t(k,Ko),t(k,Ct),t(Ct,er),t(k,tr),v(re,k,null),t(x,nr),t(x,ie),v(Ie,ie,null),t(ie,or),t(ie,P),t(P,rr),t(P,Gt),t(Gt,ir),t(P,sr),t(P,kt),t(kt,ar),t(P,lr),t(P,Bt),t(Bt,cr),t(P,pr),t(P,Zt),t(Zt,dr),t(P,ur),t(P,Dt),t(Dt,hr),t(P,mr),t(P,Vt),t(Vt,fr),t(P,gr),t(P,Nt),t(Nt,_r),t(P,vr),d(e,Tn,l),d(e,q,l),t(q,se),t(se,At),v(Ce,At,null),t(q,br),t(q,Xt),t(Xt,yr),d(e,Pn,l),d(e,E,l),v(Ge,E,null),t(E,wr),t(E,St),t(St,Mr),t(E,Wr),t(E,ke),t(ke,Tr),t(ke,Oe),t(Oe,Pr),t(ke,Jr),t(E,Ur),t(E,B),v(Be,B,null),t(B,xr),t(B,Qt),t(Qt,$r),t(B,Er),v(ae,B,null),d(e,Jn,l),d(e,R,l),t(R,le),t(le,qt),v(Ze,qt,null),t(R,jr),t(R,Rt),t(Rt,Ir),d(e,Un,l),d(e,F,l),v(De,F,null),t(F,Cr),t(F,Ft),t(Ft,Gr),d(e,xn,l),d(e,L,l),t(L,ce),t(ce,Lt),v(Ve,Lt,null),t(L,kr),t(L,Ht),t(Ht,Br),d(e,$n,l),d(e,j,l),v(Ne,j,null),t(j,Zr),t(j,zt),t(zt,Dr),t(j,Vr),t(j,Ae),t(Ae,Nr),t(Ae,Ke),t(Ke,Ar),t(Ae,Xr),t(j,Sr),t(j,Z),v(Xe,Z,null),t(Z,Qr),t(Z,Yt),t(Yt,qr),t(Z,Rr),v(pe,Z,null),En=!0},p(e,[l]){const Se={};l&2&&(Se.$$scope={dirty:l,ctx:e}),re.$set(Se);const Ot={};l&2&&(Ot.$$scope={dirty:l,ctx:e}),ae.$set(Ot);const Kt={};l&2&&(Kt.$$scope={dirty:l,ctx:e}),pe.$set(Kt)},i(e){En||(b(h.$$.fragment,e),b(ve.$$.fragment,e),b(ye.$$.fragment,e),b(we.$$.fragment,e),b(We.$$.fragment,e),b(Te.$$.fragment,e),b(Pe.$$.fragment,e),b(Je.$$.fragment,e),b(xe.$$.fragment,e),b($e.$$.fragment,e),b(je.$$.fragment,e),b(re.$$.fragment,e),b(Ie.$$.fragment,e),b(Ce.$$.fragment,e),b(Ge.$$.fragment,e),b(Be.$$.fragment,e),b(ae.$$.fragment,e),b(Ze.$$.fragment,e),b(De.$$.fragment,e),b(Ve.$$.fragment,e),b(Ne.$$.fragment,e),b(Xe.$$.fragment,e),b(pe.$$.fragment,e),En=!0)},o(e){y(h.$$.fragment,e),y(ve.$$.fragment,e),y(ye.$$.fragment,e),y(we.$$.fragment,e),y(We.$$.fragment,e),y(Te.$$.fragment,e),y(Pe.$$.fragment,e),y(Je.$$.fragment,e),y(xe.$$.fragment,e),y($e.$$.fragment,e),y(je.$$.fragment,e),y(re.$$.fragment,e),y(Ie.$$.fragment,e),y(Ce.$$.fragment,e),y(Ge.$$.fragment,e),y(Be.$$.fragment,e),y(ae.$$.fragment,e),y(Ze.$$.fragment,e),y(De.$$.fragment,e),y(Ve.$$.fragment,e),y(Ne.$$.fragment,e),y(Xe.$$.fragment,e),y(pe.$$.fragment,e),En=!1},d(e){n(f),e&&n(J),e&&n(M),w(h),e&&n(en),e&&n(Qe),e&&n(tn),e&&n(ge),e&&n(nn),e&&n(qe),e&&n(on),e&&n(Re),e&&n(rn),e&&n(N),w(ve),e&&n(sn),e&&n(Fe),e&&n(an),e&&n(I),e&&n(ln),e&&n(Le),e&&n(cn),e&&n(G),e&&n(pn),e&&n(He),e&&n(dn),e&&n(be),e&&n(un),e&&n(A),w(ye),e&&n(hn),e&&n(K),e&&n(mn),w(we,e),e&&n(fn),e&&n(C),e&&n(gn),w(We,e),e&&n(_n),e&&n(X),w(Te),e&&n(vn),w(Pe,e),e&&n(bn),e&&n(S),w(Je),e&&n(yn),e&&n($),e&&n(wn),e&&n(ne),e&&n(Mn),e&&n(Q),w(xe),e&&n(Wn),e&&n(x),w($e),w(je),w(re),w(Ie),e&&n(Tn),e&&n(q),w(Ce),e&&n(Pn),e&&n(E),w(Ge),w(Be),w(ae),e&&n(Jn),e&&n(R),w(Ze),e&&n(Un),e&&n(F),w(De),e&&n(xn),e&&n(L),w(Ve),e&&n($n),e&&n(j),w(Ne),w(Xe),w(pe)}}}const ws={local:"wrstchen",sections:[{local:"wrstchen-v2-comes-to-diffusers",title:"W\xFCrstchen v2 comes to Diffusers"},{local:"texttoimage-generation",title:"Text-to-Image Generation"},{local:"speedup-inference",title:"Speed-Up Inference"},{local:"limitations",title:"Limitations"},{local:"diffusers.WuerstchenCombinedPipeline",title:"WuerschenPipeline"},{local:"diffusers.WuerstchenDecoderPipeline",title:"WuerstchenPriorPipeline"},{local:"diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput",title:"WuerstchenPriorPipelineOutput"},{local:"diffusers.WuerstchenDecoderPipeline",title:"WuerstchenDecoderPipeline"}],title:"W\xFCrstchen"};function Ms(z){return gs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xs extends us{constructor(f){super();hs(this,f,Ms,ys,ms,{})}}export{xs as default,ws as metadata};
