import{s as An,a as Nn,o as Xn,n as ln}from"../chunks/scheduler.53228c21.js";import{S as Rn,i as Qn,e as a,s,c as m,h as qn,a as l,d as n,b as o,f as $,g as u,j as d,k as W,l as c,m as i,n as h,t as f,o as g,p as _}from"../chunks/index.100fac89.js";import{C as Hn}from"../chunks/CopyLLMTxtMenu.9360b11d.js";import{D as Z}from"../chunks/Docstring.22cc8849.js";import{C as ke}from"../chunks/CodeBlock.d30a6509.js";import{E as an}from"../chunks/ExampleCodeBlock.1963d52f.js";import{H as U,E as Sn}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.c9001d7a.js";function Yn(V){let p,J="Examples:",y,b,w;return b=new ke({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)`,wrap:!1}}),{c(){p=a("p"),p.textContent=J,y=s(),m(b.$$.fragment)},l(r){p=l(r,"P",{"data-svelte-h":!0}),d(p)!=="svelte-kvfsh7"&&(p.textContent=J),y=o(r),u(b.$$.fragment,r)},m(r,M){i(r,p,M),i(r,y,M),h(b,r,M),w=!0},p:ln,i(r){w||(f(b.$$.fragment,r),w=!0)},o(r){g(b.$$.fragment,r),w=!1},d(r){r&&(n(p),n(y)),_(b,r)}}}function zn(V){let p,J="Examples:",y,b,w;return b=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwV3VlcnN0Y2hlblByaW9yUGlwZWxpbmUlMEElMEFwcmlvcl9waXBlJTIwJTNEJTIwV3VlcnN0Y2hlblByaW9yUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMndhcnAtYWklMkZ3dWVyc3RjaGVuLXByaW9yJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmFuJTIwaW1hZ2UlMjBvZiUyMGElMjBzaGliYSUyMGludSUyQyUyMGRvbm5pbmclMjBhJTIwc3BhY2VzdWl0JTIwYW5kJTIwaGVsbWV0JTIyJTBBcHJpb3Jfb3V0cHV0JTIwJTNEJTIwcGlwZShwcm9tcHQp",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

