Buckets:
| import{s as ft,o as mt,n as ct}from"../chunks/scheduler.8c3d61f6.js";import{S as ut,i as gt,g as a,s as o,r as h,A as ht,h as r,f as n,c as s,j as N,u as _,x as c,k as U,y as l,a as i,v as b,d as D,t as v,w as x}from"../chunks/index.da70eac4.js";import{T as _t}from"../chunks/Tip.1d9b8c37.js";import{D as pe}from"../chunks/Docstring.ee4b6913.js";import{C as bt}from"../chunks/CodeBlock.00a903b3.js";import{E as Dt}from"../chunks/ExampleCodeBlock.f7bd2c1f.js";import{H as Ie,E as vt}from"../chunks/EditOnGithub.1e64e623.js";function xt(K){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}),c(d)!=="svelte-1j961ct"&&(d.innerHTML=P)},m(u,g){i(u,d,g)},p:ct,d(u){u&&n(d)}}}function wt(K){let d,P="Examples:",u,g,w;return g=new bt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkxETTNEUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uTERNM0RQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIySW50ZWwlMkZsZG0zZC00YyUyMiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFvdXRwdXQlMjAlM0QlMjBwaXBlKHByb21wdCklMEFyZ2JfaW1hZ2UlMkMlMjBkZXB0aF9pbWFnZSUyMCUzRCUyMG91dHB1dC5yZ2IlMkMlMjBvdXRwdXQuZGVwdGglMEFyZ2JfaW1hZ2UlNUIwJTVELnNhdmUoJTIyYXN0cm9uYXV0X2xkbTNkX3JnYi5qcGclMjIpJTBBZGVwdGhfaW1hZ2UlNUIwJTVELnNhdmUoJTIyYXN0cm9uYXV0X2xkbTNkX2RlcHRoLnBuZyUyMik=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionLDM3DPipeline | |
| <span class="hljs-meta">>>> </span>pipe = StableDiffusionLDM3DPipeline.from_pretrained(<span class="hljs-string">"Intel/ldm3d-4c"</span>) | |
| <span class="hljs-meta">>>> </span>pipe = pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"a photo of an astronaut riding a horse on mars"</span> | |
| <span class="hljs-meta">>>> </span>output = pipe(prompt) | |
| <span class="hljs-meta">>>> </span>rgb_image, depth_image = output.rgb, output.depth | |
| <span class="hljs-meta">>>> </span>rgb_image[<span class="hljs-number">0</span>].save(<span class="hljs-string">"astronaut_ldm3d_rgb.jpg"</span>) | |
| <span class="hljs-meta">>>> </span>depth_image[<span class="hljs-number">0</span>].save(<span class="hljs-string">"astronaut_ldm3d_depth.png"</span>)`,wrap:!1}}),{c(){d=a("p"),d.textContent=P,u=o(),h(g.$$.fragment)},l(f){d=r(f,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=P),u=s(f),_(g.$$.fragment,f)},m(f,M){i(f,d,M),i(f,u,M),b(g,f,M),w=!0},p:ct,i(f){w||(D(g.$$.fragment,f),w=!0)},o(f){v(g.$$.fragment,f),w=!1},d(f){f&&(n(d),n(u)),x(g,f)}}}function Mt(K){let d,P,u,g,w,f,M,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.',fe,O,We="Two checkpoints are available for use:",me,G,Ve='<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>',ue,j,Fe="The abstract from the paper is:",ge,R,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>',he,k,_e,B,be,p,E,Ne,ee,Qe="Pipeline for text-to-image and 3D generation using LDM3D.",Ue,te,Ke=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods | |
| implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,Oe,ne,et="The pipeline also inherits the following loading methods:",Ge,ie,tt='<li><a href="/docs/diffusers/main/en/api/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion">load_textual_inversion()</a> for loading textual inversion embeddings</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> for loading <code>.ckpt</code> files</li> <li><a href="/docs/diffusers/main/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',je,$,A,Re,oe,nt="The call function to the pipeline for generation.",Be,T,Ee,S,z,Ae,se,it="Encodes the prompt into text encoder hidden states.",ze,C,Z,Ze,ae,ot='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>',De,H,ve,L,q,He,re,st="Output class for Stable Diffusion pipelines.",qe,I,J,Je,le,at="Call self as a function.",xe,X,we,W,rt='<a href="https://arxiv.org/pdf/2311.03226.pdf" rel="nofollow">LDM3D-VR</a> is an extended version of LDM3D.',Me,V,lt=`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>`,Le,F,dt="Two checkpoints are available for use:",Pe,Y,pt='<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>',$e,Q,ye,ce,ke;return w=new Ie({props:{title:"Text-to-(RGB, depth)",local:"text-to-rgb-depth",headingTag:"h1"}}),k=new _t({props:{$$slots:{default:[xt]},$$scope:{ctx:K}}}),B=new Ie({props:{title:"StableDiffusionLDM3DPipeline",local:"diffusers.StableDiffusionLDM3DPipeline",headingTag:"h2"}}),E=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:": Optional"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLDM3DPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| 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/main/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>) — | |
| 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/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) — | |
| A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) — | |
| A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) — | |
| A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of | |
| <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) — | |
| 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’s potential harms.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) — | |
| A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py#L159"}}),A=new pe({props:{name:"__call__",anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__",parameters:[{name:"prompt",val:": Union = None"},{name:"height",val:": Optional = None"},{name:"width",val:": Optional = None"},{name:"num_inference_steps",val:": int = 49"},{name:"timesteps",val:": List = None"},{name:"sigmas",val:": List = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": Union = None"},{name:"num_images_per_prompt",val:": Optional = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": Union = None"},{name:"latents",val:": Optional = None"},{name:"prompt_embeds",val:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"ip_adapter_image",val:": Union = None"},{name:"ip_adapter_image_embeds",val:": Optional = None"},{name:"output_type",val:": Optional = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"cross_attention_kwargs",val:": Optional = None"},{name:"guidance_rescale",val:": float = 0.0"},{name:"clip_skip",val:": Optional = None"},{name:"callback_on_step_end",val:": Optional = None"},{name:"callback_on_step_end_tensor_inputs",val:": List = ['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>) — | |
| 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>) — | |
| 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>) — | |
| 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) — | |
| 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>) — | |
| 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>) — | |
| 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) — | |
| 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 > 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>) — | |
| 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 < 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) — | |
| 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) — | |
| Corresponds to parameter eta (η) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies | |
| to the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs (prompt weighting). If | |
| not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument. | |
| ip_adapter_image — (<code>PipelineImageInput</code>, <em>optional</em>): | |
| Optional image input to work with IP Adapters.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>List[torch.Tensor]</code>, <em>optional</em>) — | |
| 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>"pil"</code>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/diffusers/main/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__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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#L723",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/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/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput" | |
| >StableDiffusionPipelineOutput</a> or <code>tuple</code></p> | |
| `}}),T=new Dt({props:{anchor:"diffusers.StableDiffusionLDM3DPipeline.__call__.example",$$slots:{default:[wt]},$$scope:{ctx:K}}}),z=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:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"lora_scale",val:": Optional = None"},{name:"clip_skip",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLDM3DPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| prompt to be encoded | |
| device — (<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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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#L283"}}),Z=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>) — | |
| 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) — | |
| 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>) — | |
| 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#L662",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> | |
| `}}),H=new Ie({props:{title:"LDM3DPipelineOutput",local:"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput",headingTag:"h2"}}),q=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:": Union"},{name:"depth",val:": Union"},{name:"nsfw_content_detected",val:": Optional"}],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>) — | |
| 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>) — | |
| 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>) — | |
| List indicating whether the corresponding generated image contains “not-safe-for-work” (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#L137"}}),J=new pe({props:{name:"__call__",anchor:"diffusers.pipelines.stable_diffusion_ldm3d.pipeline_stable_diffusion_ldm3d.LDM3DPipelineOutput.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),X=new Ie({props:{title:"Upscaler",local:"upscaler",headingTag:"h1"}}),Q=new vt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md"}}),{c(){d=a("meta"),P=o(),u=a("p"),g=o(),h(w.$$.fragment),f=o(),M=a("p"),M.innerHTML=Xe,fe=o(),O=a("p"),O.textContent=We,me=o(),G=a("ul"),G.innerHTML=Ve,ue=o(),j=a("p"),j.textContent=Fe,ge=o(),R=a("p"),R.innerHTML=Ye,he=o(),h(k.$$.fragment),_e=o(),h(B.$$.fragment),be=o(),p=a("div"),h(E.$$.fragment),Ne=o(),ee=a("p"),ee.textContent=Qe,Ue=o(),te=a("p"),te.innerHTML=Ke,Oe=o(),ne=a("p"),ne.textContent=et,Ge=o(),ie=a("ul"),ie.innerHTML=tt,je=o(),$=a("div"),h(A.$$.fragment),Re=o(),oe=a("p"),oe.textContent=nt,Be=o(),h(T.$$.fragment),Ee=o(),S=a("div"),h(z.$$.fragment),Ae=o(),se=a("p"),se.textContent=it,ze=o(),C=a("div"),h(Z.$$.fragment),Ze=o(),ae=a("p"),ae.innerHTML=ot,De=o(),h(H.$$.fragment),ve=o(),L=a("div"),h(q.$$.fragment),He=o(),re=a("p"),re.textContent=st,qe=o(),I=a("div"),h(J.$$.fragment),Je=o(),le=a("p"),le.textContent=at,xe=o(),h(X.$$.fragment),we=o(),W=a("p"),W.innerHTML=rt,Me=o(),V=a("p"),V.innerHTML=lt,Le=o(),F=a("p"),F.textContent=dt,Pe=o(),Y=a("ul"),Y.innerHTML=pt,$e=o(),h(Q.$$.fragment),ye=o(),ce=a("p"),this.h()},l(e){const t=ht("svelte-u9bgzb",document.head);d=r(t,"META",{name:!0,content:!0}),t.forEach(n),P=s(e),u=r(e,"P",{}),N(u).forEach(n),g=s(e),_(w.$$.fragment,e),f=s(e),M=r(e,"P",{"data-svelte-h":!0}),c(M)!=="svelte-1lwy4q6"&&(M.innerHTML=Xe),fe=s(e),O=r(e,"P",{"data-svelte-h":!0}),c(O)!=="svelte-1lk6a0a"&&(O.textContent=We),me=s(e),G=r(e,"UL",{"data-svelte-h":!0}),c(G)!=="svelte-1kldfz9"&&(G.innerHTML=Ve),ue=s(e),j=r(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-1cwsb16"&&(j.textContent=Fe),ge=s(e),R=r(e,"P",{"data-svelte-h":!0}),c(R)!=="svelte-llz6tv"&&(R.innerHTML=Ye),he=s(e),_(k.$$.fragment,e),_e=s(e),_(B.$$.fragment,e),be=s(e),p=r(e,"DIV",{class:!0});var m=N(p);_(E.$$.fragment,m),Ne=s(m),ee=r(m,"P",{"data-svelte-h":!0}),c(ee)!=="svelte-jq75w6"&&(ee.textContent=Qe),Ue=s(m),te=r(m,"P",{"data-svelte-h":!0}),c(te)!=="svelte-496sm0"&&(te.innerHTML=Ke),Oe=s(m),ne=r(m,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-14s6m4u"&&(ne.textContent=et),Ge=s(m),ie=r(m,"UL",{"data-svelte-h":!0}),c(ie)!=="svelte-5sz5nb"&&(ie.innerHTML=tt),je=s(m),$=r(m,"DIV",{class:!0});var y=N($);_(A.$$.fragment,y),Re=s(y),oe=r(y,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-50j04k"&&(oe.textContent=nt),Be=s(y),_(T.$$.fragment,y),y.forEach(n),Ee=s(m),S=r(m,"DIV",{class:!0});var Te=N(S);_(z.$$.fragment,Te),Ae=s(Te),se=r(Te,"P",{"data-svelte-h":!0}),c(se)!=="svelte-16q0ax1"&&(se.textContent=it),Te.forEach(n),ze=s(m),C=r(m,"DIV",{class:!0});var Se=N(C);_(Z.$$.fragment,Se),Ze=s(Se),ae=r(Se,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-vo59ec"&&(ae.innerHTML=ot),Se.forEach(n),m.forEach(n),De=s(e),_(H.$$.fragment,e),ve=s(e),L=r(e,"DIV",{class:!0});var de=N(L);_(q.$$.fragment,de),He=s(de),re=r(de,"P",{"data-svelte-h":!0}),c(re)!=="svelte-1qpjiuf"&&(re.textContent=st),qe=s(de),I=r(de,"DIV",{class:!0});var Ce=N(I);_(J.$$.fragment,Ce),Je=s(Ce),le=r(Ce,"P",{"data-svelte-h":!0}),c(le)!=="svelte-1eed40t"&&(le.textContent=at),Ce.forEach(n),de.forEach(n),xe=s(e),_(X.$$.fragment,e),we=s(e),W=r(e,"P",{"data-svelte-h":!0}),c(W)!=="svelte-kciprs"&&(W.innerHTML=rt),Me=s(e),V=r(e,"P",{"data-svelte-h":!0}),c(V)!=="svelte-1k3azh3"&&(V.innerHTML=lt),Le=s(e),F=r(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-1lk6a0a"&&(F.textContent=dt),Pe=s(e),Y=r(e,"UL",{"data-svelte-h":!0}),c(Y)!=="svelte-sdp7m1"&&(Y.innerHTML=pt),$e=s(e),_(Q.$$.fragment,e),ye=s(e),ce=r(e,"P",{}),N(ce).forEach(n),this.h()},h(){U(d,"name","hf:doc:metadata"),U(d,"content",Lt),U($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){l(document.head,d),i(e,P,t),i(e,u,t),i(e,g,t),b(w,e,t),i(e,f,t),i(e,M,t),i(e,fe,t),i(e,O,t),i(e,me,t),i(e,G,t),i(e,ue,t),i(e,j,t),i(e,ge,t),i(e,R,t),i(e,he,t),b(k,e,t),i(e,_e,t),b(B,e,t),i(e,be,t),i(e,p,t),b(E,p,null),l(p,Ne),l(p,ee),l(p,Ue),l(p,te),l(p,Oe),l(p,ne),l(p,Ge),l(p,ie),l(p,je),l(p,$),b(A,$,null),l($,Re),l($,oe),l($,Be),b(T,$,null),l(p,Ee),l(p,S),b(z,S,null),l(S,Ae),l(S,se),l(p,ze),l(p,C),b(Z,C,null),l(C,Ze),l(C,ae),i(e,De,t),b(H,e,t),i(e,ve,t),i(e,L,t),b(q,L,null),l(L,He),l(L,re),l(L,qe),l(L,I),b(J,I,null),l(I,Je),l(I,le),i(e,xe,t),b(X,e,t),i(e,we,t),i(e,W,t),i(e,Me,t),i(e,V,t),i(e,Le,t),i(e,F,t),i(e,Pe,t),i(e,Y,t),i(e,$e,t),b(Q,e,t),i(e,ye,t),i(e,ce,t),ke=!0},p(e,[t]){const m={};t&2&&(m.$$scope={dirty:t,ctx:e}),k.$set(m);const y={};t&2&&(y.$$scope={dirty:t,ctx:e}),T.$set(y)},i(e){ke||(D(w.$$.fragment,e),D(k.$$.fragment,e),D(B.$$.fragment,e),D(E.$$.fragment,e),D(A.$$.fragment,e),D(T.$$.fragment,e),D(z.$$.fragment,e),D(Z.$$.fragment,e),D(H.$$.fragment,e),D(q.$$.fragment,e),D(J.$$.fragment,e),D(X.$$.fragment,e),D(Q.$$.fragment,e),ke=!0)},o(e){v(w.$$.fragment,e),v(k.$$.fragment,e),v(B.$$.fragment,e),v(E.$$.fragment,e),v(A.$$.fragment,e),v(T.$$.fragment,e),v(z.$$.fragment,e),v(Z.$$.fragment,e),v(H.$$.fragment,e),v(q.$$.fragment,e),v(J.$$.fragment,e),v(X.$$.fragment,e),v(Q.$$.fragment,e),ke=!1},d(e){e&&(n(P),n(u),n(g),n(f),n(M),n(fe),n(O),n(me),n(G),n(ue),n(j),n(ge),n(R),n(he),n(_e),n(be),n(p),n(De),n(ve),n(L),n(xe),n(we),n(W),n(Me),n(V),n(Le),n(F),n(Pe),n(Y),n($e),n(ye),n(ce)),n(d),x(w,e),x(k,e),x(B,e),x(E),x(A),x(T),x(z),x(Z),x(H,e),x(q),x(J),x(X,e),x(Q,e)}}}const Lt='{"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 Pt(K){return mt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nt extends ut{constructor(d){super(),gt(this,d,Pt,Mt,ft,{})}}export{Nt as component}; | |
Xet Storage Details
- Size:
- 37 kB
- Xet hash:
- 578e9eb0aaf0852756f02cfb9897bea9cee3afd98a719e6a8a5f88eda5086ab9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.