import{s as St,o as It,n as Ct}from"../chunks/scheduler.182ea377.js";import{S as Nt,i as Ut,g as a,s as o,r as g,A as Et,h as r,f as t,c as s,j as y,u as h,x as c,k as $,y as i,a as l,v as _,d as b,t as v,w as D}from"../chunks/index.abf12888.js";import{T as Gt}from"../chunks/Tip.230e2334.js";import{D as C}from"../chunks/Docstring.93f6f462.js";import{C as jt}from"../chunks/CodeBlock.57fe6e13.js";import{E as Rt}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as He}from"../chunks/Heading.16916d63.js";function At(se){let p,P='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(){p=a("p"),p.innerHTML=P},l(u){p=r(u,"P",{"data-svelte-h":!0}),c(p)!=="svelte-1j961ct"&&(p.innerHTML=P)},m(u,x){l(u,p,x)},p:Ct,d(u){u&&t(p)}}}function Bt(se){let p,P="Examples:",u,x,L;return x=new jt({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(){p=a("p"),p.textContent=P,u=o(),g(x.$$.fragment)},l(m){p=r(m,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=P),u=s(m),h(x.$$.fragment,m)},m(m,M){l(m,p,M),l(m,u,M),_(x,m,M),L=!0},p:Ct,i(m){L||(b(x.$$.fragment,m),L=!0)},o(m){v(x.$$.fragment,m),L=!1},d(m){m&&(t(p),t(u)),D(x,m)}}}function Ot(se){let p,P,u,x,L,m,M,dt='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.',De,A,pt="Two checkpoints are available for use:",xe,B,ft='<li><a href="https://huggingface.co/Intel/ldm3d" rel="nofollow">ldm3d-original</a>. The original checkpoint used in the <a href="https://arxiv.org/pdf/2305.10853.pdf" 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>',Le,O,ct="The abstract from the paper is:",Me,H,mt='<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>',we,S,ye,V,$e,d,z,Ve,ae,ut="Pipeline for text-to-image and 3D generation using LDM3D.",ze,re,gt=`This model inherits from <a href="/docs/diffusers/v0.24.0/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.).`,Fe,le,ht="The pipeline also inherits the following loading methods:",Ze,de,_t='<li><a href="/docs/diffusers/v0.24.0/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/v0.24.0/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/v0.24.0/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/v0.24.0/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> for loading <code>.ckpt</code> files</li>',qe,T,F,Je,pe,bt="The call function to the pipeline for generation.",We,I,Xe,N,Z,Ye,fe,vt=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,Qe,U,q,Ke,ce,Dt=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,et,E,J,tt,me,xt=`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.`,nt,G,W,it,ue,Lt=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`,ot,j,X,st,ge,Mt="Encodes the prompt into text encoder hidden states.",Pe,Y,Te,w,Q,at,he,wt="Output class for Stable Diffusion pipelines.",rt,R,K,lt,_e,yt="Call self as a function.",ke,ee,Ce,te,$t='<a href="https://arxiv.org/pdf/2311.03226.pdf" rel="nofollow">LDM3D-VR</a> is an extended version of LDM3D.',Se,ne,Pt=`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>`,Ie,ie,Tt="Two checkpoints are available for use:",Ne,oe,kt='<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>',Ue,ve,Ee;return L=new He({props:{title:"Text-to-(RGB, depth)",local:"text-to-rgb-depth",headingTag:"h1"}}),S=new Gt({props:{$$slots:{default:[At]},$$scope:{ctx:se}}}),V=new He({props:{title:"StableDiffusionLDM3DPipeline",local:"diffusers.StableDiffusionLDM3DPipeline",headingTag:"h2"}}),z=new C({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:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLDM3DPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.24.0/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.StableDiffusionLDM3DPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/v4.35.2/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.StableDiffusionLDM3DPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.35.2/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.24.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.24.0/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/v0.24.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.24.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.24.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.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.StableDiffusionLDM3DPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/v4.35.2/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/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L84"}}),F=new C({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:"guidance_scale",val:": float = 5.0"},{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:"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:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"clip_skip",val:": typing.Optional[int] = None"}],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__.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://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/v0.24.0/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.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.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.`,name:"negative_prompt_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/v0.24.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__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.StableDiffusionLDM3DPipeline.__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.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L516",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.24.0/en/api/pipelines/stable_diffusion/depth2img#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/v0.24.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),I=new Rt({props:{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.example",$$slots:{default:[Bt]},$$scope:{ctx:se}}}),Z=new C({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionLDM3DPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L174"}}),q=new C({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionLDM3DPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L191"}}),J=new C({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionLDM3DPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L166"}}),W=new C({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionLDM3DPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L182"}}),X=new C({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.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.StableDiffusionLDM3DPipeline.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.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.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.StableDiffusionLDM3DPipeline.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.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/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L232"}}),Y=new He({props:{title:"LDM3DPipelineOutput",local:"diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput",headingTag:"h2"}}),Q=new C({props:{name:"class diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.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.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.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.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/v0.24.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L63"}}),K=new C({props:{name:"__call__",anchor:"diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),ee=new He({props:{title:"Upscaler",local:"upscaler",headingTag:"h1"}}),{c(){p=a("meta"),P=o(),u=a("p"),x=o(),g(L.$$.fragment),m=o(),M=a("p"),M.innerHTML=dt,De=o(),A=a("p"),A.textContent=pt,xe=o(),B=a("ul"),B.innerHTML=ft,Le=o(),O=a("p"),O.textContent=ct,Me=o(),H=a("p"),H.innerHTML=mt,we=o(),g(S.$$.fragment),ye=o(),g(V.$$.fragment),$e=o(),d=a("div"),g(z.$$.fragment),Ve=o(),ae=a("p"),ae.textContent=ut,ze=o(),re=a("p"),re.innerHTML=gt,Fe=o(),le=a("p"),le.textContent=ht,Ze=o(),de=a("ul"),de.innerHTML=_t,qe=o(),T=a("div"),g(F.$$.fragment),Je=o(),pe=a("p"),pe.textContent=bt,We=o(),g(I.$$.fragment),Xe=o(),N=a("div"),g(Z.$$.fragment),Ye=o(),fe=a("p"),fe.innerHTML=vt,Qe=o(),U=a("div"),g(q.$$.fragment),Ke=o(),ce=a("p"),ce.innerHTML=Dt,et=o(),E=a("div"),g(J.$$.fragment),tt=o(),me=a("p"),me.textContent=xt,nt=o(),G=a("div"),g(W.$$.fragment),it=o(),ue=a("p"),ue.textContent=Lt,ot=o(),j=a("div"),g(X.$$.fragment),st=o(),ge=a("p"),ge.textContent=Mt,Pe=o(),g(Y.$$.fragment),Te=o(),w=a("div"),g(Q.$$.fragment),at=o(),he=a("p"),he.textContent=wt,rt=o(),R=a("div"),g(K.$$.fragment),lt=o(),_e=a("p"),_e.textContent=yt,ke=o(),g(ee.$$.fragment),Ce=o(),te=a("p"),te.innerHTML=$t,Se=o(),ne=a("p"),ne.innerHTML=Pt,Ie=o(),ie=a("p"),ie.textContent=Tt,Ne=o(),oe=a("ul"),oe.innerHTML=kt,Ue=o(),ve=a("p"),this.h()},l(e){const n=Et("svelte-u9bgzb",document.head);p=r(n,"META",{name:!0,content:!0}),n.forEach(t),P=s(e),u=r(e,"P",{}),y(u).forEach(t),x=s(e),h(L.$$.fragment,e),m=s(e),M=r(e,"P",{"data-svelte-h":!0}),c(M)!=="svelte-1i3wty2"&&(M.innerHTML=dt),De=s(e),A=r(e,"P",{"data-svelte-h":!0}),c(A)!=="svelte-1lk6a0a"&&(A.textContent=pt),xe=s(e),B=r(e,"UL",{"data-svelte-h":!0}),c(B)!=="svelte-8ac7fv"&&(B.innerHTML=ft),Le=s(e),O=r(e,"P",{"data-svelte-h":!0}),c(O)!=="svelte-1cwsb16"&&(O.textContent=ct),Me=s(e),H=r(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-llz6tv"&&(H.innerHTML=mt),we=s(e),h(S.$$.fragment,e),ye=s(e),h(V.$$.fragment,e),$e=s(e),d=r(e,"DIV",{class:!0});var f=y(d);h(z.$$.fragment,f),Ve=s(f),ae=r(f,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-jq75w6"&&(ae.textContent=ut),ze=s(f),re=r(f,"P",{"data-svelte-h":!0}),c(re)!=="svelte-kecqr7"&&(re.innerHTML=gt),Fe=s(f),le=r(f,"P",{"data-svelte-h":!0}),c(le)!=="svelte-14s6m4u"&&(le.textContent=ht),Ze=s(f),de=r(f,"UL",{"data-svelte-h":!0}),c(de)!=="svelte-11izxut"&&(de.innerHTML=_t),qe=s(f),T=r(f,"DIV",{class:!0});var k=y(T);h(F.$$.fragment,k),Je=s(k),pe=r(k,"P",{"data-svelte-h":!0}),c(pe)!=="svelte-50j04k"&&(pe.textContent=bt),We=s(k),h(I.$$.fragment,k),k.forEach(t),Xe=s(f),N=r(f,"DIV",{class:!0});var Ge=y(N);h(Z.$$.fragment,Ge),Ye=s(Ge),fe=r(Ge,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-1s3c06i"&&(fe.innerHTML=vt),Ge.forEach(t),Qe=s(f),U=r(f,"DIV",{class:!0});var je=y(U);h(q.$$.fragment,je),Ke=s(je),ce=r(je,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-pkn4ui"&&(ce.innerHTML=Dt),je.forEach(t),et=s(f),E=r(f,"DIV",{class:!0});var Re=y(E);h(J.$$.fragment,Re),tt=s(Re),me=r(Re,"P",{"data-svelte-h":!0}),c(me)!=="svelte-14bnrb6"&&(me.textContent=xt),Re.forEach(t),nt=s(f),G=r(f,"DIV",{class:!0});var Ae=y(G);h(W.$$.fragment,Ae),it=s(Ae),ue=r(Ae,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-1xwrf7t"&&(ue.textContent=Lt),Ae.forEach(t),ot=s(f),j=r(f,"DIV",{class:!0});var Be=y(j);h(X.$$.fragment,Be),st=s(Be),ge=r(Be,"P",{"data-svelte-h":!0}),c(ge)!=="svelte-16q0ax1"&&(ge.textContent=Mt),Be.forEach(t),f.forEach(t),Pe=s(e),h(Y.$$.fragment,e),Te=s(e),w=r(e,"DIV",{class:!0});var be=y(w);h(Q.$$.fragment,be),at=s(be),he=r(be,"P",{"data-svelte-h":!0}),c(he)!=="svelte-1qpjiuf"&&(he.textContent=wt),rt=s(be),R=r(be,"DIV",{class:!0});var Oe=y(R);h(K.$$.fragment,Oe),lt=s(Oe),_e=r(Oe,"P",{"data-svelte-h":!0}),c(_e)!=="svelte-1eed40t"&&(_e.textContent=yt),Oe.forEach(t),be.forEach(t),ke=s(e),h(ee.$$.fragment,e),Ce=s(e),te=r(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-1dc6fr0"&&(te.innerHTML=$t),Se=s(e),ne=r(e,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-1k3azh3"&&(ne.innerHTML=Pt),Ie=s(e),ie=r(e,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-1lk6a0a"&&(ie.textContent=Tt),Ne=s(e),oe=r(e,"UL",{"data-svelte-h":!0}),c(oe)!=="svelte-sdp7m1"&&(oe.innerHTML=kt),Ue=s(e),ve=r(e,"P",{}),y(ve).forEach(t),this.h()},h(){$(p,"name","hf:doc:metadata"),$(p,"content",Ht),$(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(w,"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){i(document.head,p),l(e,P,n),l(e,u,n),l(e,x,n),_(L,e,n),l(e,m,n),l(e,M,n),l(e,De,n),l(e,A,n),l(e,xe,n),l(e,B,n),l(e,Le,n),l(e,O,n),l(e,Me,n),l(e,H,n),l(e,we,n),_(S,e,n),l(e,ye,n),_(V,e,n),l(e,$e,n),l(e,d,n),_(z,d,null),i(d,Ve),i(d,ae),i(d,ze),i(d,re),i(d,Fe),i(d,le),i(d,Ze),i(d,de),i(d,qe),i(d,T),_(F,T,null),i(T,Je),i(T,pe),i(T,We),_(I,T,null),i(d,Xe),i(d,N),_(Z,N,null),i(N,Ye),i(N,fe),i(d,Qe),i(d,U),_(q,U,null),i(U,Ke),i(U,ce),i(d,et),i(d,E),_(J,E,null),i(E,tt),i(E,me),i(d,nt),i(d,G),_(W,G,null),i(G,it),i(G,ue),i(d,ot),i(d,j),_(X,j,null),i(j,st),i(j,ge),l(e,Pe,n),_(Y,e,n),l(e,Te,n),l(e,w,n),_(Q,w,null),i(w,at),i(w,he),i(w,rt),i(w,R),_(K,R,null),i(R,lt),i(R,_e),l(e,ke,n),_(ee,e,n),l(e,Ce,n),l(e,te,n),l(e,Se,n),l(e,ne,n),l(e,Ie,n),l(e,ie,n),l(e,Ne,n),l(e,oe,n),l(e,Ue,n),l(e,ve,n),Ee=!0},p(e,[n]){const f={};n&2&&(f.$$scope={dirty:n,ctx:e}),S.$set(f);const k={};n&2&&(k.$$scope={dirty:n,ctx:e}),I.$set(k)},i(e){Ee||(b(L.$$.fragment,e),b(S.$$.fragment,e),b(V.$$.fragment,e),b(z.$$.fragment,e),b(F.$$.fragment,e),b(I.$$.fragment,e),b(Z.$$.fragment,e),b(q.$$.fragment,e),b(J.$$.fragment,e),b(W.$$.fragment,e),b(X.$$.fragment,e),b(Y.$$.fragment,e),b(Q.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),Ee=!0)},o(e){v(L.$$.fragment,e),v(S.$$.fragment,e),v(V.$$.fragment,e),v(z.$$.fragment,e),v(F.$$.fragment,e),v(I.$$.fragment,e),v(Z.$$.fragment,e),v(q.$$.fragment,e),v(J.$$.fragment,e),v(W.$$.fragment,e),v(X.$$.fragment,e),v(Y.$$.fragment,e),v(Q.$$.fragment,e),v(K.$$.fragment,e),v(ee.$$.fragment,e),Ee=!1},d(e){e&&(t(P),t(u),t(x),t(m),t(M),t(De),t(A),t(xe),t(B),t(Le),t(O),t(Me),t(H),t(we),t(ye),t($e),t(d),t(Pe),t(Te),t(w),t(ke),t(Ce),t(te),t(Se),t(ne),t(Ie),t(ie),t(Ne),t(oe),t(Ue),t(ve)),t(p),D(L,e),D(S,e),D(V,e),D(z),D(F),D(I),D(Z),D(q),D(J),D(W),D(X),D(Y,e),D(Q),D(K),D(ee,e)}}}const Ht='{"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.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput","sections":[],"depth":2}],"depth":1}';function Vt(se){return It(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yt extends Nt{constructor(p){super(),Ut(this,p,Vt,Ot,St,{})}}export{Yt as component};
