import{s as jt,o as Jt,n as Ye}from"../chunks/scheduler.8c3d61f6.js";import{S as Ut,i as Zt,g as l,s as i,r as h,A as Ht,h as d,f as o,c as s,j as L,u as g,x as m,k,y as c,a as n,v as f,d as _,t as b,w as v}from"../chunks/index.da70eac4.js";import{T as zt}from"../chunks/Tip.1d9b8c37.js";import{D as B}from"../chunks/Docstring.6b390b9a.js";import{C as Wt}from"../chunks/CodeBlock.00a903b3.js";import{E as It}from"../chunks/ExampleCodeBlock.db12be95.js";import{H as ue,E as Bt}from"../chunks/EditOnGithub.1e64e623.js";function Et(D){let a,M='Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading#reuse-components-across-pipelines">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines. Also, to know more about reducing the memory usage of this pipeline, refer to the [“Reduce memory usage”] section <a href="../../using-diffusers/svd#reduce-memory-usage">here</a>.';return{c(){a=l("p"),a.innerHTML=M},l(p){a=d(p,"P",{"data-svelte-h":!0}),m(a)!=="svelte-12x7hfk"&&(a.innerHTML=M)},m(p,u){n(p,a,u)},p:Ye,d(p){p&&o(a)}}}function Rt(D){let a,M=`Marigold pipelines were designed and tested only with <code>DDIMScheduler</code> and <code>LCMScheduler</code>.
Depending on the scheduler, the number of inference steps required to get reliable predictions varies, and there is no universal value that works best across schedulers.
Because of that, the default value of <code>num_inference_steps</code> in the <code>__call__</code> method of the pipeline is set to <code>None</code> (see the API reference).
Unless set explicitly, its value will be taken from the checkpoint configuration <code>model_index.json</code>.
This is done to ensure high-quality predictions when calling the pipeline with just the <code>image</code> argument.`;return{c(){a=l("p"),a.innerHTML=M},l(p){a=d(p,"P",{"data-svelte-h":!0}),m(a)!=="svelte-1dhjd7u"&&(a.innerHTML=M)},m(p,u){n(p,a,u)},p:Ye,d(p){p&&o(a)}}}function Ot(D){let a,M="Examples:",p,u,y;return u=new Wt({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLWxjbS12MS0wJTIyJTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBkaWZmdXNlcnMudXRpbHMubG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRm1hcmlnb2xkbW9ub2RlcHRoLmdpdGh1Yi5pbyUyRmltYWdlcyUyRmVpbnN0ZWluLmpwZyUyMiklMEFkZXB0aCUyMCUzRCUyMHBpcGUoaW1hZ2UpJTBBJTBBdmlzJTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IudmlzdWFsaXplX2RlcHRoKGRlcHRoLnByZWRpY3Rpb24pJTBBdmlzJTVCMCU1RC5zYXZlKCUyMmVpbnN0ZWluX2RlcHRoLnBuZyUyMiklMEElMEFkZXB0aF8xNmJpdCUyMCUzRCUyMHBpcGUuaW1hZ2VfcHJvY2Vzc29yLmV4cG9ydF9kZXB0aF90b18xNmJpdF9wbmcoZGVwdGgucHJlZGljdGlvbiklMEFkZXB0aF8xNmJpdCU1QjAlNUQuc2F2ZSglMjJlaW5zdGVpbl9kZXB0aF8xNmJpdC5wbmclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> diffusers
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = diffusers.MarigoldDepthPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;prs-eth/marigold-depth-lcm-v1-0&quot;</span>, variant=<span class="hljs-string">&quot;fp16&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image = diffusers.utils.load_image(<span class="hljs-string">&quot;https://marigoldmonodepth.github.io/images/einstein.jpg&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>depth = pipe(image)

<span class="hljs-meta">&gt;&gt;&gt; </span>vis = pipe.image_processor.visualize_depth(depth.prediction)
<span class="hljs-meta">&gt;&gt;&gt; </span>vis[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;einstein_depth.png&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>depth_16bit = pipe.image_processor.export_depth_to_16bit_png(depth.prediction)
<span class="hljs-meta">&gt;&gt;&gt; </span>depth_16bit[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;einstein_depth_16bit.png&quot;</span>)`,wrap:!1}}),{c(){a=l("p"),a.textContent=M,p=i(),h(u.$$.fragment)},l(r){a=d(r,"P",{"data-svelte-h":!0}),m(a)!=="svelte-kvfsh7"&&(a.textContent=M),p=s(r),g(u.$$.fragment,r)},m(r,w){n(r,a,w),n(r,p,w),f(u,r,w),y=!0},p:Ye,i(r){y||(_(u.$$.fragment,r),y=!0)},o(r){b(u.$$.fragment,r),y=!1},d(r){r&&(o(a),o(p)),v(u,r)}}}function Ft(D){let a,M="Examples:",p,u,y;return u=new Wt({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkTm9ybWFsc1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtbm9ybWFscy1sY20tdjAtMSUyMiUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQWltYWdlJTIwJTNEJTIwZGlmZnVzZXJzLnV0aWxzLmxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZtYXJpZ29sZG1vbm9kZXB0aC5naXRodWIuaW8lMkZpbWFnZXMlMkZlaW5zdGVpbi5qcGclMjIpJTBBbm9ybWFscyUyMCUzRCUyMHBpcGUoaW1hZ2UpJTBBJTBBdmlzJTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IudmlzdWFsaXplX25vcm1hbHMobm9ybWFscy5wcmVkaWN0aW9uKSUwQXZpcyU1QjAlNUQuc2F2ZSglMjJlaW5zdGVpbl9ub3JtYWxzLnBuZyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> diffusers
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = diffusers.MarigoldNormalsPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;prs-eth/marigold-normals-lcm-v0-1&quot;</span>, variant=<span class="hljs-string">&quot;fp16&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image = diffusers.utils.load_image(<span class="hljs-string">&quot;https://marigoldmonodepth.github.io/images/einstein.jpg&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>normals = pipe(image)

<span class="hljs-meta">&gt;&gt;&gt; </span>vis = pipe.image_processor.visualize_normals(normals.prediction)
<span class="hljs-meta">&gt;&gt;&gt; </span>vis[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;einstein_normals.png&quot;</span>)`,wrap:!1}}),{c(){a=l("p"),a.textContent=M,p=i(),h(u.$$.fragment)},l(r){a=d(r,"P",{"data-svelte-h":!0}),m(a)!=="svelte-kvfsh7"&&(a.textContent=M),p=s(r),g(u.$$.fragment,r)},m(r,w){n(r,a,w),n(r,p,w),f(u,r,w),y=!0},p:Ye,i(r){y||(_(u.$$.fragment,r),y=!0)},o(r){b(u.$$.fragment,r),y=!1},d(r){r&&(o(a),o(p)),v(u,r)}}}function Gt(D){let a,M,p,u,y,r,w,ht='<img src="https://marigoldmonodepth.github.io/images/teaser_collage_compressed.jpg" alt="marigold"/>',$e,E,gt=`Marigold was proposed in <a href="https://huggingface.co/papers/2312.02145" rel="nofollow">Repurposing Diffusion-Based Image Generators for Monocular Depth Estimation</a>, a CVPR 2024 Oral paper by <a href="http://www.kebingxin.com/" rel="nofollow">Bingxin Ke</a>, <a href="https://www.obukhov.ai/" rel="nofollow">Anton Obukhov</a>, <a href="https://shengyuh.github.io/" rel="nofollow">Shengyu Huang</a>, <a href="https://nandometzger.github.io/" rel="nofollow">Nando Metzger</a>, <a href="https://rcdaudt.github.io/" rel="nofollow">Rodrigo Caye Daudt</a>, and <a href="https://scholar.google.com/citations?user=FZuNgqIAAAAJ&amp;hl=en" rel="nofollow">Konrad Schindler</a>.
The idea is to repurpose the rich generative prior of Text-to-Image Latent Diffusion Models (LDMs) for traditional computer vision tasks.
Initially, this idea was explored to fine-tune Stable Diffusion for Monocular Depth Estimation, as shown in the teaser above.
Later,`,Pe,R,ft='<li><a href="https://tianfwang.github.io/" rel="nofollow">Tianfu Wang</a> trained the first Latent Consistency Model (LCM) of Marigold, which unlocked fast single-step inference;</li> <li><a href="https://www.linkedin.com/in/kevin-qu-b3417621b/?locale=en_US" rel="nofollow">Kevin Qu</a> extended the approach to Surface Normals Estimation;</li> <li><a href="https://www.obukhov.ai/" rel="nofollow">Anton Obukhov</a> contributed the pipelines and documentation into diffusers (enabled and supported by <a href="https://yiyixuxu.github.io/" rel="nofollow">YiYi Xu</a> and <a href="https://sayak.dev/" rel="nofollow">Sayak Paul</a>).</li>',De,O,_t="The abstract from the paper is:",Ne,F,bt='<em>Monocular depth estimation is a fundamental computer vision task. Recovering 3D depth from a single image is geometrically ill-posed and requires scene understanding, so it is not surprising that the rise of deep learning has led to a breakthrough. The impressive progress of monocular depth estimators has mirrored the growth in model capacity, from relatively modest CNNs to large Transformer architectures. Still, monocular depth estimators tend to struggle when presented with images with unfamiliar content and layout, since their knowledge of the visual world is restricted by the data seen during training, and challenged by zero-shot generalization to new domains. This motivates us to explore whether the extensive priors captured in recent generative diffusion models can enable better, more generalizable depth estimation. We introduce Marigold, a method for affine-invariant monocular depth estimation that is derived from Stable Diffusion and retains its rich prior knowledge. The estimator can be fine-tuned in a couple of days on a single GPU using only synthetic training data. It delivers state-of-the-art performance across a wide range of datasets, including over 20% performance gains in specific cases. Project page: <a href="https://marigoldmonodepth.github.io" rel="nofollow">https://marigoldmonodepth.github.io</a>.</em>',qe,G,Le,S,vt=`Each pipeline supports one Computer Vision task, which takes an input RGB image as input and produces a <em>prediction</em> of the modality of interest, such as a depth map of the input image.
Currently, the following tasks are implemented:`,ke,A,yt='<thead><tr><th>Pipeline</th> <th>Predicted Modalities</th> <th align="center">Demos</th></tr></thead> <tbody><tr><td><a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py" rel="nofollow">MarigoldDepthPipeline</a></td> <td><a href="https://en.wikipedia.org/wiki/Depth_map" rel="nofollow">Depth</a>, <a href="https://en.wikipedia.org/wiki/Binocular_disparity" rel="nofollow">Disparity</a></td> <td align="center"><a href="https://huggingface.co/spaces/prs-eth/marigold-lcm" rel="nofollow">Fast Demo (LCM)</a>, <a href="https://huggingface.co/spaces/prs-eth/marigold" rel="nofollow">Slow Original Demo (DDIM)</a></td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py" rel="nofollow">MarigoldNormalsPipeline</a></td> <td><a href="https://en.wikipedia.org/wiki/Normal_mapping" rel="nofollow">Surface normals</a></td> <td align="center"><a href="https://huggingface.co/spaces/prs-eth/marigold-normals-lcm" rel="nofollow">Fast Demo (LCM)</a></td></tr></tbody>',Ce,V,ze,X,Mt='The original checkpoints can be found under the <a href="https://huggingface.co/prs-eth/" rel="nofollow">PRS-ETH</a> Hugging Face organization.',Ie,W,We,j,je,Y,wt='See also Marigold <a href="marigold_usage">usage examples</a>.',Je,Q,Ue,T,K,Qe,me,Tt='Pipeline for monocular depth estimation using the Marigold method: <a href="https://marigoldmonodepth.github.io" rel="nofollow">https://marigoldmonodepth.github.io</a>.',Ke,he,xt=`This model inherits from <a href="/docs/diffusers/pr_10072/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`,et,N,ee,tt,ge,$t="Function invoked when calling the pipeline.",ot,J,nt,U,te,it,fe,Pt=`Ensembles the depth maps represented by the <code>depth</code> tensor with expected shape <code>(B, 1, H, W)</code>, where B is the
number of ensemble members for a given prediction of size <code>(H x W)</code>. Even though the function is designed for
depth maps, it can also be used with disparity maps as long as the input tensor values are non-negative. The
alignment happens when the predictions have one or more degrees of freedom, that is when they are either
affine-invariant (<code>scale_invariant=True</code> and <code>shift_invariant=True</code>), or just scale-invariant (only
<code>scale_invariant=True</code>). For absolute predictions (<code>scale_invariant=False</code> and <code>shift_invariant=False</code>)
alignment is skipped and only ensembling is performed.`,Ze,oe,He,x,ne,st,_e,Dt='Pipeline for monocular normals estimation using the Marigold method: <a href="https://marigoldmonodepth.github.io" rel="nofollow">https://marigoldmonodepth.github.io</a>.',at,be,Nt=`This model inherits from <a href="/docs/diffusers/pr_10072/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`,rt,q,ie,lt,ve,qt="Function invoked when calling the pipeline.",dt,Z,ct,H,se,pt,ye,Lt=`Ensembles the normals maps represented by the <code>normals</code> tensor with expected shape <code>(B, 3, H, W)</code>, where B is
the number of ensemble members for a given prediction of size <code>(H x W)</code>.`,Be,ae,Ee,C,re,ut,Me,kt="Output class for Marigold monocular depth prediction pipeline.",Re,le,Oe,z,de,mt,we,Ct="Output class for Marigold monocular normals prediction pipeline.",Fe,ce,Ge,xe,Se;return y=new ue({props:{title:"Marigold Pipelines for Computer Vision Tasks",local:"marigold-pipelines-for-computer-vision-tasks",headingTag:"h1"}}),G=new ue({props:{title:"Available Pipelines",local:"available-pipelines",headingTag:"h2"}}),V=new ue({props:{title:"Available Checkpoints",local:"available-checkpoints",headingTag:"h2"}}),W=new zt({props:{$$slots:{default:[Et]},$$scope:{ctx:D}}}),j=new zt({props:{warning:!0,$$slots:{default:[Rt]},$$scope:{ctx:D}}}),Q=new ue({props:{title:"MarigoldDepthPipeline",local:"diffusers.MarigoldDepthPipeline",headingTag:"h2"}}),K=new B({props:{name:"class diffusers.MarigoldDepthPipeline",anchor:"diffusers.MarigoldDepthPipeline",parameters:[{name:"unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_lcm.LCMScheduler]"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"prediction_type",val:": typing.Optional[str] = None"},{name:"scale_invariant",val:": typing.Optional[bool] = True"},{name:"shift_invariant",val:": typing.Optional[bool] = True"},{name:"default_denoising_steps",val:": typing.Optional[int] = None"},{name:"default_processing_resolution",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.MarigoldDepthPipeline.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) &#x2014;
Conditional U-Net to denoise the depth latent, conditioned on image latent.`,name:"unet"},{anchor:"diffusers.MarigoldDepthPipeline.vae",description:`<strong>vae</strong> (<code>AutoencoderKL</code>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images and predictions to and from latent
representations.`,name:"vae"},{anchor:"diffusers.MarigoldDepthPipeline.scheduler",description:`<strong>scheduler</strong> (<code>DDIMScheduler</code> or <code>LCMScheduler</code>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.MarigoldDepthPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Text-encoder, for empty text embedding.`,name:"text_encoder"},{anchor:"diffusers.MarigoldDepthPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.MarigoldDepthPipeline.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Type of predictions made by the model.`,name:"prediction_type"},{anchor:"diffusers.MarigoldDepthPipeline.scale_invariant",description:`<strong>scale_invariant</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
A model property specifying whether the predicted depth maps are scale-invariant. This value must be set in
the model config. When used together with the <code>shift_invariant=True</code> flag, the model is also called
&#x201C;affine-invariant&#x201D;. NB: overriding this value is not supported.`,name:"scale_invariant"},{anchor:"diffusers.MarigoldDepthPipeline.shift_invariant",description:`<strong>shift_invariant</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
A model property specifying whether the predicted depth maps are shift-invariant. This value must be set in
the model config. When used together with the <code>scale_invariant=True</code> flag, the model is also called
&#x201C;affine-invariant&#x201D;. NB: overriding this value is not supported.`,name:"shift_invariant"},{anchor:"diffusers.MarigoldDepthPipeline.default_denoising_steps",description:`<strong>default_denoising_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The minimum number of denoising diffusion steps that are required to produce a prediction of reasonable
quality with the given model. This value must be set in the model config. When the pipeline is called
without explicitly setting <code>num_inference_steps</code>, the default value is used. This is required to ensure
reasonable results with various model flavors compatible with the pipeline, such as those relying on very
short denoising schedules (<code>LCMScheduler</code>) and those with full diffusion schedules (<code>DDIMScheduler</code>).`,name:"default_denoising_steps"},{anchor:"diffusers.MarigoldDepthPipeline.default_processing_resolution",description:`<strong>default_processing_resolution</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The recommended value of the <code>processing_resolution</code> parameter of the pipeline. This value must be set in
the model config. When the pipeline is called without explicitly setting <code>processing_resolution</code>, the
default value is used. This is required to ensure reasonable results with various model flavors trained
with varying optimal processing resolution values.`,name:"default_processing_resolution"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py#L96"}}),ee=new B({props:{name:"__call__",anchor:"diffusers.MarigoldDepthPipeline.__call__",parameters:[{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]]"},{name:"num_inference_steps",val:": typing.Optional[int] = None"},{name:"ensemble_size",val:": int = 1"},{name:"processing_resolution",val:": typing.Optional[int] = None"},{name:"match_input_resolution",val:": bool = True"},{name:"resample_method_input",val:": str = 'bilinear'"},{name:"resample_method_output",val:": str = 'bilinear'"},{name:"batch_size",val:": int = 1"},{name:"ensembling_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"latents",val:": typing.Union[torch.Tensor, typing.List[torch.Tensor], NoneType] = None"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"output_type",val:": str = 'np'"},{name:"output_uncertainty",val:": bool = False"},{name:"output_latent",val:": bool = False"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.MarigoldDepthPipeline.__call__.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[PIL.Image.Image]</code>, <code>List[np.ndarray]</code>), &#x2014;
<code>List[torch.Tensor]</code>: An input image or images used as an input for the depth estimation task. For
arrays and tensors, the expected value range is between <code>[0, 1]</code>. Passing a batch of images is possible
by providing a four-dimensional array or a tensor. Additionally, a list of images of two- or
three-dimensional arrays or tensors can be passed. In the latter case, all list elements must have the
same width and height.`,name:"image"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of denoising diffusion steps during inference. The default value <code>None</code> results in automatic
selection. The number of steps should be at least 10 with the full Marigold models, and between 1 and 4
for Marigold-LCM models.`,name:"num_inference_steps"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.ensemble_size",description:`<strong>ensemble_size</strong> (<code>int</code>, defaults to <code>1</code>) &#x2014;
Number of ensemble predictions. Recommended values are 5 and higher for better precision, or 1 for
faster inference.`,name:"ensemble_size"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.processing_resolution",description:`<strong>processing_resolution</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Effective processing resolution. When set to <code>0</code>, matches the larger input image dimension. This
produces crisper predictions, but may also lead to the overall loss of global context. The default
value <code>None</code> resolves to the optimal value from the model config.`,name:"processing_resolution"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.match_input_resolution",description:`<strong>match_input_resolution</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
When enabled, the output prediction is resized to match the input dimensions. When disabled, the longer
side of the output will equal to <code>processing_resolution</code>.`,name:"match_input_resolution"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.resample_method_input",description:`<strong>resample_method_input</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;bilinear&quot;</code>) &#x2014;
Resampling method used to resize input images to <code>processing_resolution</code>. The accepted values are:
<code>&quot;nearest&quot;</code>, <code>&quot;nearest-exact&quot;</code>, <code>&quot;bilinear&quot;</code>, <code>&quot;bicubic&quot;</code>, or <code>&quot;area&quot;</code>.`,name:"resample_method_input"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.resample_method_output",description:`<strong>resample_method_output</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;bilinear&quot;</code>) &#x2014;
Resampling method used to resize output predictions to match the input resolution. The accepted values
are <code>&quot;nearest&quot;</code>, <code>&quot;nearest-exact&quot;</code>, <code>&quot;bilinear&quot;</code>, <code>&quot;bicubic&quot;</code>, or <code>&quot;area&quot;</code>.`,name:"resample_method_output"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
Batch size; only matters when setting <code>ensemble_size</code> or passing a tensor of images.`,name:"batch_size"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.ensembling_kwargs",description:`<strong>ensembling_kwargs</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Extra dictionary with arguments for precise ensembling control. The following options are available:<ul>
<li>reduction (<code>str</code>, <em>optional</em>, defaults to <code>&quot;median&quot;</code>): Defines the ensembling function applied in
every pixel location, can be either <code>&quot;median&quot;</code> or <code>&quot;mean&quot;</code>.</li>
<li>regularizer_strength (<code>float</code>, <em>optional</em>, defaults to <code>0.02</code>): Strength of the regularizer that
pulls the aligned predictions to the unit range from 0 to 1.</li>
<li>max_iter (<code>int</code>, <em>optional</em>, defaults to <code>2</code>): Maximum number of the alignment solver steps. Refer to
<code>scipy.optimize.minimize</code> function, <code>options</code> argument.</li>
<li>tol (<code>float</code>, <em>optional</em>, defaults to <code>1e-3</code>): Alignment solver tolerance. The solver stops when the
tolerance is reached.</li>
<li>max_res (<code>int</code>, <em>optional</em>, defaults to <code>None</code>): Resolution at which the alignment is performed;
<code>None</code> matches the <code>processing_resolution</code>.</li>
</ul>`,name:"ensembling_kwargs"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, or <code>List[torch.Tensor]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Latent noise tensors to replace the random initialization. These can be taken from the previous
function call&#x2019;s output.`,name:"latents"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, or <code>List[torch.Generator]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Random number generator object to ensure reproducibility.`,name:"generator"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;np&quot;</code>) &#x2014;
Preferred format of the output&#x2019;s <code>prediction</code> and the optional <code>uncertainty</code> fields. The accepted
values are: <code>&quot;np&quot;</code> (numpy array) or <code>&quot;pt&quot;</code> (torch tensor).`,name:"output_type"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.output_uncertainty",description:`<strong>output_uncertainty</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When enabled, the output&#x2019;s <code>uncertainty</code> field contains the predictive uncertainty map, provided that
the <code>ensemble_size</code> argument is set to a value above 2.`,name:"output_uncertainty"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.output_latent",description:`<strong>output_latent</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When enabled, the output&#x2019;s <code>latent</code> field contains the latent codes corresponding to the predictions
within the ensemble. These codes can be saved, modified, and used for subsequent calls with the
<code>latents</code> argument.`,name:"output_latent"},{anchor:"diffusers.MarigoldDepthPipeline.__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/pr_10072/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldDepthOutput">MarigoldDepthOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py#L333",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/pr_10072/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldDepthOutput"
>MarigoldDepthOutput</a> is returned, otherwise a
<code>tuple</code> is returned where the first element is the prediction, the second element is the uncertainty
(or <code>None</code>), and the third is the latent (or <code>None</code>).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/pr_10072/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldDepthOutput"
>MarigoldDepthOutput</a> or <code>tuple</code></p>
`}}),J=new It({props:{anchor:"diffusers.MarigoldDepthPipeline.__call__.example",$$slots:{default:[Ot]},$$scope:{ctx:D}}}),te=new B({props:{name:"ensemble_depth",anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth",parameters:[{name:"depth",val:": Tensor"},{name:"scale_invariant",val:": bool = True"},{name:"shift_invariant",val:": bool = True"},{name:"output_uncertainty",val:": bool = False"},{name:"reduction",val:": str = 'median'"},{name:"regularizer_strength",val:": float = 0.02"},{name:"max_iter",val:": int = 2"},{name:"tol",val:": float = 0.001"},{name:"max_res",val:": int = 1024"}],parametersDescription:[{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.depth",description:`<strong>depth</strong> (<code>torch.Tensor</code>) &#x2014;
Input ensemble depth maps.`,name:"depth"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.scale_invariant",description:`<strong>scale_invariant</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to treat predictions as scale-invariant.`,name:"scale_invariant"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.shift_invariant",description:`<strong>shift_invariant</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to treat predictions as shift-invariant.`,name:"shift_invariant"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.output_uncertainty",description:`<strong>output_uncertainty</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to output uncertainty map.`,name:"output_uncertainty"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.reduction",description:`<strong>reduction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;median&quot;</code>) &#x2014;
Reduction method used to ensemble aligned predictions. The accepted values are: <code>&quot;mean&quot;</code> and
<code>&quot;median&quot;</code>.`,name:"reduction"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.regularizer_strength",description:`<strong>regularizer_strength</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.02</code>) &#x2014;
Strength of the regularizer that pulls the aligned predictions to the unit range from 0 to 1.`,name:"regularizer_strength"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.max_iter",description:`<strong>max_iter</strong> (<code>int</code>, <em>optional</em>, defaults to <code>2</code>) &#x2014;
Maximum number of the alignment solver steps. Refer to <code>scipy.optimize.minimize</code> function, <code>options</code>
argument.`,name:"max_iter"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.tol",description:`<strong>tol</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1e-3</code>) &#x2014;
Alignment solver tolerance. The solver stops when the tolerance is reached.`,name:"tol"},{anchor:"diffusers.MarigoldDepthPipeline.ensemble_depth.max_res",description:`<strong>max_res</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1024</code>) &#x2014;
Resolution at which the alignment is performed; <code>None</code> matches the <code>processing_resolution</code>.`,name:"max_res"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py#L659",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>(1, 1, H, W)</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A tensor of aligned and ensembled depth maps and optionally a tensor of uncertainties of the same shape</p>
`}}),oe=new ue({props:{title:"MarigoldNormalsPipeline",local:"diffusers.MarigoldNormalsPipeline",headingTag:"h2"}}),ne=new B({props:{name:"class diffusers.MarigoldNormalsPipeline",anchor:"diffusers.MarigoldNormalsPipeline",parameters:[{name:"unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_lcm.LCMScheduler]"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"prediction_type",val:": typing.Optional[str] = None"},{name:"use_full_z_range",val:": typing.Optional[bool] = True"},{name:"default_denoising_steps",val:": typing.Optional[int] = None"},{name:"default_processing_resolution",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.MarigoldNormalsPipeline.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) &#x2014;
Conditional U-Net to denoise the normals latent, conditioned on image latent.`,name:"unet"},{anchor:"diffusers.MarigoldNormalsPipeline.vae",description:`<strong>vae</strong> (<code>AutoencoderKL</code>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images and predictions to and from latent
representations.`,name:"vae"},{anchor:"diffusers.MarigoldNormalsPipeline.scheduler",description:`<strong>scheduler</strong> (<code>DDIMScheduler</code> or <code>LCMScheduler</code>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.MarigoldNormalsPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Text-encoder, for empty text embedding.`,name:"text_encoder"},{anchor:"diffusers.MarigoldNormalsPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.MarigoldNormalsPipeline.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Type of predictions made by the model.`,name:"prediction_type"},{anchor:"diffusers.MarigoldNormalsPipeline.use_full_z_range",description:`<strong>use_full_z_range</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether the normals predicted by this model utilize the full range of the Z dimension, or only its positive
half.`,name:"use_full_z_range"},{anchor:"diffusers.MarigoldNormalsPipeline.default_denoising_steps",description:`<strong>default_denoising_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The minimum number of denoising diffusion steps that are required to produce a prediction of reasonable
quality with the given model. This value must be set in the model config. When the pipeline is called
without explicitly setting <code>num_inference_steps</code>, the default value is used. This is required to ensure
reasonable results with various model flavors compatible with the pipeline, such as those relying on very
short denoising schedules (<code>LCMScheduler</code>) and those with full diffusion schedules (<code>DDIMScheduler</code>).`,name:"default_denoising_steps"},{anchor:"diffusers.MarigoldNormalsPipeline.default_processing_resolution",description:`<strong>default_processing_resolution</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The recommended value of the <code>processing_resolution</code> parameter of the pipeline. This value must be set in
the model config. When the pipeline is called without explicitly setting <code>processing_resolution</code>, the
default value is used. This is required to ensure reasonable results with various model flavors trained
with varying optimal processing resolution values.`,name:"default_processing_resolution"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py#L91"}}),ie=new B({props:{name:"__call__",anchor:"diffusers.MarigoldNormalsPipeline.__call__",parameters:[{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]]"},{name:"num_inference_steps",val:": typing.Optional[int] = None"},{name:"ensemble_size",val:": int = 1"},{name:"processing_resolution",val:": typing.Optional[int] = None"},{name:"match_input_resolution",val:": bool = True"},{name:"resample_method_input",val:": str = 'bilinear'"},{name:"resample_method_output",val:": str = 'bilinear'"},{name:"batch_size",val:": int = 1"},{name:"ensembling_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"latents",val:": typing.Union[torch.Tensor, typing.List[torch.Tensor], NoneType] = None"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"output_type",val:": str = 'np'"},{name:"output_uncertainty",val:": bool = False"},{name:"output_latent",val:": bool = False"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.MarigoldNormalsPipeline.__call__.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[PIL.Image.Image]</code>, <code>List[np.ndarray]</code>), &#x2014;
<code>List[torch.Tensor]</code>: An input image or images used as an input for the normals estimation task. For
arrays and tensors, the expected value range is between <code>[0, 1]</code>. Passing a batch of images is possible
by providing a four-dimensional array or a tensor. Additionally, a list of images of two- or
three-dimensional arrays or tensors can be passed. In the latter case, all list elements must have the
same width and height.`,name:"image"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of denoising diffusion steps during inference. The default value <code>None</code> results in automatic
selection. The number of steps should be at least 10 with the full Marigold models, and between 1 and 4
for Marigold-LCM models.`,name:"num_inference_steps"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.ensemble_size",description:`<strong>ensemble_size</strong> (<code>int</code>, defaults to <code>1</code>) &#x2014;
Number of ensemble predictions. Recommended values are 5 and higher for better precision, or 1 for
faster inference.`,name:"ensemble_size"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.processing_resolution",description:`<strong>processing_resolution</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Effective processing resolution. When set to <code>0</code>, matches the larger input image dimension. This
produces crisper predictions, but may also lead to the overall loss of global context. The default
value <code>None</code> resolves to the optimal value from the model config.`,name:"processing_resolution"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.match_input_resolution",description:`<strong>match_input_resolution</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
When enabled, the output prediction is resized to match the input dimensions. When disabled, the longer
side of the output will equal to <code>processing_resolution</code>.`,name:"match_input_resolution"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.resample_method_input",description:`<strong>resample_method_input</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;bilinear&quot;</code>) &#x2014;
Resampling method used to resize input images to <code>processing_resolution</code>. The accepted values are:
<code>&quot;nearest&quot;</code>, <code>&quot;nearest-exact&quot;</code>, <code>&quot;bilinear&quot;</code>, <code>&quot;bicubic&quot;</code>, or <code>&quot;area&quot;</code>.`,name:"resample_method_input"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.resample_method_output",description:`<strong>resample_method_output</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;bilinear&quot;</code>) &#x2014;
Resampling method used to resize output predictions to match the input resolution. The accepted values
are <code>&quot;nearest&quot;</code>, <code>&quot;nearest-exact&quot;</code>, <code>&quot;bilinear&quot;</code>, <code>&quot;bicubic&quot;</code>, or <code>&quot;area&quot;</code>.`,name:"resample_method_output"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
Batch size; only matters when setting <code>ensemble_size</code> or passing a tensor of images.`,name:"batch_size"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.ensembling_kwargs",description:`<strong>ensembling_kwargs</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Extra dictionary with arguments for precise ensembling control. The following options are available:<ul>
<li>reduction (<code>str</code>, <em>optional</em>, defaults to <code>&quot;closest&quot;</code>): Defines the ensembling function applied in
every pixel location, can be either <code>&quot;closest&quot;</code> or <code>&quot;mean&quot;</code>.</li>
</ul>`,name:"ensembling_kwargs"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Latent noise tensors to replace the random initialization. These can be taken from the previous
function call&#x2019;s output.`,name:"latents"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, or <code>List[torch.Generator]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Random number generator object to ensure reproducibility.`,name:"generator"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;np&quot;</code>) &#x2014;
Preferred format of the output&#x2019;s <code>prediction</code> and the optional <code>uncertainty</code> fields. The accepted
values are: <code>&quot;np&quot;</code> (numpy array) or <code>&quot;pt&quot;</code> (torch tensor).`,name:"output_type"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.output_uncertainty",description:`<strong>output_uncertainty</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When enabled, the output&#x2019;s <code>uncertainty</code> field contains the predictive uncertainty map, provided that
the <code>ensemble_size</code> argument is set to a value above 2.`,name:"output_uncertainty"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.output_latent",description:`<strong>output_latent</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When enabled, the output&#x2019;s <code>latent</code> field contains the latent codes corresponding to the predictions
within the ensemble. These codes can be saved, modified, and used for subsequent calls with the
<code>latents</code> argument.`,name:"output_latent"},{anchor:"diffusers.MarigoldNormalsPipeline.__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/pr_10072/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldDepthOutput">MarigoldDepthOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py#L317",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/pr_10072/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldNormalsOutput"
>MarigoldNormalsOutput</a> is returned, otherwise a
<code>tuple</code> is returned where the first element is the prediction, the second element is the uncertainty
(or <code>None</code>), and the third is the latent (or <code>None</code>).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/pr_10072/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldNormalsOutput"
>MarigoldNormalsOutput</a> or <code>tuple</code></p>
`}}),Z=new It({props:{anchor:"diffusers.MarigoldNormalsPipeline.__call__.example",$$slots:{default:[Ft]},$$scope:{ctx:D}}}),se=new B({props:{name:"ensemble_normals",anchor:"diffusers.MarigoldNormalsPipeline.ensemble_normals",parameters:[{name:"normals",val:": Tensor"},{name:"output_uncertainty",val:": bool"},{name:"reduction",val:": str = 'closest'"}],parametersDescription:[{anchor:"diffusers.MarigoldNormalsPipeline.ensemble_normals.normals",description:`<strong>normals</strong> (<code>torch.Tensor</code>) &#x2014;
Input ensemble normals maps.`,name:"normals"},{anchor:"diffusers.MarigoldNormalsPipeline.ensemble_normals.output_uncertainty",description:`<strong>output_uncertainty</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to output uncertainty map.`,name:"output_uncertainty"},{anchor:"diffusers.MarigoldNormalsPipeline.ensemble_normals.reduction",description:`<strong>reduction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;closest&quot;</code>) &#x2014;
Reduction method used to ensemble aligned predictions. The accepted values are: <code>&quot;closest&quot;</code> and
<code>&quot;mean&quot;</code>.`,name:"reduction"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py#L646",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A tensor of aligned and ensembled normals maps with shape <code>(1, 3, H, W)</code> and optionally a tensor of
uncertainties of shape <code>(1, 1, H, W)</code>.</p>
`}}),ae=new ue({props:{title:"MarigoldDepthOutput",local:"diffusers.pipelines.marigold.MarigoldDepthOutput",headingTag:"h2"}}),re=new B({props:{name:"class diffusers.pipelines.marigold.MarigoldDepthOutput",anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput",parameters:[{name:"prediction",val:": typing.Union[numpy.ndarray, torch.Tensor]"},{name:"uncertainty",val:": typing.Union[NoneType, numpy.ndarray, torch.Tensor]"},{name:"latent",val:": typing.Optional[torch.Tensor]"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput.prediction",description:`<strong>prediction</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>) &#x2014;
Predicted depth maps with values in the range [0, 1]. The shape is always $numimages 	imes 1 	imes height
imes width$, regardless of whether the images were passed as a 4D array or a list.`,name:"prediction"},{anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput.uncertainty",description:`<strong>uncertainty</strong> (<code>None</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>) &#x2014;
Uncertainty maps computed from the ensemble, with values in the range [0, 1]. The shape is $numimages
imes 1 	imes height 	imes width$.`,name:"uncertainty"},{anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput.latent",description:`<strong>latent</strong> (<code>None</code>, <code>torch.Tensor</code>) &#x2014;
Latent features corresponding to the predictions, compatible with the <code>latents</code> argument of the pipeline.
The shape is $numimages * numensemble 	imes 4 	imes latentheight 	imes latentwidth$.`,name:"latent"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py#L74"}}),le=new ue({props:{title:"MarigoldNormalsOutput",local:"diffusers.pipelines.marigold.MarigoldNormalsOutput",headingTag:"h2"}}),de=new B({props:{name:"class diffusers.pipelines.marigold.MarigoldNormalsOutput",anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput",parameters:[{name:"prediction",val:": typing.Union[numpy.ndarray, torch.Tensor]"},{name:"uncertainty",val:": typing.Union[NoneType, numpy.ndarray, torch.Tensor]"},{name:"latent",val:": typing.Optional[torch.Tensor]"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput.prediction",description:`<strong>prediction</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>) &#x2014;
Predicted normals with values in the range [-1, 1]. The shape is always $numimages 	imes 3 	imes height
imes width$, regardless of whether the images were passed as a 4D array or a list.`,name:"prediction"},{anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput.uncertainty",description:`<strong>uncertainty</strong> (<code>None</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>) &#x2014;
Uncertainty maps computed from the ensemble, with values in the range [0, 1]. The shape is $numimages
imes 1 	imes height 	imes width$.`,name:"uncertainty"},{anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput.latent",description:`<strong>latent</strong> (<code>None</code>, <code>torch.Tensor</code>) &#x2014;
Latent features corresponding to the predictions, compatible with the <code>latents</code> argument of the pipeline.
The shape is $numimages * numensemble 	imes 4 	imes latentheight 	imes latentwidth$.`,name:"latent"}],source:"https://github.com/huggingface/diffusers/blob/vr_10072/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py#L69"}}),ce=new Bt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/marigold.md"}}),{c(){a=l("meta"),M=i(),p=l("p"),u=i(),h(y.$$.fragment),r=i(),w=l("p"),w.innerHTML=ht,$e=i(),E=l("p"),E.innerHTML=gt,Pe=i(),R=l("ul"),R.innerHTML=ft,De=i(),O=l("p"),O.textContent=_t,Ne=i(),F=l("p"),F.innerHTML=bt,qe=i(),h(G.$$.fragment),Le=i(),S=l("p"),S.innerHTML=vt,ke=i(),A=l("table"),A.innerHTML=yt,Ce=i(),h(V.$$.fragment),ze=i(),X=l("p"),X.innerHTML=Mt,Ie=i(),h(W.$$.fragment),We=i(),h(j.$$.fragment),je=i(),Y=l("p"),Y.innerHTML=wt,Je=i(),h(Q.$$.fragment),Ue=i(),T=l("div"),h(K.$$.fragment),Qe=i(),me=l("p"),me.innerHTML=Tt,Ke=i(),he=l("p"),he.innerHTML=xt,et=i(),N=l("div"),h(ee.$$.fragment),tt=i(),ge=l("p"),ge.textContent=$t,ot=i(),h(J.$$.fragment),nt=i(),U=l("div"),h(te.$$.fragment),it=i(),fe=l("p"),fe.innerHTML=Pt,Ze=i(),h(oe.$$.fragment),He=i(),x=l("div"),h(ne.$$.fragment),st=i(),_e=l("p"),_e.innerHTML=Dt,at=i(),be=l("p"),be.innerHTML=Nt,rt=i(),q=l("div"),h(ie.$$.fragment),lt=i(),ve=l("p"),ve.textContent=qt,dt=i(),h(Z.$$.fragment),ct=i(),H=l("div"),h(se.$$.fragment),pt=i(),ye=l("p"),ye.innerHTML=Lt,Be=i(),h(ae.$$.fragment),Ee=i(),C=l("div"),h(re.$$.fragment),ut=i(),Me=l("p"),Me.textContent=kt,Re=i(),h(le.$$.fragment),Oe=i(),z=l("div"),h(de.$$.fragment),mt=i(),we=l("p"),we.textContent=Ct,Fe=i(),h(ce.$$.fragment),Ge=i(),xe=l("p"),this.h()},l(e){const t=Ht("svelte-u9bgzb",document.head);a=d(t,"META",{name:!0,content:!0}),t.forEach(o),M=s(e),p=d(e,"P",{}),L(p).forEach(o),u=s(e),g(y.$$.fragment,e),r=s(e),w=d(e,"P",{"data-svelte-h":!0}),m(w)!=="svelte-1musivh"&&(w.innerHTML=ht),$e=s(e),E=d(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1dfiaml"&&(E.innerHTML=gt),Pe=s(e),R=d(e,"UL",{"data-svelte-h":!0}),m(R)!=="svelte-w0a4ms"&&(R.innerHTML=ft),De=s(e),O=d(e,"P",{"data-svelte-h":!0}),m(O)!=="svelte-1cwsb16"&&(O.textContent=_t),Ne=s(e),F=d(e,"P",{"data-svelte-h":!0}),m(F)!=="svelte-1ycg63a"&&(F.innerHTML=bt),qe=s(e),g(G.$$.fragment,e),Le=s(e),S=d(e,"P",{"data-svelte-h":!0}),m(S)!=="svelte-mg9rv6"&&(S.innerHTML=vt),ke=s(e),A=d(e,"TABLE",{"data-svelte-h":!0}),m(A)!=="svelte-1v9cy9r"&&(A.innerHTML=yt),Ce=s(e),g(V.$$.fragment,e),ze=s(e),X=d(e,"P",{"data-svelte-h":!0}),m(X)!=="svelte-1gkve0a"&&(X.innerHTML=Mt),Ie=s(e),g(W.$$.fragment,e),We=s(e),g(j.$$.fragment,e),je=s(e),Y=d(e,"P",{"data-svelte-h":!0}),m(Y)!=="svelte-13eijh7"&&(Y.innerHTML=wt),Je=s(e),g(Q.$$.fragment,e),Ue=s(e),T=d(e,"DIV",{class:!0});var $=L(T);g(K.$$.fragment,$),Qe=s($),me=d($,"P",{"data-svelte-h":!0}),m(me)!=="svelte-41emwn"&&(me.innerHTML=Tt),Ke=s($),he=d($,"P",{"data-svelte-h":!0}),m(he)!=="svelte-1nkvj6v"&&(he.innerHTML=xt),et=s($),N=d($,"DIV",{class:!0});var I=L(N);g(ee.$$.fragment,I),tt=s(I),ge=d(I,"P",{"data-svelte-h":!0}),m(ge)!=="svelte-typ793"&&(ge.textContent=$t),ot=s(I),g(J.$$.fragment,I),I.forEach(o),nt=s($),U=d($,"DIV",{class:!0});var pe=L(U);g(te.$$.fragment,pe),it=s(pe),fe=d(pe,"P",{"data-svelte-h":!0}),m(fe)!=="svelte-3ecgzi"&&(fe.innerHTML=Pt),pe.forEach(o),$.forEach(o),Ze=s(e),g(oe.$$.fragment,e),He=s(e),x=d(e,"DIV",{class:!0});var P=L(x);g(ne.$$.fragment,P),st=s(P),_e=d(P,"P",{"data-svelte-h":!0}),m(_e)!=="svelte-13lumts"&&(_e.innerHTML=Dt),at=s(P),be=d(P,"P",{"data-svelte-h":!0}),m(be)!=="svelte-1nkvj6v"&&(be.innerHTML=Nt),rt=s(P),q=d(P,"DIV",{class:!0});var Te=L(q);g(ie.$$.fragment,Te),lt=s(Te),ve=d(Te,"P",{"data-svelte-h":!0}),m(ve)!=="svelte-typ793"&&(ve.textContent=qt),dt=s(Te),g(Z.$$.fragment,Te),Te.forEach(o),ct=s(P),H=d(P,"DIV",{class:!0});var Ae=L(H);g(se.$$.fragment,Ae),pt=s(Ae),ye=d(Ae,"P",{"data-svelte-h":!0}),m(ye)!=="svelte-1sqp0ub"&&(ye.innerHTML=Lt),Ae.forEach(o),P.forEach(o),Be=s(e),g(ae.$$.fragment,e),Ee=s(e),C=d(e,"DIV",{class:!0});var Ve=L(C);g(re.$$.fragment,Ve),ut=s(Ve),Me=d(Ve,"P",{"data-svelte-h":!0}),m(Me)!=="svelte-zmov3r"&&(Me.textContent=kt),Ve.forEach(o),Re=s(e),g(le.$$.fragment,e),Oe=s(e),z=d(e,"DIV",{class:!0});var Xe=L(z);g(de.$$.fragment,Xe),mt=s(Xe),we=d(Xe,"P",{"data-svelte-h":!0}),m(we)!=="svelte-1msg7gm"&&(we.textContent=Ct),Xe.forEach(o),Fe=s(e),g(ce.$$.fragment,e),Ge=s(e),xe=d(e,"P",{}),L(xe).forEach(o),this.h()},h(){k(a,"name","hf:doc:metadata"),k(a,"content",St),k(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(z,"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){c(document.head,a),n(e,M,t),n(e,p,t),n(e,u,t),f(y,e,t),n(e,r,t),n(e,w,t),n(e,$e,t),n(e,E,t),n(e,Pe,t),n(e,R,t),n(e,De,t),n(e,O,t),n(e,Ne,t),n(e,F,t),n(e,qe,t),f(G,e,t),n(e,Le,t),n(e,S,t),n(e,ke,t),n(e,A,t),n(e,Ce,t),f(V,e,t),n(e,ze,t),n(e,X,t),n(e,Ie,t),f(W,e,t),n(e,We,t),f(j,e,t),n(e,je,t),n(e,Y,t),n(e,Je,t),f(Q,e,t),n(e,Ue,t),n(e,T,t),f(K,T,null),c(T,Qe),c(T,me),c(T,Ke),c(T,he),c(T,et),c(T,N),f(ee,N,null),c(N,tt),c(N,ge),c(N,ot),f(J,N,null),c(T,nt),c(T,U),f(te,U,null),c(U,it),c(U,fe),n(e,Ze,t),f(oe,e,t),n(e,He,t),n(e,x,t),f(ne,x,null),c(x,st),c(x,_e),c(x,at),c(x,be),c(x,rt),c(x,q),f(ie,q,null),c(q,lt),c(q,ve),c(q,dt),f(Z,q,null),c(x,ct),c(x,H),f(se,H,null),c(H,pt),c(H,ye),n(e,Be,t),f(ae,e,t),n(e,Ee,t),n(e,C,t),f(re,C,null),c(C,ut),c(C,Me),n(e,Re,t),f(le,e,t),n(e,Oe,t),n(e,z,t),f(de,z,null),c(z,mt),c(z,we),n(e,Fe,t),f(ce,e,t),n(e,Ge,t),n(e,xe,t),Se=!0},p(e,[t]){const $={};t&2&&($.$$scope={dirty:t,ctx:e}),W.$set($);const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),j.$set(I);const pe={};t&2&&(pe.$$scope={dirty:t,ctx:e}),J.$set(pe);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),Z.$set(P)},i(e){Se||(_(y.$$.fragment,e),_(G.$$.fragment,e),_(V.$$.fragment,e),_(W.$$.fragment,e),_(j.$$.fragment,e),_(Q.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(J.$$.fragment,e),_(te.$$.fragment,e),_(oe.$$.fragment,e),_(ne.$$.fragment,e),_(ie.$$.fragment,e),_(Z.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(re.$$.fragment,e),_(le.$$.fragment,e),_(de.$$.fragment,e),_(ce.$$.fragment,e),Se=!0)},o(e){b(y.$$.fragment,e),b(G.$$.fragment,e),b(V.$$.fragment,e),b(W.$$.fragment,e),b(j.$$.fragment,e),b(Q.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),b(J.$$.fragment,e),b(te.$$.fragment,e),b(oe.$$.fragment,e),b(ne.$$.fragment,e),b(ie.$$.fragment,e),b(Z.$$.fragment,e),b(se.$$.fragment,e),b(ae.$$.fragment,e),b(re.$$.fragment,e),b(le.$$.fragment,e),b(de.$$.fragment,e),b(ce.$$.fragment,e),Se=!1},d(e){e&&(o(M),o(p),o(u),o(r),o(w),o($e),o(E),o(Pe),o(R),o(De),o(O),o(Ne),o(F),o(qe),o(Le),o(S),o(ke),o(A),o(Ce),o(ze),o(X),o(Ie),o(We),o(je),o(Y),o(Je),o(Ue),o(T),o(Ze),o(He),o(x),o(Be),o(Ee),o(C),o(Re),o(Oe),o(z),o(Fe),o(Ge),o(xe)),o(a),v(y,e),v(G,e),v(V,e),v(W,e),v(j,e),v(Q,e),v(K),v(ee),v(J),v(te),v(oe,e),v(ne),v(ie),v(Z),v(se),v(ae,e),v(re),v(le,e),v(de),v(ce,e)}}}const St='{"title":"Marigold Pipelines for Computer Vision Tasks","local":"marigold-pipelines-for-computer-vision-tasks","sections":[{"title":"Available Pipelines","local":"available-pipelines","sections":[],"depth":2},{"title":"Available Checkpoints","local":"available-checkpoints","sections":[],"depth":2},{"title":"MarigoldDepthPipeline","local":"diffusers.MarigoldDepthPipeline","sections":[],"depth":2},{"title":"MarigoldNormalsPipeline","local":"diffusers.MarigoldNormalsPipeline","sections":[],"depth":2},{"title":"MarigoldDepthOutput","local":"diffusers.pipelines.marigold.MarigoldDepthOutput","sections":[],"depth":2},{"title":"MarigoldNormalsOutput","local":"diffusers.pipelines.marigold.MarigoldNormalsOutput","sections":[],"depth":2}],"depth":1}';function At(D){return Jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oo extends Ut{constructor(a){super(),Zt(this,a,At,Gt,jt,{})}}export{oo as component};
