import{s as dt,o as ct,n as pt}from"../chunks/scheduler.182ea377.js";import{S as ft,i as mt,g as s,s as a,r as h,A as ut,h as r,f as n,c as o,j as U,u as _,x as f,k as N,y as l,a as i,v as b,d as v,t as P,w}from"../chunks/index.abf12888.js";import{T as gt}from"../chunks/Tip.230e2334.js";import{D as le}from"../chunks/Docstring.93f6f462.js";import{C as ht}from"../chunks/CodeBlock.57fe6e13.js";import{E as _t}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as Ce}from"../chunks/Heading.16916d63.js";function bt(X){let p,D='Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading#reuse-components-across-pipelines">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.';return{c(){p=s("p"),p.innerHTML=D},l(u){p=r(u,"P",{"data-svelte-h":!0}),f(p)!=="svelte-1wmc0l4"&&(p.innerHTML=D)},m(u,g){i(u,p,g)},p:pt,d(u){u&&n(p)}}}function vt(X){let p,D="Examples:",u,g,x;return g=new ht({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGFub3JhbWFQaXBlbGluZSUyQyUyMERESU1TY2hlZHVsZXIlMEElMEFtb2RlbF9ja3B0JTIwJTNEJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItYmFzZSUyMiUwQXNjaGVkdWxlciUyMCUzRCUyMERESU1TY2hlZHVsZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2NrcHQlMkMlMjBzdWJmb2xkZXIlM0QlMjJzY2hlZHVsZXIlMjIpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBhbm9yYW1hUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2NrcHQlMkMlMjBzY2hlZHVsZXIlM0RzY2hlZHVsZXIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTBBJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMHRoZSUyMGRvbG9taXRlcyUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",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> StableDiffusionPanoramaPipeline, DDIMScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span>model_ckpt = <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-base&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler = DDIMScheduler.from_pretrained(model_ckpt, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPanoramaPipeline.from_pretrained(
<span class="hljs-meta">... </span>    model_ckpt, scheduler=scheduler, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of the dolomites&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`,wrap:!1}}),{c(){p=s("p"),p.textContent=D,u=a(),h(g.$$.fragment)},l(m){p=r(m,"P",{"data-svelte-h":!0}),f(p)!=="svelte-kvfsh7"&&(p.textContent=D),u=o(m),_(g.$$.fragment,m)},m(m,y){i(m,p,y),i(m,u,y),b(g,m,y),x=!0},p:pt,i(m){x||(v(g.$$.fragment,m),x=!0)},o(m){P(g.$$.fragment,m),x=!1},d(m){m&&(n(p),n(u)),w(g,m)}}}function Pt(X){let p,D,u,g,x,m,y,Je='<a href="https://huggingface.co/papers/2302.08113" rel="nofollow">MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation</a> is by Omer Bar-Tal, Lior Yariv, Yaron Lipman, and Tali Dekel.',de,j,Re="The abstract from the paper is:",ce,z,qe="<em>Recent advances in text-to-image generation with diffusion models present transformative capabilities in image quality. However, user controllability of the generated image, and fast adaptation to new tasks still remains an open challenge, currently mostly addressed by costly and long re-training and fine-tuning or ad-hoc adaptations to specific image generation tasks. In this work, we present MultiDiffusion, a unified framework that enables versatile and controllable image generation, using a pre-trained text-to-image diffusion model, without any further training or finetuning. At the center of our approach is a new generation process, based on an optimization task that binds together multiple diffusion generation processes with a shared set of parameters or constraints. We show that MultiDiffusion can be readily applied to generate high quality and diverse images that adhere to user-provided controls, such as desired aspect ratio (e.g., panorama), and spatial guiding signals, ranging from tight segmentation masks to bounding boxes.</em>",fe,H,Be='You can find additional information about MultiDiffusion on the <a href="https://multidiffusion.github.io/" rel="nofollow">project page</a>, <a href="https://github.com/omerbt/MultiDiffusion" rel="nofollow">original codebase</a>, and try it out in a <a href="https://huggingface.co/spaces/weizmannscience/MultiDiffusion" rel="nofollow">demo</a>.',me,A,ue,E,We=`While calling <a href="/docs/diffusers/main/en/api/pipelines/panorama#diffusers.StableDiffusionPanoramaPipeline">StableDiffusionPanoramaPipeline</a>, it’s possible to specify the <code>view_batch_size</code> parameter to be &gt; 1.
For some GPUs with high performance, this can speedup the generation process and increase VRAM usage.`,ge,G,Ye="To generate panorama-like images make sure you pass the width parameter accordingly. We recommend a width value of 2048 which is the default.",he,Z,Qe="Circular padding is applied to ensure there are no stitching artifacts when working with panoramas to ensure a seamless transition from the rightmost part to the leftmost part. By enabling circular padding (set <code>circular_padding=True</code>), the operation applies additional crops after the rightmost point of the image, allowing the model to “see” the transition from the rightmost part to the leftmost part. This helps maintain visual consistency in a 360-degree sense and creates a proper “panorama” that can be viewed using 360-degree panorama viewers. When decoding latents in Stable Diffusion, circular padding is applied to ensure that the decoded latents match in the RGB space.",_e,F,Xe=`For example, without circular padding, there is a stitching artifact (default):
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/indoor_%20no_circular_padding.png" alt="img"/>`,be,O,Ke=`But with circular padding, the right and the left parts are matching (<code>circular_padding=True</code>):
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/indoor_%20circular_padding.png" alt="img"/>`,ve,k,Pe,V,we,d,J,Ie,K,et="Pipeline for text-to-image generation using MultiDiffusion.",Le,ee,tt=`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
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,Ue,te,nt="The pipeline also inherits the following loading methods:",Ne,ne,it='<li><a href="/docs/diffusers/main/en/api/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion">load_textual_inversion()</a> for loading textual inversion embeddings</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',je,$,R,ze,ie,at="The call function to the pipeline for generation.",He,S,Ae,C,q,Ee,ae,ot=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,Ge,I,B,Ze,oe,st=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Fe,L,W,Oe,se,rt="Encodes the prompt into text encoder hidden states.",xe,Y,ye,T,Q,Ve,re,lt="Output class for Stable Diffusion pipelines.",De,pe,$e;return x=new Ce({props:{title:"MultiDiffusion",local:"multidiffusion",headingTag:"h1"}}),A=new Ce({props:{title:"Tips",local:"tips",headingTag:"h2"}}),k=new gt({props:{$$slots:{default:[bt]},$$scope:{ctx:X}}}),V=new Ce({props:{title:"StableDiffusionPanoramaPipeline",local:"diffusers.StableDiffusionPanoramaPipeline",headingTag:"h2"}}),J=new le({props:{name:"class diffusers.StableDiffusionPanoramaPipeline",anchor:"diffusers.StableDiffusionPanoramaPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": DDIMScheduler"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"image_encoder",val:": typing.Optional[transformers.models.clip.modeling_clip.CLIPVisionModelWithProjection] = None"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPanoramaPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.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;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L62"}}),R=new le({props:{name:"__call__",anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": typing.Optional[int] = 512"},{name:"width",val:": typing.Optional[int] = 2048"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"view_batch_size",val:": int = 1"},{name:"negative_prompt",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor], NoneType] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": typing.Optional[int] = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"circular_padding",val:": bool = False"},{name:"clip_skip",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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.StableDiffusionPanoramaPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The width in pixels of the generated image. The width is kept high because the pipeline is supposed
generate panorama-like images.`,name:"width"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.view_batch_size",description:`<strong>view_batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The batch size to denoise split views. For some GPUs with high performance, higher view batch size can
speedup the generation and increase the VRAM usage.`,name:"view_batch_size"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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.StableDiffusionPanoramaPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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 is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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 (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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 (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.
ip_adapter_image &#x2014; (<code>PipelineImageInput</code>, <em>optional</em>):
Optional image input to work with IP Adapters.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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 generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function is called. If not specified, the callback is called at
every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.circular_padding",description:`<strong>circular_padding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If set to <code>True</code>, circular padding is applied to ensure there are no stitching artifacts. Circular
padding allows the model to seamlessly generate a transition from the rightmost part of the image to
the leftmost part, maintaining consistency in a 360-degree sense.`,name:"circular_padding"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L548",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
“not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),S=new _t({props:{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.example",$$slots:{default:[vt]},$$scope:{ctx:X}}}),q=new le({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionPanoramaPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L152"}}),B=new le({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionPanoramaPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L144"}}),W=new le({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"},{name:"clip_skip",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.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. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.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.StableDiffusionPanoramaPipeline.encode_prompt.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.StableDiffusionPanoramaPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A LoRA scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L193"}}),Y=new Ce({props:{title:"StableDiffusionPipelineOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),Q=new le({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_output.py#L11"}}),{c(){p=s("meta"),D=a(),u=s("p"),g=a(),h(x.$$.fragment),m=a(),y=s("p"),y.innerHTML=Je,de=a(),j=s("p"),j.textContent=Re,ce=a(),z=s("p"),z.innerHTML=qe,fe=a(),H=s("p"),H.innerHTML=Be,me=a(),h(A.$$.fragment),ue=a(),E=s("p"),E.innerHTML=We,ge=a(),G=s("p"),G.textContent=Ye,he=a(),Z=s("p"),Z.innerHTML=Qe,_e=a(),F=s("p"),F.innerHTML=Xe,be=a(),O=s("p"),O.innerHTML=Ke,ve=a(),h(k.$$.fragment),Pe=a(),h(V.$$.fragment),we=a(),d=s("div"),h(J.$$.fragment),Ie=a(),K=s("p"),K.textContent=et,Le=a(),ee=s("p"),ee.innerHTML=tt,Ue=a(),te=s("p"),te.textContent=nt,Ne=a(),ne=s("ul"),ne.innerHTML=it,je=a(),$=s("div"),h(R.$$.fragment),ze=a(),ie=s("p"),ie.textContent=at,He=a(),h(S.$$.fragment),Ae=a(),C=s("div"),h(q.$$.fragment),Ee=a(),ae=s("p"),ae.innerHTML=ot,Ge=a(),I=s("div"),h(B.$$.fragment),Ze=a(),oe=s("p"),oe.textContent=st,Fe=a(),L=s("div"),h(W.$$.fragment),Oe=a(),se=s("p"),se.textContent=rt,xe=a(),h(Y.$$.fragment),ye=a(),T=s("div"),h(Q.$$.fragment),Ve=a(),re=s("p"),re.textContent=lt,De=a(),pe=s("p"),this.h()},l(e){const t=ut("svelte-u9bgzb",document.head);p=r(t,"META",{name:!0,content:!0}),t.forEach(n),D=o(e),u=r(e,"P",{}),U(u).forEach(n),g=o(e),_(x.$$.fragment,e),m=o(e),y=r(e,"P",{"data-svelte-h":!0}),f(y)!=="svelte-iubh1u"&&(y.innerHTML=Je),de=o(e),j=r(e,"P",{"data-svelte-h":!0}),f(j)!=="svelte-1cwsb16"&&(j.textContent=Re),ce=o(e),z=r(e,"P",{"data-svelte-h":!0}),f(z)!=="svelte-muikgy"&&(z.innerHTML=qe),fe=o(e),H=r(e,"P",{"data-svelte-h":!0}),f(H)!=="svelte-nmxwil"&&(H.innerHTML=Be),me=o(e),_(A.$$.fragment,e),ue=o(e),E=r(e,"P",{"data-svelte-h":!0}),f(E)!=="svelte-a1zb81"&&(E.innerHTML=We),ge=o(e),G=r(e,"P",{"data-svelte-h":!0}),f(G)!=="svelte-10nxbu3"&&(G.textContent=Ye),he=o(e),Z=r(e,"P",{"data-svelte-h":!0}),f(Z)!=="svelte-1mn2x9s"&&(Z.innerHTML=Qe),_e=o(e),F=r(e,"P",{"data-svelte-h":!0}),f(F)!=="svelte-1etj7av"&&(F.innerHTML=Xe),be=o(e),O=r(e,"P",{"data-svelte-h":!0}),f(O)!=="svelte-qdh84m"&&(O.innerHTML=Ke),ve=o(e),_(k.$$.fragment,e),Pe=o(e),_(V.$$.fragment,e),we=o(e),d=r(e,"DIV",{class:!0});var c=U(d);_(J.$$.fragment,c),Ie=o(c),K=r(c,"P",{"data-svelte-h":!0}),f(K)!=="svelte-1katl0i"&&(K.textContent=et),Le=o(c),ee=r(c,"P",{"data-svelte-h":!0}),f(ee)!=="svelte-496sm0"&&(ee.innerHTML=tt),Ue=o(c),te=r(c,"P",{"data-svelte-h":!0}),f(te)!=="svelte-14s6m4u"&&(te.textContent=nt),Ne=o(c),ne=r(c,"UL",{"data-svelte-h":!0}),f(ne)!=="svelte-jjuyoc"&&(ne.innerHTML=it),je=o(c),$=r(c,"DIV",{class:!0});var M=U($);_(R.$$.fragment,M),ze=o(M),ie=r(M,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-50j04k"&&(ie.textContent=at),He=o(M),_(S.$$.fragment,M),M.forEach(n),Ae=o(c),C=r(c,"DIV",{class:!0});var Te=U(C);_(q.$$.fragment,Te),Ee=o(Te),ae=r(Te,"P",{"data-svelte-h":!0}),f(ae)!=="svelte-1s3c06i"&&(ae.innerHTML=ot),Te.forEach(n),Ge=o(c),I=r(c,"DIV",{class:!0});var Me=U(I);_(B.$$.fragment,Me),Ze=o(Me),oe=r(Me,"P",{"data-svelte-h":!0}),f(oe)!=="svelte-14bnrb6"&&(oe.textContent=st),Me.forEach(n),Fe=o(c),L=r(c,"DIV",{class:!0});var ke=U(L);_(W.$$.fragment,ke),Oe=o(ke),se=r(ke,"P",{"data-svelte-h":!0}),f(se)!=="svelte-16q0ax1"&&(se.textContent=rt),ke.forEach(n),c.forEach(n),xe=o(e),_(Y.$$.fragment,e),ye=o(e),T=r(e,"DIV",{class:!0});var Se=U(T);_(Q.$$.fragment,Se),Ve=o(Se),re=r(Se,"P",{"data-svelte-h":!0}),f(re)!=="svelte-1qpjiuf"&&(re.textContent=lt),Se.forEach(n),De=o(e),pe=r(e,"P",{}),U(pe).forEach(n),this.h()},h(){N(p,"name","hf:doc:metadata"),N(p,"content",wt),N($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(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){l(document.head,p),i(e,D,t),i(e,u,t),i(e,g,t),b(x,e,t),i(e,m,t),i(e,y,t),i(e,de,t),i(e,j,t),i(e,ce,t),i(e,z,t),i(e,fe,t),i(e,H,t),i(e,me,t),b(A,e,t),i(e,ue,t),i(e,E,t),i(e,ge,t),i(e,G,t),i(e,he,t),i(e,Z,t),i(e,_e,t),i(e,F,t),i(e,be,t),i(e,O,t),i(e,ve,t),b(k,e,t),i(e,Pe,t),b(V,e,t),i(e,we,t),i(e,d,t),b(J,d,null),l(d,Ie),l(d,K),l(d,Le),l(d,ee),l(d,Ue),l(d,te),l(d,Ne),l(d,ne),l(d,je),l(d,$),b(R,$,null),l($,ze),l($,ie),l($,He),b(S,$,null),l(d,Ae),l(d,C),b(q,C,null),l(C,Ee),l(C,ae),l(d,Ge),l(d,I),b(B,I,null),l(I,Ze),l(I,oe),l(d,Fe),l(d,L),b(W,L,null),l(L,Oe),l(L,se),i(e,xe,t),b(Y,e,t),i(e,ye,t),i(e,T,t),b(Q,T,null),l(T,Ve),l(T,re),i(e,De,t),i(e,pe,t),$e=!0},p(e,[t]){const c={};t&2&&(c.$$scope={dirty:t,ctx:e}),k.$set(c);const M={};t&2&&(M.$$scope={dirty:t,ctx:e}),S.$set(M)},i(e){$e||(v(x.$$.fragment,e),v(A.$$.fragment,e),v(k.$$.fragment,e),v(V.$$.fragment,e),v(J.$$.fragment,e),v(R.$$.fragment,e),v(S.$$.fragment,e),v(q.$$.fragment,e),v(B.$$.fragment,e),v(W.$$.fragment,e),v(Y.$$.fragment,e),v(Q.$$.fragment,e),$e=!0)},o(e){P(x.$$.fragment,e),P(A.$$.fragment,e),P(k.$$.fragment,e),P(V.$$.fragment,e),P(J.$$.fragment,e),P(R.$$.fragment,e),P(S.$$.fragment,e),P(q.$$.fragment,e),P(B.$$.fragment,e),P(W.$$.fragment,e),P(Y.$$.fragment,e),P(Q.$$.fragment,e),$e=!1},d(e){e&&(n(D),n(u),n(g),n(m),n(y),n(de),n(j),n(ce),n(z),n(fe),n(H),n(me),n(ue),n(E),n(ge),n(G),n(he),n(Z),n(_e),n(F),n(be),n(O),n(ve),n(Pe),n(we),n(d),n(xe),n(ye),n(T),n(De),n(pe)),n(p),w(x,e),w(A,e),w(k,e),w(V,e),w(J),w(R),w(S),w(q),w(B),w(W),w(Y,e),w(Q)}}}const wt='{"title":"MultiDiffusion","local":"multidiffusion","sections":[{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"StableDiffusionPanoramaPipeline","local":"diffusers.StableDiffusionPanoramaPipeline","sections":[],"depth":2},{"title":"StableDiffusionPipelineOutput","local":"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput","sections":[],"depth":2}],"depth":1}';function xt(X){return ct(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ct extends ft{constructor(p){super(),mt(this,p,xt,Pt,dt,{})}}export{Ct as component};