<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>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)`,wrap:!1}}),{c(){p=a("p"),p.textContent=J,y=s(),m(b.$$.fragment)},l(r){p=l(r,"P",{"data-svelte-h":!0}),d(p)!=="svelte-kvfsh7"&&(p.textContent=J),y=o(r),u(b.$$.fragment,r)},m(r,M){i(r,p,M),i(r,y,M),h(b,r,M),w=!0},p:ln,i(r){w||(f(b.$$.fragment,r),w=!0)},o(r){g(b.$$.fragment,r),w=!1},d(r){r&&(n(p),n(y)),_(b,r)}}}function Fn(V){let p,J="Examples:",y,b,w;return b=new ke({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)`,wrap:!1}}),{c(){p=a("p"),p.textContent=J,y=s(),m(b.$$.fragment)},l(r){p=l(r,"P",{"data-svelte-h":!0}),d(p)!=="svelte-kvfsh7"&&(p.textContent=J),y=o(r),u(b.$$.fragment,r)},m(r,M){i(r,p,M),i(r,y,M),h(b,r,M),w=!0},p:ln,i(r){w||(f(b.$$.fragment,r),w=!0)},o(r){g(b.$$.fragment,r),w=!1},d(r){r&&(n(p),n(y)),_(b,r)}}}function On(V){let p,J,y,b,w,r,M,Fe,L,cn="<p>This pipeline is deprecated but it can still be used. However, we won’t test the pipeline anymore and won’t accept any changes to it. If you run into any issues, reinstall the last Diffusers version that supported this model.</p>",Oe,D,pn='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/>',Ke,Ie,dn,et,q,mn='<a href="https://huggingface.co/papers/2306.00637" rel="nofollow">Wuerstchen: An Efficient Architecture for Large-Scale Text-to-Image Diffusion Models</a> is by Pablo Pernias, Dominic Rampas, Mats L. Richter and Christopher Pal and Marc Aubreville.',tt,H,un="The abstract from the paper is:",nt,S,hn="<em>We introduce Würstchen, a novel architecture for text-to-image synthesis that combines competitive performance with unprecedented cost-effectiveness for large-scale text-to-image diffusion models. A key contribution of our work is to develop a latent diffusion technique in which we learn a detailed but extremely compact semantic image representation used to guide the diffusion process. This highly compressed representation of an image provides much more detailed guidance compared to latent representations of language and this significantly reduces the computational requirements to achieve state-of-the-art results. Our approach also improves the quality of text-conditioned image generation based on our user preference study. The training requirements of our approach consists of 24,602 A100-GPU hours - compared to Stable Diffusion 2.1’s 200,000 GPU hours. Our approach also requires less training data to achieve these results. Furthermore, our compact latent representations allows us to perform inference over twice as fast, slashing the usual costs and carbon footprint of a state-of-the-art (SOTA) diffusion model significantly, without compromising the end performance. In a broader comparison against SOTA models our approach is substantially more efficient and compares favorably in terms of image quality. We believe that this work motivates more emphasis on the prioritization of both performance and computational accessibility.</em>",it,Y,st,z,fn='Würstchen is a diffusion model, whose text-conditional model works in a highly compressed latent space of images. Why is this important? Compressing data can reduce computational costs for both training and inference by magnitudes. Training on 1024x1024 images is way more expensive than training on 32x32. Usually, other works make use of a relatively small compression, in the range of 4x - 8x spatial compression. Würstchen takes this to an extreme. Through its novel design, we achieve a 42x spatial compression. This was unseen before because common methods fail to faithfully reconstruct detailed images after 16x spatial compression. Würstchen employs a two-stage compression, what we call Stage A and Stage B. Stage A is a VQGAN, and Stage B is a Diffusion Autoencoder (more details can be found in the <a href="https://huggingface.co/papers/2306.00637" rel="nofollow">paper</a>). A third model, Stage C, is learned in that highly compressed latent space. This training requires fractions of the compute used for current top-performing models, while also allowing cheaper and faster inference.',ot,F,rt,O,gn="After the initial paper release, we have improved numerous things in the architecture, training and sampling, making Würstchen competitive 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.",at,K,_n="<li>Higher resolution (1024x1024 up to 2048x2048)</li> <li>Faster inference</li> <li>Multi Aspect Resolution Sampling</li> <li>Better quality</li>",lt,ee,bn="We are releasing 3 checkpoints for the text-conditional image generation model (Stage C). Those are:",ct,te,wn="<li>v2-base</li> <li>v2-aesthetic</li> <li><strong>(default)</strong> v2-interpolated (50% interpolation between v2-base and v2-aesthetic)</li>",pt,ne,yn=`We recommend using v2-interpolated, as it has a nice touch of both photorealism and aesthetics. 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:`,dt,ie,Mn,mt,se,ut,oe,Tn="For the sake of usability, Würstchen can be used with a single pipeline. This pipeline can be used as follows:",ht,re,ft,ae,vn='For explanation purposes, we can also initialize the two main pipelines of Würstchen individually. Würstchen 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 <code>prior_pipeline</code>. 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 &amp; Stage A are both encapsulated in the <code>decoder_pipeline</code>. For more details, take a look at the <a href="https://huggingface.co/papers/2306.00637" rel="nofollow">paper</a>.',gt,le,_t,ce,bt,pe,Wn="You can make use of <code>torch.compile</code> function and gain a speed-up of about 2-3x:",wt,de,yt,me,Mt,ue,xn=`<li>Due to the high compression employed by Würstchen, generations can lack a good amount
of detail. To our human eye, this is especially noticeable in faces, hands etc.</li> <li><strong>Images can only be generated in 128-pixel steps</strong>, e.g. the next higher resolution
after 1024x1024 is 1152x1152</li> <li>The model lacks the ability to render correct text in images</li> <li>The model often does not achieve photorealism</li> <li>Difficult compositional prompts are hard for the model</li>`,Tt,he,Jn='The original codebase, as well as experimental ideas, can be found at <a href="https://github.com/dome272/Wuerstchen" rel="nofollow">dome272/Wuerstchen</a>.',vt,fe,Wt,T,ge,Lt,Ge,Cn="Combined Pipeline for text-to-image generation using Wuerstchen",Dt,Be,Pn=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. 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.)`,Et,j,_e,Nt,Ze,$n="Function invoked when calling the pipeline for generation.",At,E,Xt,N,be,Rt,Ve,Un=`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to <code>enable_sequential_cpu_offload</code>, this method moves one whole model at a time to the GPU when its <code>forward</code>
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
<code>enable_sequential_cpu_offload</code>, but performance is much better due to the iterative execution of the <code>unet</code>.`,Qt,A,we,qt,Le,jn=`Offloads all models (<code>unet</code>, <code>text_encoder</code>, <code>vae</code>, and <code>safety checker</code> state dicts) to CPU using 🤗
Accelerate, significantly reducing memory usage. Models are moved to a <code>torch.device(&#39;meta&#39;)</code> and loaded on a
GPU only when their specific submodule’s <code>forward</code> method is called. Offloading happens on a submodule basis.
Memory savings are higher than using <code>enable_model_cpu_offload</code>, but performance is lower.`,xt,ye,Jt,v,Me,Ht,De,kn="Pipeline for generating image prior for Wuerstchen.",St,Ee,In=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. 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.)`,Yt,Ne,Gn="The pipeline also inherits the following loading methods:",zt,Ae,Bn='<li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li>',Ft,k,Te,Ot,Xe,Zn="Function invoked when calling the pipeline for generation.",Kt,X,Ct,ve,Pt,G,We,en,Re,Vn="Output class for WuerstchenPriorPipeline.",$t,xe,Ut,C,Je,tn,Qe,Ln="Pipeline for generating images from the Wuerstchen model.",nn,qe,Dn=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. 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.)`,sn,I,Ce,on,He,En="Function invoked when calling the pipeline for generation.",rn,R,jt,Pe,kt,$e,It,Ue,Gt,ze,Bt;return w=new Hn({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),M=new U({props:{title:"Würstchen",local:"würstchen",headingTag:"h1"}}),Y=new U({props:{title:"Würstchen Overview",local:"würstchen-overview",headingTag:"h2"}}),F=new U({props:{title:"Würstchen v2 comes to Diffusers",local:"würstchen-v2-comes-to-diffusers",headingTag:"h2"}}),se=new U({props:{title:"Text-to-Image Generation",local:"text-to-image-generation",headingTag:"h2"}}),re=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQWZyb20lMjBkaWZmdXNlcnMucGlwZWxpbmVzLnd1ZXJzdGNoZW4lMjBpbXBvcnQlMjBERUZBVUxUX1NUQUdFX0NfVElNRVNURVBTJTBBJTBBcGlwZSUyMCUzRCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UuZnJvbV9wcmV0cmFpbmVkKCUyMndhcnAtYWklMkZ3dWVyc3RjaGVuJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQSUwQWNhcHRpb24lMjAlM0QlMjAlMjJBbnRocm9wb21vcnBoaWMlMjBjYXQlMjBkcmVzc2VkJTIwYXMlMjBhJTIwZmlyZSUyMGZpZ2h0ZXIlMjIlMEFpbWFnZXMlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMGNhcHRpb24lMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjBoZWlnaHQlM0QxNTM2JTJDJTBBJTIwJTIwJTIwJTIwcHJpb3JfdGltZXN0ZXBzJTNEREVGQVVMVF9TVEFHRV9DX1RJTUVTVEVQUyUyQyUwQSUyMCUyMCUyMCUyMHByaW9yX2d1aWRhbmNlX3NjYWxlJTNENC4wJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ltYWdlc19wZXJfcHJvbXB0JTNEMiUyQyUwQSkuaW1hZ2Vz",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`,wrap:!1}}),le=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwV3VlcnN0Y2hlbkRlY29kZXJQaXBlbGluZSUyQyUyMFd1ZXJzdGNoZW5QcmlvclBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy5waXBlbGluZXMud3VlcnN0Y2hlbiUyMGltcG9ydCUyMERFRkFVTFRfU1RBR0VfQ19USU1FU1RFUFMlMEElMEFkZXZpY2UlMjAlM0QlMjAlMjJjdWRhJTIyJTBBZHR5cGUlMjAlM0QlMjB0b3JjaC5mbG9hdDE2JTBBbnVtX2ltYWdlc19wZXJfcHJvbXB0JTIwJTNEJTIwMiUwQSUwQXByaW9yX3BpcGVsaW5lJTIwJTNEJTIwV3VlcnN0Y2hlblByaW9yUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMndhcnAtYWklMkZ3dWVyc3RjaGVuLXByaW9yJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0RkdHlwZSUwQSkudG8oZGV2aWNlKSUwQWRlY29kZXJfcGlwZWxpbmUlMjAlM0QlMjBXdWVyc3RjaGVuRGVjb2RlclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ3YXJwLWFpJTJGd3VlcnN0Y2hlbiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEZHR5cGUlMEEpLnRvKGRldmljZSklMEElMEFjYXB0aW9uJTIwJTNEJTIwJTIyQW50aHJvcG9tb3JwaGljJTIwY2F0JTIwZHJlc3NlZCUyMGFzJTIwYSUyMGZpcmUlMjBmaWdodGVyJTIyJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTIyJTIyJTBBJTBBcHJpb3Jfb3V0cHV0JTIwJTNEJTIwcHJpb3JfcGlwZWxpbmUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEY2FwdGlvbiUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDE1MzYlMkMlMEElMjAlMjAlMjAlMjB0aW1lc3RlcHMlM0RERUZBVUxUX1NUQUdFX0NfVElNRVNURVBTJTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q0LjAlMkMlMEElMjAlMjAlMjAlMjBudW1faW1hZ2VzX3Blcl9wcm9tcHQlM0RudW1faW1hZ2VzX3Blcl9wcm9tcHQlMkMlMEEpJTBBZGVjb2Rlcl9vdXRwdXQlMjAlM0QlMjBkZWNvZGVyX3BpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMGltYWdlX2VtYmVkZGluZ3MlM0Rwcmlvcl9vdXRwdXQuaW1hZ2VfZW1iZWRkaW5ncyUyQyUwQSUyMCUyMCUyMCUyMHByb21wdCUzRGNhcHRpb24lMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDAuMCUyQyUwQSUyMCUyMCUyMCUyMG91dHB1dF90eXBlJTNEJTIycGlsJTIyJTJDJTBBKS5pbWFnZXMlNUIwJTVEJTBBZGVjb2Rlcl9vdXRwdXQ=",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,
    guidance_scale=<span class="hljs-number">0.0</span>,
    output_type=<span class="hljs-string">&quot;pil&quot;</span>,
).images[<span class="hljs-number">0</span>]
decoder_output`,wrap:!1}}),ce=new U({props:{title:"Speed-Up Inference",local:"speed-up-inference",headingTag:"h2"}}),de=new ke({props:{code:"cHJpb3JfcGlwZWxpbmUucHJpb3IlMjAlM0QlMjB0b3JjaC5jb21waWxlKHByaW9yX3BpcGVsaW5lLnByaW9yJTJDJTIwbW9kZSUzRCUyMnJlZHVjZS1vdmVyaGVhZCUyMiUyQyUyMGZ1bGxncmFwaCUzRFRydWUpJTBBZGVjb2Rlcl9waXBlbGluZS5kZWNvZGVyJTIwJTNEJTIwdG9yY2guY29tcGlsZShkZWNvZGVyX3BpcGVsaW5lLmRlY29kZXIlMkMlMjBtb2RlJTNEJTIycmVkdWNlLW92ZXJoZWFkJTIyJTJDJTIwZnVsbGdyYXBoJTNEVHJ1ZSk=",highlighted:`prior_pipeline.prior = torch.<span class="hljs-built_in">compile</span>(prior_pipeline.prior, mode=<span class="hljs-string">&quot;reduce-overhead&quot;</span>, fullgraph=<span class="hljs-literal">True</span>)
decoder_pipeline.decoder = torch.<span class="hljs-built_in">compile</span>(decoder_pipeline.decoder, mode=<span class="hljs-string">&quot;reduce-overhead&quot;</span>, fullgraph=<span class="hljs-literal">True</span>)`,wrap:!1}}),me=new U({props:{title:"Limitations",local:"limitations",headingTag:"h2"}}),fe=new U({props:{title:"WuerstchenCombinedPipeline",local:"diffusers.WuerstchenCombinedPipeline",headingTag:"h2"}}),ge=new Z({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_prior",description:`<strong>prior_prior</strong> (<code>WuerstchenPrior</code>) &#x2014;
The prior model to be used for prior pipeline.`,name:"prior_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/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py#L43"}}),_e=new Z({props:{name:"__call__",anchor:"diffusers.WuerstchenCombinedPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{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.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = 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.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"prior_callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"prior_callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"**kwargs",val:""}],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.Tensor</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.Tensor</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://huggingface.co/papers/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://huggingface.co/papers/2205.11487" 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 60) &#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://huggingface.co/papers/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://huggingface.co/papers/2205.11487" 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.Tensor</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 be 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/main/en/api/pipelines/dit#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.prior_callback_on_step_end",description:`<strong>prior_callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
with the following arguments: <code>prior_callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>.`,name:"prior_callback_on_step_end"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.prior_callback_on_step_end_tensor_inputs",description:`<strong>prior_callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>prior_callback_on_step_end</code> function. The tensors specified in the
list will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in
the <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"prior_callback_on_step_end_tensor_inputs"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by
<code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py#L144",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/dit#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code> <a
  href="/docs/diffusers/main/en/api/pipelines/dit#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>
