import{s as Xt,o as Kt,n as kt}from"../chunks/scheduler.182ea377.js";import{S as en,i as tn,g as l,s as a,r as m,A as nn,h as d,f as n,c as o,j as S,u as g,x as b,k,y as r,a as s,v as u,d as f,t as _,w as h}from"../chunks/index.abf12888.js";import{D as J}from"../chunks/Docstring.93f6f462.js";import{C as Mt}from"../chunks/CodeBlock.57fe6e13.js";import{E as St}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as M}from"../chunks/Heading.16916d63.js";function an(G){let c,$="Examples:",v,p,C;return p=new Mt({props:{code:"ZnJvbSUyMGRpZmZ1c2lvbnMlMjBpbXBvcnQlMjBTdGFibGVDYXNjYWRlQ29tYmluZWRQaXBlbGluZSUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVDYXNjYWRlQ29tYmluZWRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtY2FzY2FkZS1jb21iaW5lZCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpLnRvKCUwQSUyMCUyMCUyMCUyMCUyMmN1ZGElMjIlMEEpJTBBcHJvbXB0JTIwJTNEJTIwJTIyYW4lMjBpbWFnZSUyMG9mJTIwYSUyMHNoaWJhJTIwaW51JTJDJTIwZG9ubmluZyUyMGElMjBzcGFjZXN1aXQlMjBhbmQlMjBoZWxtZXQlMjIlMEFpbWFnZXMlMjAlM0QlMjBwaXBlKHByb21wdCUzRHByb21wdCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusions <span class="hljs-keyword">import</span> StableCascadeCombinedPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableCascadeCombinedPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-cascade-combined&quot;</span>, torch_dtype=torch.bfloat16).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(){c=l("p"),c.textContent=$,v=a(),m(p.$$.fragment)},l(i){c=d(i,"P",{"data-svelte-h":!0}),b(c)!=="svelte-kvfsh7"&&(c.textContent=$),v=o(i),g(p.$$.fragment,i)},m(i,P){s(i,c,P),s(i,v,P),u(p,i,P),C=!0},p:kt,i(i){C||(f(p.$$.fragment,i),C=!0)},o(i){_(p.$$.fragment,i),C=!1},d(i){i&&(n(c),n(v)),h(p,i)}}}function on(G){let c,$="Examples:",v,p,C;return p=new Mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlQ2FzY2FkZVByaW9yUGlwZWxpbmUlMEElMEFwcmlvcl9waXBlJTIwJTNEJTIwU3RhYmxlQ2FzY2FkZVByaW9yUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWNhc2NhZGUtcHJpb3IlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmFuJTIwaW1hZ2UlMjBvZiUyMGElMjBzaGliYSUyMGludSUyQyUyMGRvbm5pbmclMjBhJTIwc3BhY2VzdWl0JTIwYW5kJTIwaGVsbWV0JTIyJTBBcHJpb3Jfb3V0cHV0JTIwJTNEJTIwcGlwZShwcm9tcHQp",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> StableCascadePriorPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>prior_pipe = StableCascadePriorPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-cascade-prior&quot;</span>, torch_dtype=torch.bfloat16
<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(){c=l("p"),c.textContent=$,v=a(),m(p.$$.fragment)},l(i){c=d(i,"P",{"data-svelte-h":!0}),b(c)!=="svelte-kvfsh7"&&(c.textContent=$),v=o(i),g(p.$$.fragment,i)},m(i,P){s(i,c,P),s(i,v,P),u(p,i,P),C=!0},p:kt,i(i){C||(f(p.$$.fragment,i),C=!0)},o(i){_(p.$$.fragment,i),C=!1},d(i){i&&(n(c),n(v)),h(p,i)}}}function sn(G){let c,$="Examples:",v,p,C;return p=new Mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlQ2FzY2FkZVByaW9yUGlwZWxpbmUlMkMlMjBTdGFibGVDYXNjYWRlRGVjb2RlclBpcGVsaW5lJTBBJTBBcHJpb3JfcGlwZSUyMCUzRCUyMFN0YWJsZUNhc2NhZGVQcmlvclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1jYXNjYWRlLXByaW9yJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEFnZW5fcGlwZSUyMCUzRCUyMFN0YWJsZUNhc2NhZGVEZWNvZGVyUGlwZWxpbmUuZnJvbV9wcmV0cmFpbiglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1jYXNjYWRlJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmFuJTIwaW1hZ2UlMjBvZiUyMGElMjBzaGliYSUyMGludSUyQyUyMGRvbm5pbmclMjBhJTIwc3BhY2VzdWl0JTIwYW5kJTIwaGVsbWV0JTIyJTBBcHJpb3Jfb3V0cHV0JTIwJTNEJTIwcGlwZShwcm9tcHQpJTBBaW1hZ2VzJTIwJTNEJTIwZ2VuX3BpcGUocHJpb3Jfb3V0cHV0LmltYWdlX2VtYmVkZGluZ3MlMkMlMjBwcm9tcHQlM0Rwcm9tcHQp",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> StableCascadePriorPipeline, StableCascadeDecoderPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>prior_pipe = StableCascadePriorPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-cascade-prior&quot;</span>, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>gen_pipe = StableCascadeDecoderPipeline.from_pretrain(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-cascade&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)
<span class="hljs-meta">&gt;&gt;&gt; </span>images = gen_pipe(prior_output.image_embeddings, prompt=prompt)`,wrap:!1}}),{c(){c=l("p"),c.textContent=$,v=a(),m(p.$$.fragment)},l(i){c=d(i,"P",{"data-svelte-h":!0}),b(c)!=="svelte-kvfsh7"&&(c.textContent=$),v=o(i),g(p.$$.fragment,i)},m(i,P){s(i,c,P),s(i,v,P),u(p,i,P),C=!0},p:kt,i(i){C||(f(p.$$.fragment,i),C=!0)},o(i){_(p.$$.fragment,i),C=!1},d(i){i&&(n(c),n(v)),h(p,i)}}}function rn(G){let c,$,v,p,C,i,P,It=`This model is built upon the <a href="https://openreview.net/forum?id=gU58d5QeGv" rel="nofollow">Würstchen</a> architecture and its main
difference to other models like Stable Diffusion is that it is working at a much smaller latent space. Why is this
important? The smaller the latent space, the <strong>faster</strong> you can run inference and the <strong>cheaper</strong> the training becomes.
How small is the latent space? Stable Diffusion uses a compression factor of 8, resulting in a 1024x1024 image being
encoded to 128x128. Stable Cascade achieves a compression factor of 42, meaning that it is possible to encode a
1024x1024 image to 24x24, while maintaining crisp reconstructions. The text-conditional model is then trained in the
highly compressed latent space. Previous versions of this architecture, achieved a 16x cost reduction over Stable
Diffusion 1.5.`,Le,V,Ut=`Therefore, this kind of model is well suited for usages where efficiency is important. Furthermore, all known extensions
like finetuning, LoRA, ControlNet, IP-Adapter, LCM etc. are possible with this method as well.`,Je,z,jt='The original codebase can be found at <a href="https://github.com/Stability-AI/StableCascade" rel="nofollow">Stability-AI/StableCascade</a>.',Ge,H,We,Y,Dt=`Stable Cascade consists of three models: Stage A, Stage B and Stage C, representing a cascade to generate images,
hence the name “Stable Cascade”.`,Ne,E,Lt=`Stage A & B are used to compress images, similar to what the job of the VAE is in Stable Diffusion.
However, with this setup, a much higher compression of images can be achieved. While the Stable Diffusion models use a
spatial compression factor of 8, encoding an image with resolution of 1024 x 1024 to 128 x 128, Stable Cascade achieves
a compression factor of 42. This encodes a 1024 x 1024 image to 24 x 24, while being able to accurately decode the
image. This comes with the great benefit of cheaper training and inference. Furthermore, Stage C is responsible
for generating the small 24 x 24 latents given a text prompt.`,qe,Q,Be,R,Ze,A,Jt="The model is intended for research purposes for now. Possible research areas and tasks include",Fe,X,Gt="<li>Research on generative models.</li> <li>Safe deployment of models which have the potential to generate harmful content.</li> <li>Probing and understanding the limitations and biases of generative models.</li> <li>Generation of artworks and use in design and other artistic processes.</li> <li>Applications in educational or creative tools.</li>",Oe,K,Wt="Excluded uses are described below.",Ve,ee,ze,te,Nt=`The model was not trained to be factual or true representations of people or events,
and therefore using the model to generate such content is out-of-scope for the abilities of this model.
The model should not be used in any way that violates Stability AI’s <a href="https://stability.ai/use-policy" rel="nofollow">Acceptable Use Policy</a>.`,He,ne,Ye,ae,Ee,oe,qt="<li>Faces and people in general may not be generated properly.</li> <li>The autoencoding part of the model is lossy.</li>",Qe,ie,Re,w,se,rt,Ce,Bt="Combined Pipeline for text-to-image generation using Stable Cascade.",lt,ve,Zt=`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.)`,dt,I,re,ct,Pe,Ft="Function invoked when calling the pipeline for generation.",pt,W,mt,N,le,gt,we,Ot=`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>.`,ut,q,de,ft,xe,Vt=`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.`,Ae,ce,Xe,y,pe,_t,$e,zt="Pipeline for generating image prior for Stable Cascade.",ht,ye,Ht=`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.)`,bt,U,me,Ct,Te,Yt="Function invoked when calling the pipeline for generation.",vt,B,Ke,ge,et,D,ue,Pt,Se,Et="Output class for WuerstchenPriorPipeline.",tt,fe,nt,T,_e,wt,ke,Qt="Pipeline for generating images from the Stable Cascade model.",xt,Me,Rt=`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.)`,$t,j,he,yt,Ie,At="Function invoked when calling the pipeline for generation.",Tt,Z,at,De,ot;return C=new M({props:{title:"Stable Cascade",local:"stable-cascade",headingTag:"h1"}}),H=new M({props:{title:"Model Overview",local:"model-overview",headingTag:"h2"}}),Q=new M({props:{title:"Uses",local:"uses",headingTag:"h2"}}),R=new M({props:{title:"Direct Use",local:"direct-use",headingTag:"h3"}}),ee=new M({props:{title:"Out-of-Scope Use",local:"out-of-scope-use",headingTag:"h3"}}),ne=new M({props:{title:"Limitations and Bias",local:"limitations-and-bias",headingTag:"h2"}}),ae=new M({props:{title:"Limitations",local:"limitations",headingTag:"h3"}}),ie=new M({props:{title:"StableCascadeCombinedPipeline",local:"diffusers.StableCascadeCombinedPipeline",headingTag:"h2"}}),se=new J({props:{name:"class diffusers.StableCascadeCombinedPipeline",anchor:"diffusers.StableCascadeCombinedPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModel"},{name:"decoder",val:": StableCascadeUNet"},{name:"scheduler",val:": DDPMWuerstchenScheduler"},{name:"vqgan",val:": PaellaVQModel"},{name:"prior_prior",val:": StableCascadeUNet"},{name:"prior_text_encoder",val:": CLIPTextModel"},{name:"prior_tokenizer",val:": CLIPTokenizer"},{name:"prior_scheduler",val:": DDPMWuerstchenScheduler"},{name:"prior_feature_extractor",val:": Optional = None"},{name:"prior_image_encoder",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.StableCascadeCombinedPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
The decoder tokenizer to be used for text inputs.`,name:"tokenizer"},{anchor:"diffusers.StableCascadeCombinedPipeline.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.StableCascadeCombinedPipeline.decoder",description:`<strong>decoder</strong> (<code>StableCascadeUNet</code>) &#x2014;
The decoder model to be used for decoder image generation pipeline.`,name:"decoder"},{anchor:"diffusers.StableCascadeCombinedPipeline.scheduler",description:`<strong>scheduler</strong> (<code>DDPMWuerstchenScheduler</code>) &#x2014;
The scheduler to be used for decoder image generation pipeline.`,name:"scheduler"},{anchor:"diffusers.StableCascadeCombinedPipeline.vqgan",description:`<strong>vqgan</strong> (<code>PaellaVQModel</code>) &#x2014;
The VQGAN model to be used for decoder image generation pipeline.`,name:"vqgan"},{anchor:"diffusers.StableCascadeCombinedPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>image_encoder</code>.`,name:"feature_extractor"},{anchor:"diffusers.StableCascadeCombinedPipeline.image_encoder",description:`<strong>image_encoder</strong> (<code>CLIPVisionModelWithProjection</code>) &#x2014;
Frozen CLIP image-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"image_encoder"},{anchor:"diffusers.StableCascadeCombinedPipeline.prior_prior",description:`<strong>prior_prior</strong> (<code>StableCascadeUNet</code>) &#x2014;
The prior model to be used for prior pipeline.`,name:"prior_prior"},{anchor:"diffusers.StableCascadeCombinedPipeline.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/stable_cascade/pipeline_stable_cascade_combined.py#L43"}}),re=new J({props:{name:"__call__",anchor:"diffusers.StableCascadeCombinedPipeline.__call__",parameters:[{name:"prompt",val:": Union = None"},{name:"images",val:": Union = None"},{name:"height",val:": int = 512"},{name:"width",val:": int = 512"},{name:"prior_num_inference_steps",val:": int = 60"},{name:"prior_timesteps",val:": Optional = None"},{name:"prior_guidance_scale",val:": float = 4.0"},{name:"num_inference_steps",val:": int = 12"},{name:"decoder_timesteps",val:": Optional = None"},{name:"decoder_guidance_scale",val:": float = 0.0"},{name:"negative_prompt",val:": Union = None"},{name:"prompt_embeds",val:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"generator",val:": Union = None"},{name:"latents",val:": Optional = None"},{name:"output_type",val:": Optional = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"prior_callback_on_step_end",val:": Optional = None"},{name:"prior_callback_on_step_end_tensor_inputs",val:": List = ['latents']"},{name:"callback_on_step_end",val:": Optional = None"},{name:"callback_on_step_end_tensor_inputs",val:": List = ['latents']"}],parametersDescription:[{anchor:"diffusers.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__call__.images",description:`<strong>images</strong> (<code>torch.Tensor</code>, <code>PIL.Image.Image</code>, <code>List[torch.Tensor]</code>, <code>List[PIL.Image.Image]</code>, <em>optional</em>) &#x2014;
The images to guide the image generation for the prior.`,name:"images"},{anchor:"diffusers.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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/ddim#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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 pipeine class.`,name:"prior_callback_on_step_end_tensor_inputs"},{anchor:"diffusers.StableCascadeCombinedPipeline.__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.StableCascadeCombinedPipeline.__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 pipeine class.`,name:"callback_on_step_end_tensor_inputs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py#L149",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/ddim#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code> <a
  href="/docs/diffusers/main/en/api/pipelines/ddim#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>
`}}),W=new St({props:{anchor:"diffusers.StableCascadeCombinedPipeline.__call__.example",$$slots:{default:[an]},$$scope:{ctx:G}}}),le=new J({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableCascadeCombinedPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py#L121"}}),de=new J({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableCascadeCombinedPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py#L131"}}),ce=new M({props:{title:"StableCascadePriorPipeline",local:"diffusers.StableCascadePriorPipeline",headingTag:"h2"}}),pe=new J({props:{name:"class diffusers.StableCascadePriorPipeline",anchor:"diffusers.StableCascadePriorPipeline",parameters:[{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"prior",val:": StableCascadeUNet"},{name:"scheduler",val:": DDPMWuerstchenScheduler"},{name:"resolution_multiple",val:": float = 42.67"},{name:"feature_extractor",val:": Optional = None"},{name:"image_encoder",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.StableCascadePriorPipeline.prior",description:`<strong>prior</strong> (<code>StableCascadeUNet</code>) &#x2014;
The Stable Cascade prior to approximate the image embedding from the text and/or image embedding.`,name:"prior"},{anchor:"diffusers.StableCascadePriorPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModelWithProjection</code>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k" rel="nofollow">laion/CLIP-ViT-bigG-14-laion2B-39B-b160k</a>).`,name:"text_encoder"},{anchor:"diffusers.StableCascadePriorPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>image_encoder</code>.`,name:"feature_extractor"},{anchor:"diffusers.StableCascadePriorPipeline.image_encoder",description:`<strong>image_encoder</strong> (<code>CLIPVisionModelWithProjection</code>) &#x2014;
Frozen CLIP image-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"image_encoder"},{anchor:"diffusers.StableCascadePriorPipeline.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.StableCascadePriorPipeline.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.StableCascadePriorPipeline.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/stable_cascade/pipeline_stable_cascade_prior.py#L70"}}),me=new J({props:{name:"__call__",anchor:"diffusers.StableCascadePriorPipeline.__call__",parameters:[{name:"prompt",val:": Union = None"},{name:"images",val:": Union = None"},{name:"height",val:": int = 1024"},{name:"width",val:": int = 1024"},{name:"num_inference_steps",val:": int = 20"},{name:"timesteps",val:": List = None"},{name:"guidance_scale",val:": float = 4.0"},{name:"negative_prompt",val:": Union = None"},{name:"prompt_embeds",val:": Optional = None"},{name:"prompt_embeds_pooled",val:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"negative_prompt_embeds_pooled",val:": Optional = None"},{name:"image_embeds",val:": Optional = None"},{name:"num_images_per_prompt",val:": Optional = 1"},{name:"generator",val:": Union = None"},{name:"latents",val:": Optional = None"},{name:"output_type",val:": Optional = 'pt'"},{name:"return_dict",val:": bool = True"},{name:"callback_on_step_end",val:": Optional = None"},{name:"callback_on_step_end_tensor_inputs",val:": List = ['latents']"}],parametersDescription:[{anchor:"diffusers.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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://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.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</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.StableCascadePriorPipeline.__call__.prompt_embeds_pooled",description:`<strong>prompt_embeds_pooled</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds_pooled"},{anchor:"diffusers.StableCascadePriorPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</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.StableCascadePriorPipeline.__call__.negative_prompt_embeds_pooled",description:`<strong>negative_prompt_embeds_pooled</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds_pooled will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds_pooled"},{anchor:"diffusers.StableCascadePriorPipeline.__call__.image_embeds",description:`<strong>image_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated image embeddings. Can be used to easily tweak image inputs, <em>e.g.</em> prompt weighting.
If not provided, image embeddings will be generated from <code>image</code> input argument if existing.`,name:"image_embeds"},{anchor:"diffusers.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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/ddim#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableCascadePriorPipeline.__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.StableCascadePriorPipeline.__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/stable_cascade/pipeline_stable_cascade_prior.py#L352",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>StableCascadePriorPipelineOutput</code> or <code>tuple</code> <code>StableCascadePriorPipelineOutput</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>
`}}),B=new St({props:{anchor:"diffusers.StableCascadePriorPipeline.__call__.example",$$slots:{default:[on]},$$scope:{ctx:G}}}),ge=new M({props:{title:"StableCascadePriorPipelineOutput",local:"diffusers.pipelines.stable_cascade.pipeline_stable_cascade_prior.StableCascadePriorPipelineOutput",headingTag:"h2"}}),ue=new J({props:{name:"class diffusers.pipelines.stable_cascade.pipeline_stable_cascade_prior.StableCascadePriorPipelineOutput",anchor:"diffusers.pipelines.stable_cascade.pipeline_stable_cascade_prior.StableCascadePriorPipelineOutput",parameters:[{name:"image_embeddings",val:": Union"},{name:"prompt_embeds",val:": Union"},{name:"negative_prompt_embeds",val:": Union"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_cascade.pipeline_stable_cascade_prior.StableCascadePriorPipelineOutput.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"},{anchor:"diffusers.pipelines.stable_cascade.pipeline_stable_cascade_prior.StableCascadePriorPipelineOutput.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>) &#x2014;
Text embeddings for the prompt.`,name:"prompt_embeds"},{anchor:"diffusers.pipelines.stable_cascade.pipeline_stable_cascade_prior.StableCascadePriorPipelineOutput.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>) &#x2014;
Text embeddings for the negative prompt.`,name:"negative_prompt_embeds"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_prior.py#L51"}}),fe=new M({props:{title:"StableCascadeDecoderPipeline",local:"diffusers.StableCascadeDecoderPipeline",headingTag:"h2"}}),_e=new J({props:{name:"class diffusers.StableCascadeDecoderPipeline",anchor:"diffusers.StableCascadeDecoderPipeline",parameters:[{name:"decoder",val:": StableCascadeUNet"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder",val:": CLIPTextModel"},{name:"scheduler",val:": DDPMWuerstchenScheduler"},{name:"vqgan",val:": PaellaVQModel"},{name:"latent_dim_scale",val:": float = 10.67"}],parametersDescription:[{anchor:"diffusers.StableCascadeDecoderPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
The CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.StableCascadeDecoderPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
The CLIP text encoder.`,name:"text_encoder"},{anchor:"diffusers.StableCascadeDecoderPipeline.decoder",description:`<strong>decoder</strong> (<code>StableCascadeUNet</code>) &#x2014;
The Stable Cascade decoder unet.`,name:"decoder"},{anchor:"diffusers.StableCascadeDecoderPipeline.vqgan",description:`<strong>vqgan</strong> (<code>PaellaVQModel</code>) &#x2014;
The VQGAN model.`,name:"vqgan"},{anchor:"diffusers.StableCascadeDecoderPipeline.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.StableCascadeDecoderPipeline.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/stable_cascade/pipeline_stable_cascade.py#L50"}}),he=new J({props:{name:"__call__",anchor:"diffusers.StableCascadeDecoderPipeline.__call__",parameters:[{name:"image_embeddings",val:": Union"},{name:"prompt",val:": Union = None"},{name:"num_inference_steps",val:": int = 10"},{name:"guidance_scale",val:": float = 0.0"},{name:"negative_prompt",val:": Union = None"},{name:"prompt_embeds",val:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"generator",val:": Union = None"},{name:"latents",val:": Optional = None"},{name:"output_type",val:": Optional = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback_on_step_end",val:": Optional = None"},{name:"callback_on_step_end_tensor_inputs",val:": List = ['latents']"}],parametersDescription:[{anchor:"diffusers.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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://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.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</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.StableCascadeDecoderPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</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.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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/ddim#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableCascadeDecoderPipeline.__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.StableCascadeDecoderPipeline.__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/stable_cascade/pipeline_stable_cascade.py#L282",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/ddim#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code> <a
  href="/docs/diffusers/main/en/api/pipelines/ddim#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>
`}}),Z=new St({props:{anchor:"diffusers.StableCascadeDecoderPipeline.__call__.example",$$slots:{default:[sn]},$$scope:{ctx:G}}}),{c(){c=l("meta"),$=a(),v=l("p"),p=a(),m(C.$$.fragment),i=a(),P=l("p"),P.innerHTML=It,Le=a(),V=l("p"),V.textContent=Ut,Je=a(),z=l("p"),z.innerHTML=jt,Ge=a(),m(H.$$.fragment),We=a(),Y=l("p"),Y.textContent=Dt,Ne=a(),E=l("p"),E.textContent=Lt,qe=a(),m(Q.$$.fragment),Be=a(),m(R.$$.fragment),Ze=a(),A=l("p"),A.textContent=Jt,Fe=a(),X=l("ul"),X.innerHTML=Gt,Oe=a(),K=l("p"),K.textContent=Wt,Ve=a(),m(ee.$$.fragment),ze=a(),te=l("p"),te.innerHTML=Nt,He=a(),m(ne.$$.fragment),Ye=a(),m(ae.$$.fragment),Ee=a(),oe=l("ul"),oe.innerHTML=qt,Qe=a(),m(ie.$$.fragment),Re=a(),w=l("div"),m(se.$$.fragment),rt=a(),Ce=l("p"),Ce.textContent=Bt,lt=a(),ve=l("p"),ve.innerHTML=Zt,dt=a(),I=l("div"),m(re.$$.fragment),ct=a(),Pe=l("p"),Pe.textContent=Ft,pt=a(),m(W.$$.fragment),mt=a(),N=l("div"),m(le.$$.fragment),gt=a(),we=l("p"),we.innerHTML=Ot,ut=a(),q=l("div"),m(de.$$.fragment),ft=a(),xe=l("p"),xe.innerHTML=Vt,Ae=a(),m(ce.$$.fragment),Xe=a(),y=l("div"),m(pe.$$.fragment),_t=a(),$e=l("p"),$e.textContent=zt,ht=a(),ye=l("p"),ye.innerHTML=Ht,bt=a(),U=l("div"),m(me.$$.fragment),Ct=a(),Te=l("p"),Te.textContent=Yt,vt=a(),m(B.$$.fragment),Ke=a(),m(ge.$$.fragment),et=a(),D=l("div"),m(ue.$$.fragment),Pt=a(),Se=l("p"),Se.textContent=Et,tt=a(),m(fe.$$.fragment),nt=a(),T=l("div"),m(_e.$$.fragment),wt=a(),ke=l("p"),ke.textContent=Qt,xt=a(),Me=l("p"),Me.innerHTML=Rt,$t=a(),j=l("div"),m(he.$$.fragment),yt=a(),Ie=l("p"),Ie.textContent=At,Tt=a(),m(Z.$$.fragment),at=a(),De=l("p"),this.h()},l(e){const t=nn("svelte-u9bgzb",document.head);c=d(t,"META",{name:!0,content:!0}),t.forEach(n),$=o(e),v=d(e,"P",{}),S(v).forEach(n),p=o(e),g(C.$$.fragment,e),i=o(e),P=d(e,"P",{"data-svelte-h":!0}),b(P)!=="svelte-58yed7"&&(P.innerHTML=It),Le=o(e),V=d(e,"P",{"data-svelte-h":!0}),b(V)!=="svelte-pdgmnb"&&(V.textContent=Ut),Je=o(e),z=d(e,"P",{"data-svelte-h":!0}),b(z)!=="svelte-1rol617"&&(z.innerHTML=jt),Ge=o(e),g(H.$$.fragment,e),We=o(e),Y=d(e,"P",{"data-svelte-h":!0}),b(Y)!=="svelte-13mtumf"&&(Y.textContent=Dt),Ne=o(e),E=d(e,"P",{"data-svelte-h":!0}),b(E)!=="svelte-1lpwfdo"&&(E.textContent=Lt),qe=o(e),g(Q.$$.fragment,e),Be=o(e),g(R.$$.fragment,e),Ze=o(e),A=d(e,"P",{"data-svelte-h":!0}),b(A)!=="svelte-marzm0"&&(A.textContent=Jt),Fe=o(e),X=d(e,"UL",{"data-svelte-h":!0}),b(X)!=="svelte-1io3utn"&&(X.innerHTML=Gt),Oe=o(e),K=d(e,"P",{"data-svelte-h":!0}),b(K)!=="svelte-usmk6k"&&(K.textContent=Wt),Ve=o(e),g(ee.$$.fragment,e),ze=o(e),te=d(e,"P",{"data-svelte-h":!0}),b(te)!=="svelte-md3bci"&&(te.innerHTML=Nt),He=o(e),g(ne.$$.fragment,e),Ye=o(e),g(ae.$$.fragment,e),Ee=o(e),oe=d(e,"UL",{"data-svelte-h":!0}),b(oe)!=="svelte-1lgsa2f"&&(oe.innerHTML=qt),Qe=o(e),g(ie.$$.fragment,e),Re=o(e),w=d(e,"DIV",{class:!0});var x=S(w);g(se.$$.fragment,x),rt=o(x),Ce=d(x,"P",{"data-svelte-h":!0}),b(Ce)!=="svelte-zuq8la"&&(Ce.textContent=Bt),lt=o(x),ve=d(x,"P",{"data-svelte-h":!0}),b(ve)!=="svelte-wu1jmh"&&(ve.innerHTML=Zt),dt=o(x),I=d(x,"DIV",{class:!0});var L=S(I);g(re.$$.fragment,L),ct=o(L),Pe=d(L,"P",{"data-svelte-h":!0}),b(Pe)!=="svelte-v78lg8"&&(Pe.textContent=Ft),pt=o(L),g(W.$$.fragment,L),L.forEach(n),mt=o(x),N=d(x,"DIV",{class:!0});var be=S(N);g(le.$$.fragment,be),gt=o(be),we=d(be,"P",{"data-svelte-h":!0}),b(we)!=="svelte-d7vywi"&&(we.innerHTML=Ot),be.forEach(n),ut=o(x),q=d(x,"DIV",{class:!0});var it=S(q);g(de.$$.fragment,it),ft=o(it),xe=d(it,"P",{"data-svelte-h":!0}),b(xe)!=="svelte-a2a0wt"&&(xe.innerHTML=Vt),it.forEach(n),x.forEach(n),Ae=o(e),g(ce.$$.fragment,e),Xe=o(e),y=d(e,"DIV",{class:!0});var F=S(y);g(pe.$$.fragment,F),_t=o(F),$e=d(F,"P",{"data-svelte-h":!0}),b($e)!=="svelte-1k7c4ws"&&($e.textContent=zt),ht=o(F),ye=d(F,"P",{"data-svelte-h":!0}),b(ye)!=="svelte-wu1jmh"&&(ye.innerHTML=Ht),bt=o(F),U=d(F,"DIV",{class:!0});var Ue=S(U);g(me.$$.fragment,Ue),Ct=o(Ue),Te=d(Ue,"P",{"data-svelte-h":!0}),b(Te)!=="svelte-v78lg8"&&(Te.textContent=Yt),vt=o(Ue),g(B.$$.fragment,Ue),Ue.forEach(n),F.forEach(n),Ke=o(e),g(ge.$$.fragment,e),et=o(e),D=d(e,"DIV",{class:!0});var st=S(D);g(ue.$$.fragment,st),Pt=o(st),Se=d(st,"P",{"data-svelte-h":!0}),b(Se)!=="svelte-cw9h8a"&&(Se.textContent=Et),st.forEach(n),tt=o(e),g(fe.$$.fragment,e),nt=o(e),T=d(e,"DIV",{class:!0});var O=S(T);g(_e.$$.fragment,O),wt=o(O),ke=d(O,"P",{"data-svelte-h":!0}),b(ke)!=="svelte-1bqijj8"&&(ke.textContent=Qt),xt=o(O),Me=d(O,"P",{"data-svelte-h":!0}),b(Me)!=="svelte-wu1jmh"&&(Me.innerHTML=Rt),$t=o(O),j=d(O,"DIV",{class:!0});var je=S(j);g(he.$$.fragment,je),yt=o(je),Ie=d(je,"P",{"data-svelte-h":!0}),b(Ie)!=="svelte-v78lg8"&&(Ie.textContent=At),Tt=o(je),g(Z.$$.fragment,je),je.forEach(n),O.forEach(n),at=o(e),De=d(e,"P",{}),S(De).forEach(n),this.h()},h(){k(c,"name","hf:doc:metadata"),k(c,"content",ln),k(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(T,"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){r(document.head,c),s(e,$,t),s(e,v,t),s(e,p,t),u(C,e,t),s(e,i,t),s(e,P,t),s(e,Le,t),s(e,V,t),s(e,Je,t),s(e,z,t),s(e,Ge,t),u(H,e,t),s(e,We,t),s(e,Y,t),s(e,Ne,t),s(e,E,t),s(e,qe,t),u(Q,e,t),s(e,Be,t),u(R,e,t),s(e,Ze,t),s(e,A,t),s(e,Fe,t),s(e,X,t),s(e,Oe,t),s(e,K,t),s(e,Ve,t),u(ee,e,t),s(e,ze,t),s(e,te,t),s(e,He,t),u(ne,e,t),s(e,Ye,t),u(ae,e,t),s(e,Ee,t),s(e,oe,t),s(e,Qe,t),u(ie,e,t),s(e,Re,t),s(e,w,t),u(se,w,null),r(w,rt),r(w,Ce),r(w,lt),r(w,ve),r(w,dt),r(w,I),u(re,I,null),r(I,ct),r(I,Pe),r(I,pt),u(W,I,null),r(w,mt),r(w,N),u(le,N,null),r(N,gt),r(N,we),r(w,ut),r(w,q),u(de,q,null),r(q,ft),r(q,xe),s(e,Ae,t),u(ce,e,t),s(e,Xe,t),s(e,y,t),u(pe,y,null),r(y,_t),r(y,$e),r(y,ht),r(y,ye),r(y,bt),r(y,U),u(me,U,null),r(U,Ct),r(U,Te),r(U,vt),u(B,U,null),s(e,Ke,t),u(ge,e,t),s(e,et,t),s(e,D,t),u(ue,D,null),r(D,Pt),r(D,Se),s(e,tt,t),u(fe,e,t),s(e,nt,t),s(e,T,t),u(_e,T,null),r(T,wt),r(T,ke),r(T,xt),r(T,Me),r(T,$t),r(T,j),u(he,j,null),r(j,yt),r(j,Ie),r(j,Tt),u(Z,j,null),s(e,at,t),s(e,De,t),ot=!0},p(e,[t]){const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),W.$set(x);const L={};t&2&&(L.$$scope={dirty:t,ctx:e}),B.$set(L);const be={};t&2&&(be.$$scope={dirty:t,ctx:e}),Z.$set(be)},i(e){ot||(f(C.$$.fragment,e),f(H.$$.fragment,e),f(Q.$$.fragment,e),f(R.$$.fragment,e),f(ee.$$.fragment,e),f(ne.$$.fragment,e),f(ae.$$.fragment,e),f(ie.$$.fragment,e),f(se.$$.fragment,e),f(re.$$.fragment,e),f(W.$$.fragment,e),f(le.$$.fragment,e),f(de.$$.fragment,e),f(ce.$$.fragment,e),f(pe.$$.fragment,e),f(me.$$.fragment,e),f(B.$$.fragment,e),f(ge.$$.fragment,e),f(ue.$$.fragment,e),f(fe.$$.fragment,e),f(_e.$$.fragment,e),f(he.$$.fragment,e),f(Z.$$.fragment,e),ot=!0)},o(e){_(C.$$.fragment,e),_(H.$$.fragment,e),_(Q.$$.fragment,e),_(R.$$.fragment,e),_(ee.$$.fragment,e),_(ne.$$.fragment,e),_(ae.$$.fragment,e),_(ie.$$.fragment,e),_(se.$$.fragment,e),_(re.$$.fragment,e),_(W.$$.fragment,e),_(le.$$.fragment,e),_(de.$$.fragment,e),_(ce.$$.fragment,e),_(pe.$$.fragment,e),_(me.$$.fragment,e),_(B.$$.fragment,e),_(ge.$$.fragment,e),_(ue.$$.fragment,e),_(fe.$$.fragment,e),_(_e.$$.fragment,e),_(he.$$.fragment,e),_(Z.$$.fragment,e),ot=!1},d(e){e&&(n($),n(v),n(p),n(i),n(P),n(Le),n(V),n(Je),n(z),n(Ge),n(We),n(Y),n(Ne),n(E),n(qe),n(Be),n(Ze),n(A),n(Fe),n(X),n(Oe),n(K),n(Ve),n(ze),n(te),n(He),n(Ye),n(Ee),n(oe),n(Qe),n(Re),n(w),n(Ae),n(Xe),n(y),n(Ke),n(et),n(D),n(tt),n(nt),n(T),n(at),n(De)),n(c),h(C,e),h(H,e),h(Q,e),h(R,e),h(ee,e),h(ne,e),h(ae,e),h(ie,e),h(se),h(re),h(W),h(le),h(de),h(ce,e),h(pe),h(me),h(B),h(ge,e),h(ue),h(fe,e),h(_e),h(he),h(Z)}}}const ln='{"title":"Stable Cascade","local":"stable-cascade","sections":[{"title":"Model Overview","local":"model-overview","sections":[],"depth":2},{"title":"Uses","local":"uses","sections":[{"title":"Direct Use","local":"direct-use","sections":[],"depth":3},{"title":"Out-of-Scope Use","local":"out-of-scope-use","sections":[],"depth":3}],"depth":2},{"title":"Limitations and Bias","local":"limitations-and-bias","sections":[{"title":"Limitations","local":"limitations","sections":[],"depth":3}],"depth":2},{"title":"StableCascadeCombinedPipeline","local":"diffusers.StableCascadeCombinedPipeline","sections":[],"depth":2},{"title":"StableCascadePriorPipeline","local":"diffusers.StableCascadePriorPipeline","sections":[],"depth":2},{"title":"StableCascadePriorPipelineOutput","local":"diffusers.pipelines.stable_cascade.pipeline_stable_cascade_prior.StableCascadePriorPipelineOutput","sections":[],"depth":2},{"title":"StableCascadeDecoderPipeline","local":"diffusers.StableCascadeDecoderPipeline","sections":[],"depth":2}],"depth":1}';function dn(G){return Kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _n extends en{constructor(c){super(),tn(this,c,dn,rn,Xt,{})}}export{_n as component};
