import{s as at,o as rt,n as qe}from"../chunks/scheduler.8c3d61f6.js";import{S as lt,i as pt,g as r,s,r as u,A as dt,h as l,f as n,c as a,j as O,u as g,x as m,k as T,y as d,a as i,v as _,d as h,t as b,w as D}from"../chunks/index.da70eac4.js";import{T as st}from"../chunks/Tip.1d9b8c37.js";import{D as pe}from"../chunks/Docstring.91dd4639.js";import{C as ct}from"../chunks/CodeBlock.a9c4becf.js";import{E as mt}from"../chunks/ExampleCodeBlock.d368b7c4.js";import{H as Ce,E as ft}from"../chunks/getInferenceSnippets.28ca3596.js";function ut(k){let o,v="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.";return{c(){o=r("p"),o.textContent=v},l(p){o=l(p,"P",{"data-svelte-h":!0}),m(o)!=="svelte-ic4u42"&&(o.textContent=v)},m(p,f){i(p,o,f)},p:qe,d(p){p&&n(o)}}}function gt(k){let o,v='Make sure to check out the Stable Diffusion <a href="overview#tips">Tips</a> section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!';return{c(){o=r("p"),o.innerHTML=v},l(p){o=l(p,"P",{"data-svelte-h":!0}),m(o)!=="svelte-1j961ct"&&(o.innerHTML=v)},m(p,f){i(p,o,f)},p:qe,d(p){p&&n(o)}}}function _t(k){let o,v="Examples:",p,f,y;return f=new ct({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkxETTNEUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uTERNM0RQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIySW50ZWwlMkZsZG0zZC00YyUyMiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFvdXRwdXQlMjAlM0QlMjBwaXBlKHByb21wdCklMEFyZ2JfaW1hZ2UlMkMlMjBkZXB0aF9pbWFnZSUyMCUzRCUyMG91dHB1dC5yZ2IlMkMlMjBvdXRwdXQuZGVwdGglMEFyZ2JfaW1hZ2UlNUIwJTVELnNhdmUoJTIyYXN0cm9uYXV0X2xkbTNkX3JnYi5qcGclMjIpJTBBZGVwdGhfaW1hZ2UlNUIwJTVELnNhdmUoJTIyYXN0cm9uYXV0X2xkbTNkX2RlcHRoLnBuZyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionLDM3DPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionLDM3DPipeline.from_pretrained(<span class="hljs-string">&quot;Intel/ldm3d-4c&quot;</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 an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(prompt)
<span class="hljs-meta">&gt;&gt;&gt; </span>rgb_image, depth_image = output.rgb, output.depth
<span class="hljs-meta">&gt;&gt;&gt; </span>rgb_image[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;astronaut_ldm3d_rgb.jpg&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>depth_image[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;astronaut_ldm3d_depth.png&quot;</span>)`,wrap:!1}}),{c(){o=r("p"),o.textContent=v,p=s(),u(f.$$.fragment)},l(c){o=l(c,"P",{"data-svelte-h":!0}),m(o)!=="svelte-kvfsh7"&&(o.textContent=v),p=a(c),g(f.$$.fragment,c)},m(c,L){i(c,o,L),i(c,p,L),_(f,c,L),y=!0},p:qe,i(c){y||(h(f.$$.fragment,c),y=!0)},o(c){b(f.$$.fragment,c),y=!1},d(c){c&&(n(o),n(p)),D(f,c)}}}function ht(k){let o,v,p,f,y,c,L,ce,I,Ae='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/>',me,j,Je='LDM3D was proposed in <a href="https://huggingface.co/papers/2305.10853" rel="nofollow">LDM3D: Latent Diffusion Model for 3D</a> by Gabriela Ben Melech Stan, Diana Wofk, Scottie Fox, Alex Redden, Will Saxton, Jean Yu, Estelle Aflalo, Shao-Yen Tseng, Fabio Nonato, Matthias Muller, and Vasudev Lal. LDM3D generates an image and a depth map from a given text prompt unlike the existing text-to-image diffusion models such as <a href="./overview">Stable Diffusion</a> which only generates an image. With almost the same number of parameters, LDM3D achieves to create a latent space that can compress both the RGB images and the depth maps.',fe,R,We="Two checkpoints are available for use:",ue,B,Xe='<li><a href="https://huggingface.co/Intel/ldm3d" rel="nofollow">ldm3d-original</a>. The original checkpoint used in the <a href="https://huggingface.co/papers/2305.10853" rel="nofollow">paper</a></li> <li><a href="https://huggingface.co/Intel/ldm3d-4c" rel="nofollow">ldm3d-4c</a>. The new version of LDM3D using 4 channels inputs instead of 6-channels inputs and finetuned on higher resolution images.</li>',ge,E,Ve="The abstract from the paper is:",_e,Z,ze='<em>This research paper proposes a Latent Diffusion Model for 3D (LDM3D) that generates both image and depth map data from a given text prompt, allowing users to generate RGBD images from text prompts. The LDM3D model is fine-tuned on a dataset of tuples containing an RGB image, depth map and caption, and validated through extensive experiments. We also develop an application called DepthFusion, which uses the generated RGB images and depth maps to create immersive and interactive 360-degree-view experiences using TouchDesigner. This technology has the potential to transform a wide range of industries, from entertainment and gaming to architecture and design. Overall, this paper presents a significant contribution to the field of generative AI and computer vision, and showcases the potential of LDM3D and DepthFusion to revolutionize content creation and digital experiences. A short video summarizing the approach can be found at <a href="https://t.ly/tdi2" rel="nofollow">this url</a>.</em>',he,S,be,H,De,w,q,Ne,$,A,Ge,ie,Ye="The call function to the pipeline for generation.",Ue,C,Oe,N,J,je,oe,Fe="Encodes the prompt into text encoder hidden states.",Re,G,W,Be,se,Qe='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>',ve,X,ye,x,V,Ee,ae,Ke="Output class for Stable Diffusion pipelines.",Ze,U,z,He,re,et="Call self as a function.",we,Y,Le,F,tt='<a href="https://huggingface.co/papers/2311.03226" rel="nofollow">LDM3D-VR</a> is an extended version of LDM3D.',xe,Q,nt=`The abstract from the paper is:
<em>Latent diffusion models have proven to be state-of-the-art in the creation and manipulation of visual outputs. However, as far as we know, the generation of depth maps jointly with RGB is still limited. We introduce LDM3D-VR, a suite of diffusion models targeting virtual reality development that includes LDM3D-pano and LDM3D-SR. These models enable the generation of panoramic RGBD based on textual prompts and the upscaling of low-resolution inputs to high-resolution RGBD, respectively. Our models are fine-tuned from existing pretrained models on datasets containing panoramic/high-resolution RGB images, depth maps and captions. Both models are evaluated in comparison to existing related methods</em>`,Me,K,it="Two checkpoints are available for use:",$e,ee,ot='<li><a href="https://huggingface.co/Intel/ldm3d-pano" rel="nofollow">ldm3d-pano</a>. This checkpoint enables the generation of panoramic images and requires the StableDiffusionLDM3DPipeline pipeline to be used.</li> <li><a href="https://huggingface.co/Intel/ldm3d-sr" rel="nofollow">ldm3d-sr</a>. This checkpoint enables the upscaling of RGB and depth images. Can be used in cascade after the original LDM3D pipeline using the StableDiffusionUpscaleLDM3DPipeline from communauty pipeline.</li>',Pe,te,Te,de,ke;return y=new st({props:{warning:!0,$$slots:{default:[ut]},$$scope:{ctx:k}}}),L=new Ce({props:{title:"Text-to-(RGB, depth)",local:"text-to-rgb-depth",headingTag:"h1"}}),S=new st({props:{$$slots:{default:[gt]},$$scope:{ctx:k}}}),H=new Ce({props:{title:"StableDiffusionLDM3DPipeline",local:"diffusers.StableDiffusionLDM3DPipeline",headingTag:"h2"}}),q=new pe({props:{name:"class diffusers.StableDiffusionLDM3DPipeline",anchor:"diffusers.StableDiffusionLDM3DPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"image_encoder",val:": typing.Optional[transformers.models.clip.modeling_clip.CLIPVisionModelWithProjection]"},{name:"requires_safety_checker",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py#L180"}}),A=new pe({props:{name:"__call__",anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 49"},{name:"timesteps",val:": typing.List[int] = None"},{name:"sigmas",val:": typing.List[float] = None"},{name:"guidance_scale",val:": float = 5.0"},{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:"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:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in
their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed
will be used.`,name:"sigmas"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 5.0) &#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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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 in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py#L747",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>
`}}),C=new mt({props:{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.example",$$slots:{default:[_t]},$$scope:{ctx:k}}}),J=new pe({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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_ldm3d/pipeline_stable_diffusion_ldm3d.py#L307"}}),W=new pe({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.StableDiffusionLDM3DPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:": Tensor"},{name:"embedding_dim",val:": int = 512"},{name:"dtype",val:": dtype = torch.float32"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.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_ldm3d/pipeline_stable_diffusion_ldm3d.py#L686",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>
`}}),X=new Ce({props:{title:"LDM3DPipelineOutput",local:"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput",headingTag:"h2"}}),V=new pe({props:{name:"class diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput",parameters:[{name:"rgb",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"depth",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_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput.rgb",description:`<strong>rgb</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:"rgb"},{anchor:"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput.depth",description:`<strong>depth</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:"depth"},{anchor:"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput.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_ldm3d/pipeline_stable_diffusion_ldm3d.py#L159"}}),z=new pe({props:{name:"__call__",anchor:"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),Y=new Ce({props:{title:"Upscaler",local:"upscaler",headingTag:"h1"}}),te=new ft({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md"}}),{c(){o=r("meta"),v=s(),p=r("p"),f=s(),u(y.$$.fragment),c=s(),u(L.$$.fragment),ce=s(),I=r("div"),I.innerHTML=Ae,me=s(),j=r("p"),j.innerHTML=Je,fe=s(),R=r("p"),R.textContent=We,ue=s(),B=r("ul"),B.innerHTML=Xe,ge=s(),E=r("p"),E.textContent=Ve,_e=s(),Z=r("p"),Z.innerHTML=ze,he=s(),u(S.$$.fragment),be=s(),u(H.$$.fragment),De=s(),w=r("div"),u(q.$$.fragment),Ne=s(),$=r("div"),u(A.$$.fragment),Ge=s(),ie=r("p"),ie.textContent=Ye,Ue=s(),u(C.$$.fragment),Oe=s(),N=r("div"),u(J.$$.fragment),je=s(),oe=r("p"),oe.textContent=Fe,Re=s(),G=r("div"),u(W.$$.fragment),Be=s(),se=r("p"),se.innerHTML=Qe,ve=s(),u(X.$$.fragment),ye=s(),x=r("div"),u(V.$$.fragment),Ee=s(),ae=r("p"),ae.textContent=Ke,Ze=s(),U=r("div"),u(z.$$.fragment),He=s(),re=r("p"),re.textContent=et,we=s(),u(Y.$$.fragment),Le=s(),F=r("p"),F.innerHTML=tt,xe=s(),Q=r("p"),Q.innerHTML=nt,Me=s(),K=r("p"),K.textContent=it,$e=s(),ee=r("ul"),ee.innerHTML=ot,Pe=s(),u(te.$$.fragment),Te=s(),de=r("p"),this.h()},l(e){const t=dt("svelte-u9bgzb",document.head);o=l(t,"META",{name:!0,content:!0}),t.forEach(n),v=a(e),p=l(e,"P",{}),O(p).forEach(n),f=a(e),g(y.$$.fragment,e),c=a(e),g(L.$$.fragment,e),ce=a(e),I=l(e,"DIV",{class:!0,"data-svelte-h":!0}),m(I)!=="svelte-si9ct8"&&(I.innerHTML=Ae),me=a(e),j=l(e,"P",{"data-svelte-h":!0}),m(j)!=="svelte-1lwy4q6"&&(j.innerHTML=Je),fe=a(e),R=l(e,"P",{"data-svelte-h":!0}),m(R)!=="svelte-1lk6a0a"&&(R.textContent=We),ue=a(e),B=l(e,"UL",{"data-svelte-h":!0}),m(B)!=="svelte-fl6qu4"&&(B.innerHTML=Xe),ge=a(e),E=l(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1cwsb16"&&(E.textContent=Ve),_e=a(e),Z=l(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-llz6tv"&&(Z.innerHTML=ze),he=a(e),g(S.$$.fragment,e),be=a(e),g(H.$$.fragment,e),De=a(e),w=l(e,"DIV",{class:!0});var M=O(w);g(q.$$.fragment,M),Ne=a(M),$=l(M,"DIV",{class:!0});var P=O($);g(A.$$.fragment,P),Ge=a(P),ie=l(P,"P",{"data-svelte-h":!0}),m(ie)!=="svelte-50j04k"&&(ie.textContent=Ye),Ue=a(P),g(C.$$.fragment,P),P.forEach(n),Oe=a(M),N=l(M,"DIV",{class:!0});var ne=O(N);g(J.$$.fragment,ne),je=a(ne),oe=l(ne,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-16q0ax1"&&(oe.textContent=Fe),ne.forEach(n),Re=a(M),G=l(M,"DIV",{class:!0});var Ie=O(G);g(W.$$.fragment,Ie),Be=a(Ie),se=l(Ie,"P",{"data-svelte-h":!0}),m(se)!=="svelte-vo59ec"&&(se.innerHTML=Qe),Ie.forEach(n),M.forEach(n),ve=a(e),g(X.$$.fragment,e),ye=a(e),x=l(e,"DIV",{class:!0});var le=O(x);g(V.$$.fragment,le),Ee=a(le),ae=l(le,"P",{"data-svelte-h":!0}),m(ae)!=="svelte-1qpjiuf"&&(ae.textContent=Ke),Ze=a(le),U=l(le,"DIV",{class:!0});var Se=O(U);g(z.$$.fragment,Se),He=a(Se),re=l(Se,"P",{"data-svelte-h":!0}),m(re)!=="svelte-1eed40t"&&(re.textContent=et),Se.forEach(n),le.forEach(n),we=a(e),g(Y.$$.fragment,e),Le=a(e),F=l(e,"P",{"data-svelte-h":!0}),m(F)!=="svelte-1hh6hhp"&&(F.innerHTML=tt),xe=a(e),Q=l(e,"P",{"data-svelte-h":!0}),m(Q)!=="svelte-1k3azh3"&&(Q.innerHTML=nt),Me=a(e),K=l(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-1lk6a0a"&&(K.textContent=it),$e=a(e),ee=l(e,"UL",{"data-svelte-h":!0}),m(ee)!=="svelte-sdp7m1"&&(ee.innerHTML=ot),Pe=a(e),g(te.$$.fragment,e),Te=a(e),de=l(e,"P",{}),O(de).forEach(n),this.h()},h(){T(o,"name","hf:doc:metadata"),T(o,"content",bt),T(I,"class","flex flex-wrap space-x-1"),T($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(x,"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){d(document.head,o),i(e,v,t),i(e,p,t),i(e,f,t),_(y,e,t),i(e,c,t),_(L,e,t),i(e,ce,t),i(e,I,t),i(e,me,t),i(e,j,t),i(e,fe,t),i(e,R,t),i(e,ue,t),i(e,B,t),i(e,ge,t),i(e,E,t),i(e,_e,t),i(e,Z,t),i(e,he,t),_(S,e,t),i(e,be,t),_(H,e,t),i(e,De,t),i(e,w,t),_(q,w,null),d(w,Ne),d(w,$),_(A,$,null),d($,Ge),d($,ie),d($,Ue),_(C,$,null),d(w,Oe),d(w,N),_(J,N,null),d(N,je),d(N,oe),d(w,Re),d(w,G),_(W,G,null),d(G,Be),d(G,se),i(e,ve,t),_(X,e,t),i(e,ye,t),i(e,x,t),_(V,x,null),d(x,Ee),d(x,ae),d(x,Ze),d(x,U),_(z,U,null),d(U,He),d(U,re),i(e,we,t),_(Y,e,t),i(e,Le,t),i(e,F,t),i(e,xe,t),i(e,Q,t),i(e,Me,t),i(e,K,t),i(e,$e,t),i(e,ee,t),i(e,Pe,t),_(te,e,t),i(e,Te,t),i(e,de,t),ke=!0},p(e,[t]){const M={};t&2&&(M.$$scope={dirty:t,ctx:e}),y.$set(M);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),S.$set(P);const ne={};t&2&&(ne.$$scope={dirty:t,ctx:e}),C.$set(ne)},i(e){ke||(h(y.$$.fragment,e),h(L.$$.fragment,e),h(S.$$.fragment,e),h(H.$$.fragment,e),h(q.$$.fragment,e),h(A.$$.fragment,e),h(C.$$.fragment,e),h(J.$$.fragment,e),h(W.$$.fragment,e),h(X.$$.fragment,e),h(V.$$.fragment,e),h(z.$$.fragment,e),h(Y.$$.fragment,e),h(te.$$.fragment,e),ke=!0)},o(e){b(y.$$.fragment,e),b(L.$$.fragment,e),b(S.$$.fragment,e),b(H.$$.fragment,e),b(q.$$.fragment,e),b(A.$$.fragment,e),b(C.$$.fragment,e),b(J.$$.fragment,e),b(W.$$.fragment,e),b(X.$$.fragment,e),b(V.$$.fragment,e),b(z.$$.fragment,e),b(Y.$$.fragment,e),b(te.$$.fragment,e),ke=!1},d(e){e&&(n(v),n(p),n(f),n(c),n(ce),n(I),n(me),n(j),n(fe),n(R),n(ue),n(B),n(ge),n(E),n(_e),n(Z),n(he),n(be),n(De),n(w),n(ve),n(ye),n(x),n(we),n(Le),n(F),n(xe),n(Q),n(Me),n(K),n($e),n(ee),n(Pe),n(Te),n(de)),n(o),D(y,e),D(L,e),D(S,e),D(H,e),D(q),D(A),D(C),D(J),D(W),D(X,e),D(V),D(z),D(Y,e),D(te,e)}}}const bt='{"title":"Text-to-(RGB, depth)","local":"text-to-rgb-depth","sections":[{"title":"StableDiffusionLDM3DPipeline","local":"diffusers.StableDiffusionLDM3DPipeline","sections":[],"depth":2},{"title":"LDM3DPipelineOutput","local":"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput","sections":[],"depth":2}],"depth":1}';function Dt(k){return rt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pt extends lt{constructor(o){super(),pt(this,o,Dt,ht,at,{})}}export{Pt as component};