`}}),E=new an({props:{anchor:"diffusers.WuerstchenCombinedPipeline.__call__.example",$$slots:{default:[Yn]},$$scope:{ctx:V}}}),be=new Z({props:{name:"enable_model_cpu_offload",anchor:"diffusers.WuerstchenCombinedPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:": typing.Optional[int] = None"},{name:"device",val:": typing.Union[torch.device, str] = None"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py#L116"}}),we=new Z({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.WuerstchenCombinedPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:": typing.Optional[int] = None"},{name:"device",val:": typing.Union[torch.device, str] = None"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py#L126"}}),ye=new U({props:{title:"WuerstchenPriorPipeline",local:"diffusers.WuerstchenPriorPipeline",headingTag:"h2"}}),Me=new Z({props:{name:"class diffusers.WuerstchenPriorPipeline",anchor:"diffusers.WuerstchenPriorPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModel"},{name:"prior",val:": WuerstchenPrior"},{name:"scheduler",val:": DDPMWuerstchenScheduler"},{name:"latent_mean",val:": float = 42.0"},{name:"latent_std",val:": float = 1.0"},{name:"resolution_multiple",val:": float = 42.67"}],parametersDescription:[{anchor:"diffusers.WuerstchenPriorPipeline.prior",description:`<strong>prior</strong> (<code>Prior</code>) &#x2014;
The canonical unCLIP prior to approximate the image embedding from the text embedding.`,name:"prior"},{anchor:"diffusers.WuerstchenPriorPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModelWithProjection</code>) &#x2014;
Frozen text-encoder.`,name:"text_encoder"},{anchor:"diffusers.WuerstchenPriorPipeline.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.WuerstchenPriorPipeline.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.WuerstchenPriorPipeline.latent_mean",description:`<strong>latent_mean</strong> (&#x2018;float&#x2019;, <em>optional</em>, defaults to 42.0) &#x2014;
Mean value for latent diffusers.`,name:"latent_mean"},{anchor:"diffusers.WuerstchenPriorPipeline.latent_std",description:`<strong>latent_std</strong> (&#x2018;float&#x2019;, <em>optional</em>, defaults to 1.0) &#x2014;
Standard value for latent diffusers.`,name:"latent_std"},{anchor:"diffusers.WuerstchenPriorPipeline.resolution_multiple",description:`<strong>resolution_multiple</strong> (&#x2018;float&#x2019;, <em>optional</em>, defaults to 42.67) &#x2014;
Default resolution for multiple images generated.`,name:"resolution_multiple"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py#L73"}}),Te=new Z({props:{name:"__call__",anchor:"diffusers.WuerstchenPriorPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"height",val:": int = 1024"},{name:"width",val:": int = 1024"},{name:"num_inference_steps",val:": int = 60"},{name:"timesteps",val:": typing.List[float] = None"},{name:"guidance_scale",val:": float = 8.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pt'"},{name:"return_dict",val:": bool = True"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.WuerstchenPriorPipeline.__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.WuerstchenPriorPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.WuerstchenPriorPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.WuerstchenPriorPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 60) &#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.WuerstchenPriorPipeline.__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.WuerstchenPriorPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 8.0) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/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://huggingface.co/papers/2205.11487" 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.WuerstchenPriorPipeline.__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.WuerstchenPriorPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. 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.WuerstchenPriorPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. 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.WuerstchenPriorPipeline.__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.WuerstchenPriorPipeline.__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.WuerstchenPriorPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</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 be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.WuerstchenPriorPipeline.__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.WuerstchenPriorPipeline.__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/main/en/api/pipelines/dit#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.WuerstchenPriorPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by
<code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.WuerstchenPriorPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py#L289",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.WuerstchenPriorPipelineOutput</code> or <code>tuple</code> <code>~pipelines.WuerstchenPriorPipelineOutput</code> if
<code>return_dict</code> is True, otherwise a <code>tuple</code>. When returning a tuple, the first element is a list with the
generated image embeddings.</p>
`}}),X=new an({props:{anchor:"diffusers.WuerstchenPriorPipeline.__call__.example",$$slots:{default:[zn]},$$scope:{ctx:V}}}),ve=new U({props:{title:"WuerstchenPriorPipelineOutput",local:"diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput",headingTag:"h2"}}),We=new Z({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.Tensor, numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput.image_embeddings",description:`<strong>image_embeddings</strong> (<code>torch.Tensor</code> or <code>np.ndarray</code>) &#x2014;
Prior image embeddings for text prompt`,name:"image_embeddings"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py#L60"}}),xe=new U({props:{title:"WuerstchenDecoderPipeline",local:"diffusers.WuerstchenDecoderPipeline",headingTag:"h2"}}),Je=new Z({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/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py#L59"}}),Ce=new Z({props:{name:"__call__",anchor:"diffusers.WuerstchenDecoderPipeline.__call__",parameters:[{name:"image_embeddings",val:": typing.Union[torch.Tensor, typing.List[torch.Tensor]]"},{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.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.image_embedding",description:`<strong>image_embedding</strong> (<code>torch.Tensor</code> or <code>List[torch.Tensor]</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 12) &#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 0.0) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/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://huggingface.co/papers/2205.11487" 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.Tensor</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 be 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/main/en/api/pipelines/dit#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by
<code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py#L216",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/dit#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code> <a
  href="/docs/diffusers/main/en/api/pipelines/dit#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>
`}}),R=new an({props:{anchor:"diffusers.WuerstchenDecoderPipeline.__call__.example",$$slots:{default:[Fn]},$$scope:{ctx:V}}}),Pe=new U({props:{title:"Citation",local:"citation",headingTag:"h2"}}),$e=new ke({props:{code:"JTIwJTIwJTIwJTIwJTIwJTIwJTQwbWlzYyU3QnBlcm5pYXMyMDIzd3VlcnN0Y2hlbiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHRpdGxlJTNEJTdCV3VlcnN0Y2hlbiUzQSUyMEFuJTIwRWZmaWNpZW50JTIwQXJjaGl0ZWN0dXJlJTIwZm9yJTIwTGFyZ2UtU2NhbGUlMjBUZXh0LXRvLUltYWdlJTIwRGlmZnVzaW9uJTIwTW9kZWxzJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXV0aG9yJTNEJTdCUGFibG8lMjBQZXJuaWFzJTIwYW5kJTIwRG9taW5pYyUyMFJhbXBhcyUyMGFuZCUyME1hdHMlMjBMLiUyMFJpY2h0ZXIlMjBhbmQlMjBDaHJpc3RvcGhlciUyMEouJTIwUGFsJTIwYW5kJTIwTWFyYyUyMEF1YnJldmlsbGUlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB5ZWFyJTNEJTdCMjAyMyU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGVwcmludCUzRCU3QjIzMDYuMDA2MzclN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBhcmNoaXZlUHJlZml4JTNEJTdCYXJYaXYlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwcmltYXJ5Q2xhc3MlM0QlN0Jjcy5DViU3RCUwQSUyMCUyMCUyMCUyMCUyMCUyMCU3RA==",highlighted:`      @misc{pernias2023wuerstchen,
            title={Wuerstchen: An Efficient Architecture for Large-<span class="hljs-keyword">Scale </span>Text-to-Image <span class="hljs-keyword">Diffusion </span>Models},
            author={Pablo Pernias <span class="hljs-keyword">and </span>Dominic Rampas <span class="hljs-keyword">and </span>Mats L. Richter <span class="hljs-keyword">and </span>Christopher <span class="hljs-keyword">J. </span>Pal <span class="hljs-keyword">and </span>Marc Aubreville},
            year={<span class="hljs-number">2023</span>},
            eprint={<span class="hljs-number">2306</span>.<span class="hljs-number">00637</span>},
            archivePrefix={arXiv},
            primaryClass={cs.CV}
      }`,wrap:!1}}),Ue=new Sn({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/wuerstchen.md"}}),{c(){p=a("meta"),J=s(),y=a("p"),b=s(),m(w.$$.fragment),r=s(),m(M.$$.fragment),Fe=s(),L=a("blockquote"),L.innerHTML=cn,Oe=s(),D=a("div"),D.innerHTML=pn,Ke=s(),Ie=a("img"),et=s(),q=a("p"),q.innerHTML=mn,tt=s(),H=a("p"),H.textContent=un,nt=s(),S=a("p"),S.innerHTML=hn,it=s(),m(Y.$$.fragment),st=s(),z=a("p"),z.innerHTML=fn,ot=s(),m(F.$$.fragment),rt=s(),O=a("p"),O.textContent=gn,at=s(),K=a("ul"),K.innerHTML=_n,lt=s(),ee=a("p"),ee.textContent=bn,ct=s(),te=a("ul"),te.innerHTML=wn,pt=s(),ne=a("p"),ne.textContent=yn,dt=s(),ie=a("img"),mt=s(),m(se.$$.fragment),ut=s(),oe=a("p"),oe.textContent=Tn,ht=s(),m(re.$$.fragment),ft=s(),ae=a("p"),ae.innerHTML=vn,gt=s(),m(le.$$.fragment),_t=s(),m(ce.$$.fragment),bt=s(),pe=a("p"),pe.innerHTML=Wn,wt=s(),m(de.$$.fragment),yt=s(),m(me.$$.fragment),Mt=s(),ue=a("ul"),ue.innerHTML=xn,Tt=s(),he=a("p"),he.innerHTML=Jn,vt=s(),m(fe.$$.fragment),Wt=s(),T=a("div"),m(ge.$$.fragment),Lt=s(),Ge=a("p"),Ge.textContent=Cn,Dt=s(),Be=a("p"),Be.innerHTML=Pn,Et=s(),j=a("div"),m(_e.$$.fragment),Nt=s(),Ze=a("p"),Ze.textContent=$n,At=s(),m(E.$$.fragment),Xt=s(),N=a("div"),m(be.$$.fragment),Rt=s(),Ve=a("p"),Ve.innerHTML=Un,Qt=s(),A=a("div"),m(we.$$.fragment),qt=s(),Le=a("p"),Le.innerHTML=jn,xt=s(),m(ye.$$.fragment),Jt=s(),v=a("div"),m(Me.$$.fragment),Ht=s(),De=a("p"),De.textContent=kn,St=s(),Ee=a("p"),Ee.innerHTML=In,Yt=s(),Ne=a("p"),Ne.textContent=Gn,zt=s(),Ae=a("ul"),Ae.innerHTML=Bn,Ft=s(),k=a("div"),m(Te.$$.fragment),Ot=s(),Xe=a("p"),Xe.textContent=Zn,Kt=s(),m(X.$$.fragment),Ct=s(),m(ve.$$.fragment),Pt=s(),G=a("div"),m(We.$$.fragment),en=s(),Re=a("p"),Re.textContent=Vn,$t=s(),m(xe.$$.fragment),Ut=s(),C=a("div"),m(Je.$$.fragment),tn=s(),Qe=a("p"),Qe.textContent=Ln,nn=s(),qe=a("p"),qe.innerHTML=Dn,sn=s(),I=a("div"),m(Ce.$$.fragment),on=s(),He=a("p"),He.textContent=En,rn=s(),m(R.$$.fragment),jt=s(),m(Pe.$$.fragment),kt=s(),m($e.$$.fragment),It=s(),m(Ue.$$.fragment),Gt=s(),ze=a("p"),this.h()},l(e){const t=qn("svelte-u9bgzb",document.head);p=l(t,"META",{name:!0,content:!0}),t.forEach(n),J=o(e),y=l(e,"P",{}),$(y).forEach(n),b=o(e),u(w.$$.fragment,e),r=o(e),u(M.$$.fragment,e),Fe=o(e),L=l(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(L)!=="svelte-124tjg"&&(L.innerHTML=cn),Oe=o(e),D=l(e,"DIV",{class:!0,"data-svelte-h":!0}),d(D)!=="svelte-si9ct8"&&(D.innerHTML=pn),Ke=o(e),Ie=l(e,"IMG",{src:!0}),et=o(e),q=l(e,"P",{"data-svelte-h":!0}),d(q)!=="svelte-hm8v9i"&&(q.innerHTML=mn),tt=o(e),H=l(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-1cwsb16"&&(H.textContent=un),nt=o(e),S=l(e,"P",{"data-svelte-h":!0}),d(S)!=="svelte-10ea9cr"&&(S.innerHTML=hn),it=o(e),u(Y.$$.fragment,e),st=o(e),z=l(e,"P",{"data-svelte-h":!0}),d(z)!=="svelte-1i2c2wf"&&(z.innerHTML=fn),ot=o(e),u(F.$$.fragment,e),rt=o(e),O=l(e,"P",{"data-svelte-h":!0}),d(O)!=="svelte-idonvk"&&(O.textContent=gn),at=o(e),K=l(e,"UL",{"data-svelte-h":!0}),d(K)!=="svelte-hwtnnt"&&(K.innerHTML=_n),lt=o(e),ee=l(e,"P",{"data-svelte-h":!0}),d(ee)!=="svelte-bpk4lp"&&(ee.textContent=bn),ct=o(e),te=l(e,"UL",{"data-svelte-h":!0}),d(te)!=="svelte-holqkq"&&(te.innerHTML=wn),pt=o(e),ne=l(e,"P",{"data-svelte-h":!0}),d(ne)!=="svelte-izmk3f"&&(ne.textContent=yn),dt=o(e),ie=l(e,"IMG",{src:!0,width:!0}),mt=o(e),u(se.$$.fragment,e),ut=o(e),oe=l(e,"P",{"data-svelte-h":!0}),d(oe)!=="svelte-q6mitm"&&(oe.textContent=Tn),ht=o(e),u(re.$$.fragment,e),ft=o(e),ae=l(e,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-16aw41o"&&(ae.innerHTML=vn),gt=o(e),u(le.$$.fragment,e),_t=o(e),u(ce.$$.fragment,e),bt=o(e),pe=l(e,"P",{"data-svelte-h":!0}),d(pe)!=="svelte-13xqqkt"&&(pe.innerHTML=Wn),wt=o(e),u(de.$$.fragment,e),yt=o(e),u(me.$$.fragment,e),Mt=o(e),ue=l(e,"UL",{"data-svelte-h":!0}),d(ue)!=="svelte-157ejdo"&&(ue.innerHTML=xn),Tt=o(e),he=l(e,"P",{"data-svelte-h":!0}),d(he)!=="svelte-1674xah"&&(he.innerHTML=Jn),vt=o(e),u(fe.$$.fragment,e),Wt=o(e),T=l(e,"DIV",{class:!0});var x=$(T);u(ge.$$.fragment,x),Lt=o(x),Ge=l(x,"P",{"data-svelte-h":!0}),d(Ge)!=="svelte-19cx0lp"&&(Ge.textContent=Cn),Dt=o(x),Be=l(x,"P",{"data-svelte-h":!0}),d(Be)!=="svelte-wu1jmh"&&(Be.innerHTML=Pn),Et=o(x),j=l(x,"DIV",{class:!0});var B=$(j);u(_e.$$.fragment,B),Nt=o(B),Ze=l(B,"P",{"data-svelte-h":!0}),d(Ze)!=="svelte-v78lg8"&&(Ze.textContent=$n),At=o(B),u(E.$$.fragment,B),B.forEach(n),Xt=o(x),N=l(x,"DIV",{class:!0});var je=$(N);u(be.$$.fragment,je),Rt=o(je),Ve=l(je,"P",{"data-svelte-h":!0}),d(Ve)!=="svelte-d7vywi"&&(Ve.innerHTML=Un),je.forEach(n),Qt=o(x),A=l(x,"DIV",{class:!0});var Zt=$(A);u(we.$$.fragment,Zt),qt=o(Zt),Le=l(Zt,"P",{"data-svelte-h":!0}),d(Le)!=="svelte-a2a0wt"&&(Le.innerHTML=jn),Zt.forEach(n),x.forEach(n),xt=o(e),u(ye.$$.fragment,e),Jt=o(e),v=l(e,"DIV",{class:!0});var P=$(v);u(Me.$$.fragment,P),Ht=o(P),De=l(P,"P",{"data-svelte-h":!0}),d(De)!=="svelte-1atgjon"&&(De.textContent=kn),St=o(P),Ee=l(P,"P",{"data-svelte-h":!0}),d(Ee)!=="svelte-wu1jmh"&&(Ee.innerHTML=In),Yt=o(P),Ne=l(P,"P",{"data-svelte-h":!0}),d(Ne)!=="svelte-14s6m4u"&&(Ne.textContent=Gn),zt=o(P),Ae=l(P,"UL",{"data-svelte-h":!0}),d(Ae)!=="svelte-1uz0xyq"&&(Ae.innerHTML=Bn),Ft=o(P),k=l(P,"DIV",{class:!0});var Se=$(k);u(Te.$$.fragment,Se),Ot=o(Se),Xe=l(Se,"P",{"data-svelte-h":!0}),d(Xe)!=="svelte-v78lg8"&&(Xe.textContent=Zn),Kt=o(Se),u(X.$$.fragment,Se),Se.forEach(n),P.forEach(n),Ct=o(e),u(ve.$$.fragment,e),Pt=o(e),G=l(e,"DIV",{class:!0});var Vt=$(G);u(We.$$.fragment,Vt),en=o(Vt),Re=l(Vt,"P",{"data-svelte-h":!0}),d(Re)!=="svelte-cw9h8a"&&(Re.textContent=Vn),Vt.forEach(n),$t=o(e),u(xe.$$.fragment,e),Ut=o(e),C=l(e,"DIV",{class:!0});var Q=$(C);u(Je.$$.fragment,Q),tn=o(Q),Qe=l(Q,"P",{"data-svelte-h":!0}),d(Qe)!=="svelte-iulkbf"&&(Qe.textContent=Ln),nn=o(Q),qe=l(Q,"P",{"data-svelte-h":!0}),d(qe)!=="svelte-wu1jmh"&&(qe.innerHTML=Dn),sn=o(Q),I=l(Q,"DIV",{class:!0});var Ye=$(I);u(Ce.$$.fragment,Ye),on=o(Ye),He=l(Ye,"P",{"data-svelte-h":!0}),d(He)!=="svelte-v78lg8"&&(He.textContent=En),rn=o(Ye),u(R.$$.fragment,Ye),Ye.forEach(n),Q.forEach(n),jt=o(e),u(Pe.$$.fragment,e),kt=o(e),u($e.$$.fragment,e),It=o(e),u(Ue.$$.fragment,e),Gt=o(e),ze=l(e,"P",{}),$(ze).forEach(n),this.h()},h(){W(p,"name","hf:doc:metadata"),W(p,"content",Kn),W(L,"class","warning"),W(D,"class","flex flex-wrap space-x-1"),Nn(Ie.src,dn="https://github.com/dome272/Wuerstchen/assets/61938694/0617c863-165a-43ee-9303-2a17299a0cf9")||W(Ie,"src",dn),Nn(ie.src,Mn="https://github.com/dome272/Wuerstchen/assets/61938694/2914830f-cbd3-461c-be64-d50734f4b49d")||W(ie,"src",Mn),W(ie,"width","500"),W(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(C,"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,t){c(document.head,p),i(e,J,t),i(e,y,t),i(e,b,t),h(w,e,t),i(e,r,t),h(M,e,t),i(e,Fe,t),i(e,L,t),i(e,Oe,t),i(e,D,t),i(e,Ke,t),i(e,Ie,t),i(e,et,t),i(e,q,t),i(e,tt,t),i(e,H,t),i(e,nt,t),i(e,S,t),i(e,it,t),h(Y,e,t),i(e,st,t),i(e,z,t),i(e,ot,t),h(F,e,t),i(e,rt,t),i(e,O,t),i(e,at,t),i(e,K,t),i(e,lt,t),i(e,ee,t),i(e,ct,t),i(e,te,t),i(e,pt,t),i(e,ne,t),i(e,dt,t),i(e,ie,t),i(e,mt,t),h(se,e,t),i(e,ut,t),i(e,oe,t),i(e,ht,t),h(re,e,t),i(e,ft,t),i(e,ae,t),i(e,gt,t),h(le,e,t),i(e,_t,t),h(ce,e,t),i(e,bt,t),i(e,pe,t),i(e,wt,t),h(de,e,t),i(e,yt,t),h(me,e,t),i(e,Mt,t),i(e,ue,t),i(e,Tt,t),i(e,he,t),i(e,vt,t),h(fe,e,t),i(e,Wt,t),i(e,T,t),h(ge,T,null),c(T,Lt),c(T,Ge),c(T,Dt),c(T,Be),c(T,Et),c(T,j),h(_e,j,null),c(j,Nt),c(j,Ze),c(j,At),h(E,j,null),c(T,Xt),c(T,N),h(be,N,null),c(N,Rt),c(N,Ve),c(T,Qt),c(T,A),h(we,A,null),c(A,qt),c(A,Le),i(e,xt,t),h(ye,e,t),i(e,Jt,t),i(e,v,t),h(Me,v,null),c(v,Ht),c(v,De),c(v,St),c(v,Ee),c(v,Yt),c(v,Ne),c(v,zt),c(v,Ae),c(v,Ft),c(v,k),h(Te,k,null),c(k,Ot),c(k,Xe),c(k,Kt),h(X,k,null),i(e,Ct,t),h(ve,e,t),i(e,Pt,t),i(e,G,t),h(We,G,null),c(G,en),c(G,Re),i(e,$t,t),h(xe,e,t),i(e,Ut,t),i(e,C,t),h(Je,C,null),c(C,tn),c(C,Qe),c(C,nn),c(C,qe),c(C,sn),c(C,I),h(Ce,I,null),c(I,on),c(I,He),c(I,rn),h(R,I,null),i(e,jt,t),h(Pe,e,t),i(e,kt,t),h($e,e,t),i(e,It,t),h(Ue,e,t),i(e,Gt,t),i(e,ze,t),Bt=!0},p(e,[t]){const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),E.$set(x);const B={};t&2&&(B.$$scope={dirty:t,ctx:e}),X.$set(B);const je={};t&2&&(je.$$scope={dirty:t,ctx:e}),R.$set(je)},i(e){Bt||(f(w.$$.fragment,e),f(M.$$.fragment,e),f(Y.$$.fragment,e),f(F.$$.fragment,e),f(se.$$.fragment,e),f(re.$$.fragment,e),f(le.$$.fragment,e),f(ce.$$.fragment,e),f(de.$$.fragment,e),f(me.$$.fragment,e),f(fe.$$.fragment,e),f(ge.$$.fragment,e),f(_e.$$.fragment,e),f(E.$$.fragment,e),f(be.$$.fragment,e),f(we.$$.fragment,e),f(ye.$$.fragment,e),f(Me.$$.fragment,e),f(Te.$$.fragment,e),f(X.$$.fragment,e),f(ve.$$.fragment,e),f(We.$$.fragment,e),f(xe.$$.fragment,e),f(Je.$$.fragment,e),f(Ce.$$.fragment,e),f(R.$$.fragment,e),f(Pe.$$.fragment,e),f($e.$$.fragment,e),f(Ue.$$.fragment,e),Bt=!0)},o(e){g(w.$$.fragment,e),g(M.$$.fragment,e),g(Y.$$.fragment,e),g(F.$$.fragment,e),g(se.$$.fragment,e),g(re.$$.fragment,e),g(le.$$.fragment,e),g(ce.$$.fragment,e),g(de.$$.fragment,e),g(me.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(_e.$$.fragment,e),g(E.$$.fragment,e),g(be.$$.fragment,e),g(we.$$.fragment,e),g(ye.$$.fragment,e),g(Me.$$.fragment,e),g(Te.$$.fragment,e),g(X.$$.fragment,e),g(ve.$$.fragment,e),g(We.$$.fragment,e),g(xe.$$.fragment,e),g(Je.$$.fragment,e),g(Ce.$$.fragment,e),g(R.$$.fragment,e),g(Pe.$$.fragment,e),g($e.$$.fragment,e),g(Ue.$$.fragment,e),Bt=!1},d(e){e&&(n(J),n(y),n(b),n(r),n(Fe),n(L),n(Oe),n(D),n(Ke),n(Ie),n(et),n(q),n(tt),n(H),n(nt),n(S),n(it),n(st),n(z),n(ot),n(rt),n(O),n(at),n(K),n(lt),n(ee),n(ct),n(te),n(pt),n(ne),n(dt),n(ie),n(mt),n(ut),n(oe),n(ht),n(ft),n(ae),n(gt),n(_t),n(bt),n(pe),n(wt),n(yt),n(Mt),n(ue),n(Tt),n(he),n(vt),n(Wt),n(T),n(xt),n(Jt),n(v),n(Ct),n(Pt),n(G),n($t),n(Ut),n(C),n(jt),n(kt),n(It),n(Gt),n(ze)),n(p),_(w,e),_(M,e),_(Y,e),_(F,e),_(se,e),_(re,e),_(le,e),_(ce,e),_(de,e),_(me,e),_(fe,e),_(ge),_(_e),_(E),_(be),_(we),_(ye,e),_(Me),_(Te),_(X),_(ve,e),_(We),_(xe,e),_(Je),_(Ce),_(R),_(Pe,e),_($e,e),_(Ue,e)}}}const Kn='{"title":"Würstchen","local":"würstchen","sections":[{"title":"Würstchen Overview","local":"würstchen-overview","sections":[],"depth":2},{"title":"Würstchen v2 comes to Diffusers","local":"würstchen-v2-comes-to-diffusers","sections":[],"depth":2},{"title":"Text-to-Image Generation","local":"text-to-image-generation","sections":[],"depth":2},{"title":"Speed-Up Inference","local":"speed-up-inference","sections":[],"depth":2},{"title":"Limitations","local":"limitations","sections":[],"depth":2},{"title":"WuerstchenCombinedPipeline","local":"diffusers.WuerstchenCombinedPipeline","sections":[],"depth":2},{"title":"WuerstchenPriorPipeline","local":"diffusers.WuerstchenPriorPipeline","sections":[],"depth":2},{"title":"WuerstchenPriorPipelineOutput","local":"diffusers.pipelines.wuerstchen.pipeline_wuerstchen_prior.WuerstchenPriorPipelineOutput","sections":[],"depth":2},{"title":"WuerstchenDecoderPipeline","local":"diffusers.WuerstchenDecoderPipeline","sections":[],"depth":2},{"title":"Citation","local":"citation","sections":[],"depth":2}],"depth":1}';function ei(V){return Xn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class li extends Rn{constructor(p){super(),Qn(this,p,ei,On,An,{})}}export{li as component};
