import{s as ft,o as ct,n as pt}from"../chunks/scheduler.182ea377.js";import{S as mt,i as ut,g as a,s as i,r as g,A as gt,h as r,f as n,c as o,j as L,u as h,x as m,k as $,y as t,a as f,v as _,d as b,t as D,w as v}from"../chunks/index.abf12888.js";import{T as ht}from"../chunks/Tip.230e2334.js";import{D as k}from"../chunks/Docstring.93f6f462.js";import{C as _t}from"../chunks/CodeBlock.57fe6e13.js";import{E as bt}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as We}from"../chunks/Heading.16916d63.js";function Dt(Q){let d,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(){d=a("p"),d.innerHTML=P},l(u){d=r(u,"P",{"data-svelte-h":!0}),m(d)!=="svelte-1j961ct"&&(d.innerHTML=P)},m(u,x){f(u,d,x)},p:pt,d(u){u&&n(d)}}}function vt(Q){let d,P="Examples:",u,x,y;return x=new _t({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(){d=a("p"),d.textContent=P,u=i(),g(x.$$.fragment)},l(c){d=r(c,"P",{"data-svelte-h":!0}),m(d)!=="svelte-kvfsh7"&&(d.textContent=P),u=o(c),h(x.$$.fragment,c)},m(c,w){f(c,d,w),f(c,u,w),_(x,c,w),y=!0},p:pt,i(c){y||(b(x.$$.fragment,c),y=!0)},o(c){D(x.$$.fragment,c),y=!1},d(c){c&&(n(d),n(u)),v(x,c)}}}function xt(Q){let d,P,u,x,y,c,w,Xe='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.',me,O,He="The abstract from the paper is:",ue,B,Ye='<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>',ge,C,he,R,_e,l,Z,Te,K,Qe="Pipeline for text-to-image and 3D generation using LDM3D.",Se,ee,Ke=`This model inherits from <a href="/docs/diffusers/v0.22.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.).`,ke,te,et="The pipeline also inherits the following loading methods:",Ce,ne,tt='<li><a href="/docs/diffusers/v0.22.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion">load_textual_inversion()</a> for loading textual inversion embeddings</li> <li><a href="/docs/diffusers/v0.22.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/v0.22.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/v0.22.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.from_single_file">from_single_file()</a> for loading <code>.ckpt</code> files</li>',Ie,T,V,Ne,ie,nt="The call function to the pipeline for generation.",Ee,I,Ue,N,z,je,oe,it=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,Ae,E,F,Ge,se,ot=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,Oe,U,q,Be,ae,st=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Re,j,J,Ze,re,at=`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.`,Ve,A,W,ze,le,rt="Encodes the prompt into text encoder hidden states.",be,X,De,M,H,Fe,de,lt="Output class for Stable Diffusion pipelines.",qe,G,Y,Je,pe,dt="Call self as a function.",ve,ce,xe;return y=new We({props:{title:"Text-to-(RGB, depth)",local:"text-to-rgb-depth",headingTag:"h1"}}),C=new ht({props:{$$slots:{default:[Dt]},$$scope:{ctx:Q}}}),R=new We({props:{title:"StableDiffusionLDM3DPipeline",local:"diffusers.StableDiffusionLDM3DPipeline",headingTag:"h2"}}),Z=new k({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.22.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.0/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.0/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.22.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.22.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.22.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.22.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.22.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.0/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.22.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L84"}}),V=new k({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.22.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.22.0/en/api/pipelines/stable_diffusion/upscale#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.22.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py#L515",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


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