import{s as Pt,o as yt,n as xt}from"../chunks/scheduler.53228c21.js";import{S as Dt,i as $t,e as s,s as a,c as u,h as Tt,a as r,d as t,b as o,f as S,j as p,g,k as x,l,m as i,n as h,t as _,o as b,p as v}from"../chunks/index.100fac89.js";import{C as St}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{D as oe}from"../chunks/Docstring.db856a1e.js";import{C as kt}from"../chunks/CodeBlock.d30a6509.js";import{E as Mt}from"../chunks/ExampleCodeBlock.3eb26ae1.js";import{H as Ze,E as Lt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function It(he){let d,j="Examples:",D,P,w;return P=new kt({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(){d=s("p"),d.textContent=j,D=a(),u(P.$$.fragment)},l(c){d=r(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-kvfsh7"&&(d.textContent=j),D=o(c),g(P.$$.fragment,c)},m(c,k){i(c,d,k),i(c,D,k),h(P,c,k),w=!0},p:xt,i(c){w||(_(P.$$.fragment,c),w=!0)},o(c){b(P.$$.fragment,c),w=!1},d(c){c&&(t(d),t(D)),v(P,c)}}}function Ct(he){let d,j,D,P,w,c="<p>This pipeline is deprecated but it can still be used. However, we won’t test the pipeline anymore and won’t accept any changes to it. If you run into any issues, reinstall the last Diffusers version that supported this model.</p>",k,z,_e,E,be,M,nt='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/>',ve,G,it='<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.',we,N,at="The abstract from the paper is:",Pe,Z,ot="<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>",ye,q,st='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>.',xe,V,De,A,rt=`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.`,$e,J,lt="To generate panorama-like images make sure you pass the width parameter accordingly. We recommend a width value of 2048 which is the default.",Te,R,pt="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.",Se,B,dt=`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"/>`,ke,F,ct=`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"/>`,Me,L,mt='<p>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-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.</p>',Le,W,Ie,m,Y,qe,$,Q,Ve,se,ft="The call function to the pipeline for generation.",Ae,I,Je,y,X,Re,re,ut="Decode the given latents with padding for circular inference.",Be,le,gt="Notes:",Fe,pe,ht="<li>The padding is added to remove boundary artifacts and improve the output quality.</li> <li>This would slightly increase the memory usage.</li> <li>The padding pixels are then removed from the decoded image.</li>",We,C,K,Ye,de,_t="Encodes the prompt into text encoder hidden states.",Qe,U,ee,Xe,ce,bt='See <a href="https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298" rel="nofollow">https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298</a>',Ke,H,te,et,me,vt=`Generates a list of views based on the given parameters. Here, we define the mappings F_i (see Eq. 7 in the
MultiDiffusion paper <a href="https://huggingface.co/papers/2302.08113" rel="nofollow">https://huggingface.co/papers/2302.08113</a>). If panorama’s height/width &lt; window_size,
num_blocks of height/width should return 1.`,Ce,ne,Ue,T,ie,tt,fe,wt="Output class for Stable Diffusion pipelines.",He,ae,Oe,ge,je;return z=new St({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),E=new Ze({props:{title:"MultiDiffusion",local:"multidiffusion",headingTag:"h1"}}),V=new Ze({props:{title:"Tips",local:"tips",headingTag:"h2"}}),W=new Ze({props:{title:"StableDiffusionPanoramaPipeline",local:"diffusers.StableDiffusionPanoramaPipeline",headingTag:"h2"}}),Y=new oe({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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L158"}}),Q=new oe({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:"timesteps",val:": typing.List[int] = None"},{name:"guidance_scale",val:": float = 7.5"},{name:"view_batch_size",val:": int = 1"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor], NoneType] = None"},{name:"ip_adapter_image_embeds",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"cross_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"guidance_rescale",val:": float = 0.0"},{name:"circular_padding",val:": bool = False"},{name:"clip_skip",val:": typing.Optional[int] = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"**kwargs",val:": typing.Any"}],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__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
The timesteps at which to generate the images. If not specified, then the default timestep spacing
strategy of the scheduler is used.`,name:"timesteps"},{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://huggingface.co/papers/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.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor 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.Tensor</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.Tensor</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.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.ip_adapter_image",description:`<strong>ip_adapter_image</strong> &#x2014; (<code>PipelineImageInput</code>, <em>optional</em>):
Optional image input to work with IP Adapters.`,name:"ip_adapter_image"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>List[torch.Tensor]</code>, <em>optional</em>) &#x2014;
Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of
IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. It should
contain the negative image embedding if <code>do_classifier_free_guidance</code> is set to <code>True</code>. If not
provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"ip_adapter_image_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/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{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__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
A rescaling factor for the guidance embeddings. A value of 0.0 means no rescaling is applied.`,name:"guidance_rescale"},{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"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.__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.StableDiffusionPanoramaPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List[str]</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_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L801",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/text2img#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/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),I=new Mt({props:{anchor:"diffusers.StableDiffusionPanoramaPipeline.__call__.example",$$slots:{default:[It]},$$scope:{ctx:he}}}),X=new oe({props:{name:"decode_latents_with_padding",anchor:"diffusers.StableDiffusionPanoramaPipeline.decode_latents_with_padding",parameters:[{name:"latents",val:": Tensor"},{name:"padding",val:": int = 8"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPanoramaPipeline.decode_latents_with_padding.latents",description:"<strong>latents</strong> (torch.Tensor) &#x2014; The input latents to decode.",name:"latents"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.decode_latents_with_padding.padding",description:"<strong>padding</strong> (int, optional) &#x2014; The number of latents to add on each side for padding. Defaults to 8.",name:"padding"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L563",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The decoded image with padding removed.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>torch.Tensor</p>
`}}),K=new oe({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.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = 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`,name:"prompt"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{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.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.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#L283"}}),ee=new oe({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.StableDiffusionPanoramaPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:": Tensor"},{name:"embedding_dim",val:": int = 512"},{name:"dtype",val:": dtype = torch.float32"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_guidance_scale_embedding.w",description:`<strong>w</strong> (<code>torch.Tensor</code>) &#x2014;
Generate embedding vectors with a specified guidance scale to subsequently enrich timestep embeddings.`,name:"w"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_guidance_scale_embedding.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimension of the embeddings to generate.`,name:"embedding_dim"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_guidance_scale_embedding.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
Data type of the generated embeddings.`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L701",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Embedding vectors with shape <code>(len(w), embedding_dim)</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),te=new oe({props:{name:"get_views",anchor:"diffusers.StableDiffusionPanoramaPipeline.get_views",parameters:[{name:"panorama_height",val:": int"},{name:"panorama_width",val:": int"},{name:"window_size",val:": int = 64"},{name:"stride",val:": int = 8"},{name:"circular_padding",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_views.panorama_height",description:"<strong>panorama_height</strong> (int) &#x2014; The height of the panorama.",name:"panorama_height"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_views.panorama_width",description:"<strong>panorama_width</strong> (int) &#x2014; The width of the panorama.",name:"panorama_width"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_views.window_size",description:"<strong>window_size</strong> (int, optional) &#x2014; The size of the window. Defaults to 64.",name:"window_size"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_views.stride",description:"<strong>stride</strong> (int, optional) &#x2014; The stride value. Defaults to 8.",name:"stride"},{anchor:"diffusers.StableDiffusionPanoramaPipeline.get_views.circular_padding",description:"<strong>circular_padding</strong> (bool, optional) &#x2014; Whether to apply circular padding. Defaults to False.",name:"circular_padding"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py#L731",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of tuples representing the views. Each tuple contains four integers
representing the start and end coordinates of the window in the panorama.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List[Tuple[int, int, int, int]]</p>
`}}),ne=new Ze({props:{title:"StableDiffusionPipelineOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),ie=new oe({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"}}),ae=new Lt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/panorama.md"}}),{c(){d=s("meta"),j=a(),D=s("p"),P=a(),w=s("blockquote"),w.innerHTML=c,k=a(),u(z.$$.fragment),_e=a(),u(E.$$.fragment),be=a(),M=s("div"),M.innerHTML=nt,ve=a(),G=s("p"),G.innerHTML=it,we=a(),N=s("p"),N.textContent=at,Pe=a(),Z=s("p"),Z.innerHTML=ot,ye=a(),q=s("p"),q.innerHTML=st,xe=a(),u(V.$$.fragment),De=a(),A=s("p"),A.innerHTML=rt,$e=a(),J=s("p"),J.textContent=lt,Te=a(),R=s("p"),R.innerHTML=pt,Se=a(),B=s("p"),B.innerHTML=dt,ke=a(),F=s("p"),F.innerHTML=ct,Me=a(),L=s("blockquote"),L.innerHTML=mt,Le=a(),u(W.$$.fragment),Ie=a(),m=s("div"),u(Y.$$.fragment),qe=a(),$=s("div"),u(Q.$$.fragment),Ve=a(),se=s("p"),se.textContent=ft,Ae=a(),u(I.$$.fragment),Je=a(),y=s("div"),u(X.$$.fragment),Re=a(),re=s("p"),re.textContent=ut,Be=a(),le=s("p"),le.textContent=gt,Fe=a(),pe=s("ul"),pe.innerHTML=ht,We=a(),C=s("div"),u(K.$$.fragment),Ye=a(),de=s("p"),de.textContent=_t,Qe=a(),U=s("div"),u(ee.$$.fragment),Xe=a(),ce=s("p"),ce.innerHTML=bt,Ke=a(),H=s("div"),u(te.$$.fragment),et=a(),me=s("p"),me.innerHTML=vt,Ce=a(),u(ne.$$.fragment),Ue=a(),T=s("div"),u(ie.$$.fragment),tt=a(),fe=s("p"),fe.textContent=wt,He=a(),u(ae.$$.fragment),Oe=a(),ge=s("p"),this.h()},l(e){const n=Tt("svelte-u9bgzb",document.head);d=r(n,"META",{name:!0,content:!0}),n.forEach(t),j=o(e),D=r(e,"P",{}),S(D).forEach(t),P=o(e),w=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(w)!=="svelte-124tjg"&&(w.innerHTML=c),k=o(e),g(z.$$.fragment,e),_e=o(e),g(E.$$.fragment,e),be=o(e),M=r(e,"DIV",{class:!0,"data-svelte-h":!0}),p(M)!=="svelte-si9ct8"&&(M.innerHTML=nt),ve=o(e),G=r(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-iubh1u"&&(G.innerHTML=it),we=o(e),N=r(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-1cwsb16"&&(N.textContent=at),Pe=o(e),Z=r(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-muikgy"&&(Z.innerHTML=ot),ye=o(e),q=r(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-nmxwil"&&(q.innerHTML=st),xe=o(e),g(V.$$.fragment,e),De=o(e),A=r(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-a1zb81"&&(A.innerHTML=rt),$e=o(e),J=r(e,"P",{"data-svelte-h":!0}),p(J)!=="svelte-10nxbu3"&&(J.textContent=lt),Te=o(e),R=r(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-1mn2x9s"&&(R.innerHTML=pt),Se=o(e),B=r(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-1etj7av"&&(B.innerHTML=dt),ke=o(e),F=r(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-qdh84m"&&(F.innerHTML=ct),Me=o(e),L=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(L)!=="svelte-r1jcqf"&&(L.innerHTML=mt),Le=o(e),g(W.$$.fragment,e),Ie=o(e),m=r(e,"DIV",{class:!0});var f=S(m);g(Y.$$.fragment,f),qe=o(f),$=r(f,"DIV",{class:!0});var ue=S($);g(Q.$$.fragment,ue),Ve=o(ue),se=r(ue,"P",{"data-svelte-h":!0}),p(se)!=="svelte-50j04k"&&(se.textContent=ft),Ae=o(ue),g(I.$$.fragment,ue),ue.forEach(t),Je=o(f),y=r(f,"DIV",{class:!0});var O=S(y);g(X.$$.fragment,O),Re=o(O),re=r(O,"P",{"data-svelte-h":!0}),p(re)!=="svelte-11enoo7"&&(re.textContent=ut),Be=o(O),le=r(O,"P",{"data-svelte-h":!0}),p(le)!=="svelte-1biq3pv"&&(le.textContent=gt),Fe=o(O),pe=r(O,"UL",{"data-svelte-h":!0}),p(pe)!=="svelte-mb20u9"&&(pe.innerHTML=ht),O.forEach(t),We=o(f),C=r(f,"DIV",{class:!0});var ze=S(C);g(K.$$.fragment,ze),Ye=o(ze),de=r(ze,"P",{"data-svelte-h":!0}),p(de)!=="svelte-16q0ax1"&&(de.textContent=_t),ze.forEach(t),Qe=o(f),U=r(f,"DIV",{class:!0});var Ee=S(U);g(ee.$$.fragment,Ee),Xe=o(Ee),ce=r(Ee,"P",{"data-svelte-h":!0}),p(ce)!=="svelte-vo59ec"&&(ce.innerHTML=bt),Ee.forEach(t),Ke=o(f),H=r(f,"DIV",{class:!0});var Ge=S(H);g(te.$$.fragment,Ge),et=o(Ge),me=r(Ge,"P",{"data-svelte-h":!0}),p(me)!=="svelte-zs34v9"&&(me.innerHTML=vt),Ge.forEach(t),f.forEach(t),Ce=o(e),g(ne.$$.fragment,e),Ue=o(e),T=r(e,"DIV",{class:!0});var Ne=S(T);g(ie.$$.fragment,Ne),tt=o(Ne),fe=r(Ne,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-1qpjiuf"&&(fe.textContent=wt),Ne.forEach(t),He=o(e),g(ae.$$.fragment,e),Oe=o(e),ge=r(e,"P",{}),S(ge).forEach(t),this.h()},h(){x(d,"name","hf:doc:metadata"),x(d,"content",Ut),x(w,"class","warning"),x(M,"class","flex flex-wrap space-x-1"),x(L,"class","tip"),x($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(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,n){l(document.head,d),i(e,j,n),i(e,D,n),i(e,P,n),i(e,w,n),i(e,k,n),h(z,e,n),i(e,_e,n),h(E,e,n),i(e,be,n),i(e,M,n),i(e,ve,n),i(e,G,n),i(e,we,n),i(e,N,n),i(e,Pe,n),i(e,Z,n),i(e,ye,n),i(e,q,n),i(e,xe,n),h(V,e,n),i(e,De,n),i(e,A,n),i(e,$e,n),i(e,J,n),i(e,Te,n),i(e,R,n),i(e,Se,n),i(e,B,n),i(e,ke,n),i(e,F,n),i(e,Me,n),i(e,L,n),i(e,Le,n),h(W,e,n),i(e,Ie,n),i(e,m,n),h(Y,m,null),l(m,qe),l(m,$),h(Q,$,null),l($,Ve),l($,se),l($,Ae),h(I,$,null),l(m,Je),l(m,y),h(X,y,null),l(y,Re),l(y,re),l(y,Be),l(y,le),l(y,Fe),l(y,pe),l(m,We),l(m,C),h(K,C,null),l(C,Ye),l(C,de),l(m,Qe),l(m,U),h(ee,U,null),l(U,Xe),l(U,ce),l(m,Ke),l(m,H),h(te,H,null),l(H,et),l(H,me),i(e,Ce,n),h(ne,e,n),i(e,Ue,n),i(e,T,n),h(ie,T,null),l(T,tt),l(T,fe),i(e,He,n),h(ae,e,n),i(e,Oe,n),i(e,ge,n),je=!0},p(e,[n]){const f={};n&2&&(f.$$scope={dirty:n,ctx:e}),I.$set(f)},i(e){je||(_(z.$$.fragment,e),_(E.$$.fragment,e),_(V.$$.fragment,e),_(W.$$.fragment,e),_(Y.$$.fragment,e),_(Q.$$.fragment,e),_(I.$$.fragment,e),_(X.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),_(ie.$$.fragment,e),_(ae.$$.fragment,e),je=!0)},o(e){b(z.$$.fragment,e),b(E.$$.fragment,e),b(V.$$.fragment,e),b(W.$$.fragment,e),b(Y.$$.fragment,e),b(Q.$$.fragment,e),b(I.$$.fragment,e),b(X.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(ne.$$.fragment,e),b(ie.$$.fragment,e),b(ae.$$.fragment,e),je=!1},d(e){e&&(t(j),t(D),t(P),t(w),t(k),t(_e),t(be),t(M),t(ve),t(G),t(we),t(N),t(Pe),t(Z),t(ye),t(q),t(xe),t(De),t(A),t($e),t(J),t(Te),t(R),t(Se),t(B),t(ke),t(F),t(Me),t(L),t(Le),t(Ie),t(m),t(Ce),t(Ue),t(T),t(He),t(Oe),t(ge)),t(d),v(z,e),v(E,e),v(V,e),v(W,e),v(Y),v(Q),v(I),v(X),v(K),v(ee),v(te),v(ne,e),v(ie),v(ae,e)}}}const Ut='{"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 Ht(he){return yt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qt extends Dt{constructor(d){super(),$t(this,d,Ht,Ct,Pt,{})}}export{qt as component};
