Buckets:
| import{s as Lo,o as Yo,n as Ai}from"../chunks/scheduler.53228c21.js";import{S as So,i as Ao,e as a,s,c,q as qo,H as Po,h as Do,a as l,d as n,b as o,f as J,g as p,j as r,r as Eo,u as Fo,k as _,w as Yi,l as d,m as i,n as m,t as u,o as h,p as g}from"../chunks/index.cac5d66a.js";import{C as Qo}from"../chunks/CopyLLMTxtMenu.5cd684c9.js";import{D as W}from"../chunks/Docstring.471df80e.js";import{C as j}from"../chunks/CodeBlock.606cbaf4.js";import{E as Si}from"../chunks/ExampleCodeBlock.fd5b4873.js";import{H as Z,E as Ko}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.9c070acf.js";function Oo(z){let M,v="Examples:",y,b,T;return b=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQWRlcHRoJTIwJTNEJTIwcGlwZShpbWFnZSklMEElMEF2aXMlMjAlM0QlMjBwaXBlLmltYWdlX3Byb2Nlc3Nvci52aXN1YWxpemVfZGVwdGgoZGVwdGgucHJlZGljdGlvbiklMEF2aXMlNUIwJTVELnNhdmUoJTIyZWluc3RlaW5fZGVwdGgucG5nJTIyKSUwQSUwQWRlcHRoXzE2Yml0JTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IuZXhwb3J0X2RlcHRoX3RvXzE2Yml0X3BuZyhkZXB0aC5wcmVkaWN0aW9uKSUwQWRlcHRoXzE2Yml0JTVCMCU1RC5zYXZlKCUyMmVpbnN0ZWluX2RlcHRoXzE2Yml0LnBuZyUyMik=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"prs-eth/marigold-depth-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| <span class="hljs-meta">>>> </span>depth = pipe(image) | |
| <span class="hljs-meta">>>> </span>vis = pipe.image_processor.visualize_depth(depth.prediction) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>].save(<span class="hljs-string">"einstein_depth.png"</span>) | |
| <span class="hljs-meta">>>> </span>depth_16bit = pipe.image_processor.export_depth_to_16bit_png(depth.prediction) | |
| <span class="hljs-meta">>>> </span>depth_16bit[<span class="hljs-number">0</span>].save(<span class="hljs-string">"einstein_depth_16bit.png"</span>)`,lang:"py",wrap:!1}}),{c(){M=a("p"),M.textContent=v,y=s(),c(b.$$.fragment)},l(f){M=l(f,"P",{"data-svelte-h":!0}),r(M)!=="svelte-kvfsh7"&&(M.textContent=v),y=o(f),p(b.$$.fragment,f)},m(f,w){i(f,M,w),i(f,y,w),m(b,f,w),T=!0},p:Ai,i(f){T||(u(b.$$.fragment,f),T=!0)},o(f){h(b.$$.fragment,f),T=!1},d(f){f&&(n(M),n(y)),g(b,f)}}}function ea(z){let M,v="Examples:",y,b,T;return b=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkTm9ybWFsc1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtbm9ybWFscy12MS0xJTIyJTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBkaWZmdXNlcnMudXRpbHMubG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRm1hcmlnb2xkbW9ub2RlcHRoLmdpdGh1Yi5pbyUyRmltYWdlcyUyRmVpbnN0ZWluLmpwZyUyMiklMEFub3JtYWxzJTIwJTNEJTIwcGlwZShpbWFnZSklMEElMEF2aXMlMjAlM0QlMjBwaXBlLmltYWdlX3Byb2Nlc3Nvci52aXN1YWxpemVfbm9ybWFscyhub3JtYWxzLnByZWRpY3Rpb24pJTBBdmlzJTVCMCU1RC5zYXZlKCUyMmVpbnN0ZWluX25vcm1hbHMucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>pipe = diffusers.MarigoldNormalsPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"prs-eth/marigold-normals-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| <span class="hljs-meta">>>> </span>normals = pipe(image) | |
| <span class="hljs-meta">>>> </span>vis = pipe.image_processor.visualize_normals(normals.prediction) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>].save(<span class="hljs-string">"einstein_normals.png"</span>)`,lang:"py",wrap:!1}}),{c(){M=a("p"),M.textContent=v,y=s(),c(b.$$.fragment)},l(f){M=l(f,"P",{"data-svelte-h":!0}),r(M)!=="svelte-kvfsh7"&&(M.textContent=v),y=o(f),p(b.$$.fragment,f)},m(f,w){i(f,M,w),i(f,y,w),m(b,f,w),T=!0},p:Ai,i(f){T||(u(b.$$.fragment,f),T=!0)},o(f){h(b.$$.fragment,f),T=!1},d(f){f&&(n(M),n(y)),g(b,f)}}}function ta(z){let M,v="Examples:",y,b,T;return b=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkSW50cmluc2ljc1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtaWlkLWFwcGVhcmFuY2UtdjEtMSUyMiUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQWltYWdlJTIwJTNEJTIwZGlmZnVzZXJzLnV0aWxzLmxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZtYXJpZ29sZG1vbm9kZXB0aC5naXRodWIuaW8lMkZpbWFnZXMlMkZlaW5zdGVpbi5qcGclMjIpJTBBaW50cmluc2ljcyUyMCUzRCUyMHBpcGUoaW1hZ2UpJTBBJTBBdmlzJTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IudmlzdWFsaXplX2ludHJpbnNpY3MoaW50cmluc2ljcy5wcmVkaWN0aW9uJTJDJTIwcGlwZS50YXJnZXRfcHJvcGVydGllcyklMEF2aXMlNUIwJTVEJTVCJTIyYWxiZWRvJTIyJTVELnNhdmUoJTIyZWluc3RlaW5fYWxiZWRvLnBuZyUyMiklMEF2aXMlNUIwJTVEJTVCJTIycm91Z2huZXNzJTIyJTVELnNhdmUoJTIyZWluc3RlaW5fcm91Z2huZXNzLnBuZyUyMiklMEF2aXMlNUIwJTVEJTVCJTIybWV0YWxsaWNpdHklMjIlNUQuc2F2ZSglMjJlaW5zdGVpbl9tZXRhbGxpY2l0eS5wbmclMjIp",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>pipe = diffusers.MarigoldIntrinsicsPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"prs-eth/marigold-iid-appearance-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| <span class="hljs-meta">>>> </span>intrinsics = pipe(image) | |
| <span class="hljs-meta">>>> </span>vis = pipe.image_processor.visualize_intrinsics(intrinsics.prediction, pipe.target_properties) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>][<span class="hljs-string">"albedo"</span>].save(<span class="hljs-string">"einstein_albedo.png"</span>) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>][<span class="hljs-string">"roughness"</span>].save(<span class="hljs-string">"einstein_roughness.png"</span>) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>][<span class="hljs-string">"metallicity"</span>].save(<span class="hljs-string">"einstein_metallicity.png"</span>)`,lang:"py",wrap:!1}}),{c(){M=a("p"),M.textContent=v,y=s(),c(b.$$.fragment)},l(f){M=l(f,"P",{"data-svelte-h":!0}),r(M)!=="svelte-kvfsh7"&&(M.textContent=v),y=o(f),p(b.$$.fragment,f)},m(f,w){i(f,M,w),i(f,y,w),m(b,f,w),T=!0},p:Ai,i(f){T||(u(b.$$.fragment,f),T=!0)},o(f){h(b.$$.fragment,f),T=!1},d(f){f&&(n(M),n(y)),g(b,f)}}}function na(z){let M,v;return M=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkSW50cmluc2ljc1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtaWlkLWxpZ2h0aW5nLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQWludHJpbnNpY3MlMjAlM0QlMjBwaXBlKGltYWdlKSUwQSUwQXZpcyUyMCUzRCUyMHBpcGUuaW1hZ2VfcHJvY2Vzc29yLnZpc3VhbGl6ZV9pbnRyaW5zaWNzKGludHJpbnNpY3MucHJlZGljdGlvbiUyQyUyMHBpcGUudGFyZ2V0X3Byb3BlcnRpZXMpJTBBdmlzJTVCMCU1RCU1QiUyMmFsYmVkbyUyMiU1RC5zYXZlKCUyMmVpbnN0ZWluX2FsYmVkby5wbmclMjIpJTBBdmlzJTVCMCU1RCU1QiUyMnNoYWRpbmclMjIlNUQuc2F2ZSglMjJlaW5zdGVpbl9zaGFkaW5nLnBuZyUyMiklMEF2aXMlNUIwJTVEJTVCJTIycmVzaWR1YWwlMjIlNUQuc2F2ZSglMjJlaW5zdGVpbl9yZXNpZHVhbC5wbmclMjIp",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>pipe = diffusers.MarigoldIntrinsicsPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"prs-eth/marigold-iid-lighting-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| <span class="hljs-meta">>>> </span>intrinsics = pipe(image) | |
| <span class="hljs-meta">>>> </span>vis = pipe.image_processor.visualize_intrinsics(intrinsics.prediction, pipe.target_properties) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>][<span class="hljs-string">"albedo"</span>].save(<span class="hljs-string">"einstein_albedo.png"</span>) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>][<span class="hljs-string">"shading"</span>].save(<span class="hljs-string">"einstein_shading.png"</span>) | |
| <span class="hljs-meta">>>> </span>vis[<span class="hljs-number">0</span>][<span class="hljs-string">"residual"</span>].save(<span class="hljs-string">"einstein_residual.png"</span>)`,lang:"py",wrap:!1}}),{c(){c(M.$$.fragment)},l(y){p(M.$$.fragment,y)},m(y,b){m(M,y,b),v=!0},p:Ai,i(y){v||(u(M.$$.fragment,y),v=!0)},o(y){h(M.$$.fragment,y),v=!1},d(y){g(M,y)}}}function ia(z){let M,v,y,b,T,f,w,cn,me,Zs='<img src="https://marigoldmonodepth.github.io/images/teaser_collage_compressed.jpg" alt="marigold"/>',pn,ue,Is=`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&hl=en" rel="nofollow">Konrad Schindler</a>. | |
| The core idea is to <strong>repurpose the generative prior of Text-to-Image Latent Diffusion Models (LDMs) for traditional | |
| computer vision tasks</strong>. | |
| This approach was explored by fine-tuning Stable Diffusion for <strong>Monocular Depth Estimation</strong>, as demonstrated in the | |
| teaser above.`,mn,he,xs=`Marigold was later extended in the follow-up paper, | |
| <a href="https://huggingface.co/papers/2312.02145" rel="nofollow">Marigold: Affordable Adaptation of Diffusion-Based Image Generators for Image Analysis</a>, | |
| authored by | |
| <a href="http://www.kebingxin.com/" rel="nofollow">Bingxin Ke</a>, | |
| <a href="https://www.linkedin.com/in/kevin-qu-b3417621b/?locale=en_US" rel="nofollow">Kevin Qu</a>, | |
| <a href="https://tianfwang.github.io/" rel="nofollow">Tianfu Wang</a>, | |
| <a href="https://nandometzger.github.io/" rel="nofollow">Nando Metzger</a>, | |
| <a href="https://shengyuh.github.io/" rel="nofollow">Shengyu Huang</a>, | |
| <a href="https://www.linkedin.com/in/bobboli0202/" rel="nofollow">Bo Li</a>, | |
| <a href="https://www.obukhov.ai/" rel="nofollow">Anton Obukhov</a>, and | |
| <a href="https://scholar.google.com/citations?user=FZuNgqIAAAAJ&hl=en" rel="nofollow">Konrad Schindler</a>. | |
| This work expanded Marigold to support new modalities such as <strong>Surface Normals</strong> and <strong>Intrinsic Image Decomposition</strong> | |
| (IID), introduced a training protocol for <strong>Latent Consistency Models</strong> (LCM), and demonstrated <strong>High-Resolution</strong> (HR) | |
| processing capability.`,un,A,Us=`<p>The early Marigold models (<code>v1-0</code> and earlier) were optimized for best results with at least 10 inference steps. | |
| LCM models were later developed to enable high-quality inference in just 1 to 4 steps. | |
| Marigold models <code>v1-1</code> and later use the DDIM scheduler to achieve optimal | |
| results in as few as 1 to 4 steps.</p>`,hn,ge,gn,fe,Gs=`Each pipeline is tailored for a specific computer vision task, processing an input RGB image and generating a | |
| corresponding prediction. | |
| Currently, the following computer vision tasks are implemented:`,fn,Me,Ws='<thead><tr><th>Pipeline</th> <th>Recommended Model Checkpoints</th> <th align="center">Spaces (Interactive Apps)</th> <th>Predicted Modalities</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://huggingface.co/prs-eth/marigold-depth-v1-1" rel="nofollow">prs-eth/marigold-depth-v1-1</a></td> <td align="center"><a href="https://huggingface.co/spaces/prs-eth/marigold" rel="nofollow">Depth Estimation</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></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://huggingface.co/prs-eth/marigold-normals-v1-1" rel="nofollow">prs-eth/marigold-normals-v1-1</a></td> <td align="center"><a href="https://huggingface.co/spaces/prs-eth/marigold-normals" rel="nofollow">Surface Normals Estimation</a></td> <td><a href="https://en.wikipedia.org/wiki/Normal_mapping" rel="nofollow">Surface normals</a></td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/marigold/pipeline_marigold_intrinsics.py" rel="nofollow">MarigoldIntrinsicsPipeline</a></td> <td><a href="https://huggingface.co/prs-eth/marigold-iid-appearance-v1-1" rel="nofollow">prs-eth/marigold-iid-appearance-v1-1</a>,<br/><a href="https://huggingface.co/prs-eth/marigold-iid-lighting-v1-1" rel="nofollow">prs-eth/marigold-iid-lighting-v1-1</a></td> <td align="center"><a href="https://huggingface.co/spaces/prs-eth/marigold-iid" rel="nofollow">Intrinsic Image Decomposition</a></td> <td><a href="https://en.wikipedia.org/wiki/Albedo" rel="nofollow">Albedo</a>, <a href="https://www.n.aiq3d.com/wiki/roughnessmetalnessao-map" rel="nofollow">Materials</a>, <a href="https://en.wikipedia.org/wiki/Diffuse_reflection" rel="nofollow">Lighting</a></td></tr></tbody>',Mn,ye,yn,be,Ns=`All original checkpoints are available under the <a href="https://huggingface.co/prs-eth/" rel="nofollow">PRS-ETH</a> organization on Hugging Face. | |
| They are designed for use with diffusers pipelines and the <a href="https://github.com/prs-eth/marigold" rel="nofollow">original codebase</a>, which can also be used to train | |
| new model checkpoints. | |
| The following is a summary of the recommended checkpoints, all of which produce reliable results with 1 to 4 steps.`,bn,P,Ct,Cs="<tr><th>Checkpoint</th> <th>Modality</th> <th>Comment</th></tr>",Pi,N,Bt,Bs='<td><a href="https://huggingface.co/prs-eth/marigold-depth-v1-1" rel="nofollow">prs-eth/marigold-depth-v1-1</a></td> <td>Depth</td> <td>Affine-invariant depth prediction assigns each pixel a value between 0 (near plane) and 1 (far plane), with both planes determined by the model during inference.</td>',Di,kt,ks='<td><a href="https://huggingface.co/prs-eth/marigold-normals-v0-1" rel="nofollow">prs-eth/marigold-normals-v0-1</a></td> <td>Normals</td> <td>The surface normals predictions are unit-length 3D vectors in the screen space camera, with values in the range from -1 to 1.</td>',Fi,$t,$s='<td><a href="https://huggingface.co/prs-eth/marigold-iid-appearance-v1-1" rel="nofollow">prs-eth/marigold-iid-appearance-v1-1</a></td> <td>Intrinsics</td> <td>InteriorVerse decomposition is comprised of Albedo and two BRDF material properties: Roughness and Metallicity.</td>',Qi,E,zt,zs='<a href="https://huggingface.co/prs-eth/marigold-iid-lighting-v1-1" rel="nofollow">prs-eth/marigold-iid-lighting-v1-1</a>',Ki,Rt,Rs="Intrinsics",Oi,_e,es,_n,Ho='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>I</mi></mrow><annotation encoding="application/x-tex">I</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em;"></span><span class="mord mathnormal" style="margin-right:0.07847em;">I</span></span></span></span>',Tn,wn,D,Vs=`<p>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-a-pipeline">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="./stable_diffusion/svd#reduce-memory-usage">here</a>.</p>`,vn,F,Xs=`<p>Marigold pipelines were designed and tested with the scheduler embedded in the model checkpoint. | |
| The optimal number of inference steps varies by scheduler, with no universal value that works best across all cases. | |
| To accommodate this, the <code>num_inference_steps</code> parameter in the pipeline’s <code>__call__</code> method defaults to <code>None</code> (see the | |
| API reference). | |
| Unless set explicitly, it inherits the value from the <code>default_denoising_steps</code> field in the checkpoint configuration | |
| file (<code>model_index.json</code>). | |
| This ensures high-quality predictions when invoking the pipeline with only the <code>image</code> argument.</p>`,Jn,Te,qs=`The examples below are mostly given for depth prediction, but they can be universally applied to other supported | |
| modalities. | |
| We showcase the predictions using the same input image of Albert Einstein generated by Midjourney. | |
| This makes it easier to compare visualizations of the predictions across various modalities and checkpoints.`,jn,R,Es='<div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://marigoldmonodepth.github.io/images/einstein.jpg"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Example input image for all Marigold pipelines</figcaption></div>',Zn,we,In,ve,Hs=`To get a depth prediction, load the <code>prs-eth/marigold-depth-v1-1</code> checkpoint into <a href="/docs/diffusers/pr_13098/en/api/pipelines/marigold#diffusers.MarigoldDepthPipeline">MarigoldDepthPipeline</a>, | |
| put the image through the pipeline, and save the predictions:`,xn,Je,Un,je,Ls=`The <a href="/docs/diffusers/pr_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_depth">visualize_depth()</a> function applies one of | |
| <a href="https://matplotlib.org/stable/users/explain/colors/colormaps.html" rel="nofollow">matplotlib’s colormaps</a> (<code>Spectral</code> by default) to map the predicted pixel values from a single-channel <code>[0, 1]</code> | |
| depth range into an RGB image. | |
| With the <code>Spectral</code> colormap, pixels with near depth are painted red, and far pixels are blue. | |
| The 16-bit PNG file stores the single channel values mapped linearly from the <code>[0, 1]</code> range into <code>[0, 65535]</code>. | |
| Below are the raw and the visualized predictions. The darker and closer areas (mustache) are easier to distinguish in | |
| the visualization.`,Gn,Q,Ys='<div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_einstein_lcm_depth_16bit.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Predicted depth (16-bit PNG)</figcaption></div> <div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_einstein_lcm_depth.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Predicted depth visualization (Spectral)</figcaption></div>',Wn,Ze,Nn,Ie,Ss=`Load the <code>prs-eth/marigold-normals-v1-1</code> checkpoint into <a href="/docs/diffusers/pr_13098/en/api/pipelines/marigold#diffusers.MarigoldNormalsPipeline">MarigoldNormalsPipeline</a>, put the image through the | |
| pipeline, and save the predictions:`,Cn,xe,Bn,Ue,As=`The <a href="/docs/diffusers/pr_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_normals">visualize_normals()</a> maps the three-dimensional | |
| prediction with pixel values in the range <code>[-1, 1]</code> into an RGB image. | |
| The visualization function supports flipping surface normals axes to make the visualization compatible with other | |
| choices of the frame of reference. | |
| Conceptually, each pixel is painted according to the surface normal vector in the frame of reference, where <code>X</code> axis | |
| points right, <code>Y</code> axis points up, and <code>Z</code> axis points at the viewer. | |
| Below is the visualized prediction:`,kn,V,Ps='<div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_einstein_lcm_normals.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Predicted surface normals visualization</figcaption></div>',$n,Ge,Ds=`In this example, the nose tip almost certainly has a point on the surface, in which the surface normal vector points | |
| straight at the viewer, meaning that its coordinates are <code>[0, 0, 1]</code>. | |
| This vector maps to the RGB <code>[128, 128, 255]</code>, which corresponds to the violet-blue color. | |
| Similarly, a surface normal on the cheek in the right part of the image has a large <code>X</code> component, which increases the | |
| red hue. | |
| Points on the shoulders pointing up with a large <code>Y</code> promote green color.`,zn,We,Rn,Ne,Fs=`Marigold provides two models for Intrinsic Image Decomposition (IID): “Appearance” and “Lighting”. | |
| Each model produces Albedo maps, derived from InteriorVerse and Hypersim annotations, respectively.`,Vn,Ce,Qs="<li>The “Appearance” model also estimates Material properties: Roughness and Metallicity.</li> <li>The “Lighting” model generates Diffuse Shading and Non-diffuse Residual.</li>",Xn,Be,Ks="Here is the sample code saving predictions made by the “Appearance” model:",qn,ke,En,$e,Os="Another example demonstrating the predictions made by the “Lighting” model:",Hn,ze,Ln,Re,eo=`Both models share the same pipeline while supporting different decomposition types. | |
| The exact decomposition parameterization (e.g., sRGB vs. linear space) is stored in the | |
| <code>pipe.target_properties</code> dictionary, which is passed into the | |
| <a href="/docs/diffusers/pr_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_intrinsics">visualize_intrinsics()</a> function.`,Yn,Ve,to=`Below are some examples showcasing the predicted decomposition outputs. | |
| All modalities can be inspected in the | |
| <a href="https://huggingface.co/spaces/prs-eth/marigold-iid" rel="nofollow">Intrinsic Image Decomposition</a> Space.`,Sn,K,no='<div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/8c7986eaaab5eb9604eb88336311f46a7b0ff5ab/marigold/marigold_einstein_albedo.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Predicted albedo ("Appearance" model)</figcaption></div> <div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/8c7986eaaab5eb9604eb88336311f46a7b0ff5ab/marigold/marigold_einstein_diffuse.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Predicted diffuse shading ("Lighting" model)</figcaption></div>',An,Xe,Pn,qe,io=`The above quick start snippets are already optimized for quality and speed, loading the checkpoint, utilizing the | |
| <code>fp16</code> variant of weights and computation, and performing the default number (4) of denoising diffusion steps. | |
| The first step to accelerate inference, at the expense of prediction quality, is to reduce the denoising diffusion | |
| steps to the minimum:`,Dn,Ee,Fn,He,so=`With this change, the <code>pipe</code> call completes in 280ms on RTX 3090 GPU. | |
| Internally, the input image is first encoded using the Stable Diffusion VAE encoder, followed by a single denoising | |
| step performed by the U-Net. | |
| Finally, the prediction latent is decoded with the VAE decoder into pixel space. | |
| In this setup, two out of three module calls are dedicated to converting between the pixel and latent spaces of the LDM. | |
| Since Marigold’s latent space is compatible with Stable Diffusion 2.0, inference can be accelerated by more than 3x, | |
| reducing the call time to 85ms on an RTX 3090, by using a <a href="../models/autoencoder_tiny">lightweight replacement of the SD VAE</a>. | |
| Note that using a lightweight VAE may slightly reduce the visual quality of the predictions.`,Qn,Le,Kn,Ye,oo=`So far, we have optimized the number of diffusion steps and model components. Self-attention operations account for a | |
| significant portion of computations. | |
| Speeding them up can be achieved by using a more efficient attention processor:`,On,Se,ei,Ae,ao=`Finally, as suggested in <a href="../../optimization/fp16#torchcompile">Optimizations</a>, enabling <code>torch.compile</code> can further enhance performance depending on | |
| the target hardware. | |
| However, compilation incurs a significant overhead during the first pipeline invocation, making it beneficial only when | |
| the same pipeline instance is called repeatedly, such as within a loop.`,ti,Pe,ni,De,ii,Fe,lo=`Marigold pipelines have a built-in ensembling mechanism combining multiple predictions from different random latents. | |
| This is a brute-force way of improving the precision of predictions, capitalizing on the generative nature of diffusion. | |
| The ensembling path is activated automatically when the <code>ensemble_size</code> argument is set greater or equal than <code>3</code>. | |
| When aiming for maximum precision, it makes sense to adjust <code>num_inference_steps</code> simultaneously with <code>ensemble_size</code>. | |
| The recommended values vary across checkpoints but primarily depend on the scheduler type. | |
| The effect of ensembling is particularly well-seen with surface normals:`,si,Qe,oi,O,ro='<div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_einstein_lcm_normals.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Surface normals, no ensembling</figcaption></div> <div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_einstein_normals.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Surface normals, with ensembling</figcaption></div>',ai,Ke,co=`As can be seen, all areas with fine-grained structurers, such as hair, got more conservative and on average more | |
| correct predictions. | |
| Such a result is more suitable for precision-sensitive downstream tasks, such as 3D reconstruction.`,li,Oe,ri,et,po=`Due to Marigold’s generative nature, each prediction is unique and defined by the random noise sampled for the latent | |
| initialization. | |
| This becomes an obvious drawback compared to traditional end-to-end dense regression networks, as exemplified in the | |
| following videos:`,di,ee,mo='<div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_obama.gif"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Input video</figcaption></div> <div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_obama_depth_independent.gif"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Marigold Depth applied to input video frames independently</figcaption></div>',ci,tt,uo=`To address this issue, it is possible to pass <code>latents</code> argument to the pipelines, which defines the starting point of | |
| diffusion. | |
| Empirically, we found that a convex combination of the very same starting point noise latent and the latent | |
| corresponding to the previous frame prediction give sufficiently smooth results, as implemented in the snippet below:`,pi,nt,mi,it,ho=`Here, the diffusion process starts from the given computed latent. | |
| The pipeline sets <code>output_latent=True</code> to access <code>out.latent</code> and computes its contribution to the next frame’s latent | |
| initialization. | |
| The result is much more stable now:`,ui,te,go='<div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_obama_depth_independent.gif"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Marigold Depth applied to input video frames independently</figcaption></div> <div style="flex: 1 1 50%; max-width: 50%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_obama_depth_consistent.gif"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Marigold Depth with forced latents initialization</figcaption></div>',hi,st,gi,ot,fo=`A very common application for depth prediction with diffusion models comes in conjunction with ControlNet. | |
| Depth crispness plays a crucial role in obtaining high-quality results from ControlNet. | |
| As seen in comparisons with other methods above, Marigold excels at that task. | |
| The snippet below demonstrates how to load an image, compute depth, and pass it into ControlNet in a compatible format:`,fi,at,Mi,ne,Mo='<div style="flex: 1 1 33%; max-width: 33%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/controlnet_depth_source.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Input image</figcaption></div> <div style="flex: 1 1 33%; max-width: 33%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/motorcycle_controlnet_depth.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Depth in the format compatible with ControlNet</figcaption></div> <div style="flex: 1 1 33%; max-width: 33%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/motorcycle_controlnet_out.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">ControlNet generation, conditioned on depth and prompt: "high quality photo of a sports bike, city"</figcaption></div>',yi,lt,bi,rt,yo=`To evaluate Marigold quantitatively in standard leaderboards and benchmarks (such as NYU, KITTI, and other datasets), | |
| follow the evaluation protocol outlined in the paper: load the full precision fp32 model and use appropriate values | |
| for <code>num_inference_steps</code> and <code>ensemble_size</code>. | |
| Optionally seed randomness to ensure reproducibility. | |
| Maximizing <code>batch_size</code> will deliver maximum device utilization.`,_i,dt,Ti,ct,wi,pt,bo=`The ensembling mechanism built into Marigold pipelines combines multiple predictions obtained from different random | |
| latents. | |
| As a side effect, it can be used to quantify epistemic (model) uncertainty; simply specify <code>ensemble_size</code> greater | |
| or equal than 3 and set <code>output_uncertainty=True</code>. | |
| The resulting uncertainty will be available in the <code>uncertainty</code> field of the output. | |
| It can be visualized as follows:`,vi,mt,Ji,ie,_o='<div style="flex: 1 1 33%; max-width: 33%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_einstein_depth_uncertainty.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Depth uncertainty</figcaption></div> <div style="flex: 1 1 33%; max-width: 33%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/marigold/marigold_einstein_normals_uncertainty.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Surface normals uncertainty</figcaption></div> <div style="flex: 1 1 33%; max-width: 33%;"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/4f83035d84a24e5ec44fdda129b1d51eba12ce04/marigold/marigold_einstein_albedo_uncertainty.png"/> <figcaption class="mt-1 text-center text-sm text-gray-500">Albedo uncertainty</figcaption></div>',ji,ut,To=`The interpretation of uncertainty is easy: higher values (white) correspond to pixels, where the model struggles to | |
| make consistent predictions.`,Zi,ht,wo=`<li>The depth model exhibits the most uncertainty around discontinuities, where object depth changes abruptly.</li> <li>The surface normals model is least confident in fine-grained structures like hair and in dark regions such as the | |
| collar area.</li> <li>Albedo uncertainty is represented as an RGB image, as it captures uncertainty independently for each color channel, | |
| unlike depth and surface normals. It is also higher in shaded regions and at discontinuities.</li>`,Ii,gt,xi,I,ft,ts,Vt,vo='Pipeline for monocular depth estimation using the Marigold method: <a href="https://marigoldmonodepth.github.io" rel="nofollow">https://marigoldmonodepth.github.io</a>.',ns,Xt,Jo=`This model inherits from <a href="/docs/diffusers/pr_13098/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.)`,is,X,Mt,ss,qt,jo="Function invoked when calling the pipeline.",os,se,Ui,H,yt,as,Et,Zo="Output class for Marigold monocular depth prediction pipeline.",Gi,C,bt,ls,Ht,Io="Visualizes depth maps, such as predictions of the <code>MarigoldDepthPipeline</code>.",rs,Lt,xo="Returns: <code>list[PIL.Image.Image]</code> with depth maps visualization.",Wi,_t,Ni,x,Tt,ds,Yt,Uo='Pipeline for monocular normals estimation using the Marigold method: <a href="https://marigoldmonodepth.github.io" rel="nofollow">https://marigoldmonodepth.github.io</a>.',cs,St,Go=`This model inherits from <a href="/docs/diffusers/pr_13098/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.)`,ps,q,wt,ms,At,Wo="Function invoked when calling the pipeline.",us,oe,Ci,L,vt,hs,Pt,No="Output class for Marigold monocular normals prediction pipeline.",Bi,B,Jt,gs,Dt,Co="Visualizes surface normals, such as predictions of the <code>MarigoldNormalsPipeline</code>.",fs,Ft,Bo="Returns: <code>list[PIL.Image.Image]</code> with surface normals visualization.",ki,jt,$i,U,Zt,Ms,Qt,ko=`Pipeline for Intrinsic Image Decomposition (IID) using the Marigold method: | |
| <a href="https://marigoldcomputervision.github.io" rel="nofollow">https://marigoldcomputervision.github.io</a>.`,ys,Kt,$o=`This model inherits from <a href="/docs/diffusers/pr_13098/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.)`,bs,G,It,_s,Ot,zo="Function invoked when calling the pipeline.",Ts,ae,ws,le,zi,Y,xt,vs,en,Ro="Output class for Marigold Intrinsic Image Decomposition pipeline.",Ri,k,Ut,Js,tn,Vo="Visualizes intrinsic image decomposition, such as predictions of the <code>MarigoldIntrinsicsPipeline</code>.",js,nn,Xo="Returns: <code>list[dict[str, PIL.Image.Image]]</code> with intrinsic image decomposition visualization.",Vi,Gt,Xi,dn,qi;return T=new Qo({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),w=new Z({props:{title:"Marigold Computer Vision",local:"marigold-computer-vision",headingTag:"h1"}}),ge=new Z({props:{title:"Available Pipelines",local:"available-pipelines",headingTag:"h2"}}),ye=new Z({props:{title:"Available Checkpoints",local:"available-checkpoints",headingTag:"h2"}}),we=new Z({props:{title:"Depth Prediction",local:"depth-prediction",headingTag:"h2"}}),Je=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQSUwQWRlcHRoJTIwJTNEJTIwcGlwZShpbWFnZSklMEElMEF2aXMlMjAlM0QlMjBwaXBlLmltYWdlX3Byb2Nlc3Nvci52aXN1YWxpemVfZGVwdGgoZGVwdGgucHJlZGljdGlvbiklMEF2aXMlNUIwJTVELnNhdmUoJTIyZWluc3RlaW5fZGVwdGgucG5nJTIyKSUwQSUwQWRlcHRoXzE2Yml0JTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IuZXhwb3J0X2RlcHRoX3RvXzE2Yml0X3BuZyhkZXB0aC5wcmVkaWN0aW9uKSUwQWRlcHRoXzE2Yml0JTVCMCU1RC5zYXZlKCUyMmVpbnN0ZWluX2RlcHRoXzE2Yml0LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-keyword">import</span> torch | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| <span class="hljs-string">"prs-eth/marigold-depth-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| depth = pipe(image) | |
| vis = pipe.image_processor.visualize_depth(depth.prediction) | |
| vis[<span class="hljs-number">0</span>].save(<span class="hljs-string">"einstein_depth.png"</span>) | |
| depth_16bit = pipe.image_processor.export_depth_to_16bit_png(depth.prediction) | |
| depth_16bit[<span class="hljs-number">0</span>].save(<span class="hljs-string">"einstein_depth_16bit.png"</span>)`,lang:"python",wrap:!1}}),Ze=new Z({props:{title:"Surface Normals Estimation",local:"surface-normals-estimation",headingTag:"h2"}}),xe=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkTm9ybWFsc1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtbm9ybWFscy12MS0xJTIyJTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBkaWZmdXNlcnMudXRpbHMubG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRm1hcmlnb2xkbW9ub2RlcHRoLmdpdGh1Yi5pbyUyRmltYWdlcyUyRmVpbnN0ZWluLmpwZyUyMiklMEElMEFub3JtYWxzJTIwJTNEJTIwcGlwZShpbWFnZSklMEElMEF2aXMlMjAlM0QlMjBwaXBlLmltYWdlX3Byb2Nlc3Nvci52aXN1YWxpemVfbm9ybWFscyhub3JtYWxzLnByZWRpY3Rpb24pJTBBdmlzJTVCMCU1RC5zYXZlKCUyMmVpbnN0ZWluX25vcm1hbHMucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-keyword">import</span> torch | |
| pipe = diffusers.MarigoldNormalsPipeline.from_pretrained( | |
| <span class="hljs-string">"prs-eth/marigold-normals-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| normals = pipe(image) | |
| vis = pipe.image_processor.visualize_normals(normals.prediction) | |
| vis[<span class="hljs-number">0</span>].save(<span class="hljs-string">"einstein_normals.png"</span>)`,lang:"python",wrap:!1}}),We=new Z({props:{title:"Intrinsic Image Decomposition",local:"intrinsic-image-decomposition",headingTag:"h2"}}),ke=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkSW50cmluc2ljc1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtaWlkLWFwcGVhcmFuY2UtdjEtMSUyMiUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQWltYWdlJTIwJTNEJTIwZGlmZnVzZXJzLnV0aWxzLmxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZtYXJpZ29sZG1vbm9kZXB0aC5naXRodWIuaW8lMkZpbWFnZXMlMkZlaW5zdGVpbi5qcGclMjIpJTBBJTBBaW50cmluc2ljcyUyMCUzRCUyMHBpcGUoaW1hZ2UpJTBBJTBBdmlzJTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IudmlzdWFsaXplX2ludHJpbnNpY3MoaW50cmluc2ljcy5wcmVkaWN0aW9uJTJDJTIwcGlwZS50YXJnZXRfcHJvcGVydGllcyklMEF2aXMlNUIwJTVEJTVCJTIyYWxiZWRvJTIyJTVELnNhdmUoJTIyZWluc3RlaW5fYWxiZWRvLnBuZyUyMiklMEF2aXMlNUIwJTVEJTVCJTIycm91Z2huZXNzJTIyJTVELnNhdmUoJTIyZWluc3RlaW5fcm91Z2huZXNzLnBuZyUyMiklMEF2aXMlNUIwJTVEJTVCJTIybWV0YWxsaWNpdHklMjIlNUQuc2F2ZSglMjJlaW5zdGVpbl9tZXRhbGxpY2l0eS5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-keyword">import</span> torch | |
| pipe = diffusers.MarigoldIntrinsicsPipeline.from_pretrained( | |
| <span class="hljs-string">"prs-eth/marigold-iid-appearance-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| intrinsics = pipe(image) | |
| vis = pipe.image_processor.visualize_intrinsics(intrinsics.prediction, pipe.target_properties) | |
| vis[<span class="hljs-number">0</span>][<span class="hljs-string">"albedo"</span>].save(<span class="hljs-string">"einstein_albedo.png"</span>) | |
| vis[<span class="hljs-number">0</span>][<span class="hljs-string">"roughness"</span>].save(<span class="hljs-string">"einstein_roughness.png"</span>) | |
| vis[<span class="hljs-number">0</span>][<span class="hljs-string">"metallicity"</span>].save(<span class="hljs-string">"einstein_metallicity.png"</span>)`,lang:"python",wrap:!1}}),ze=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkSW50cmluc2ljc1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtaWlkLWxpZ2h0aW5nLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQSUwQWludHJpbnNpY3MlMjAlM0QlMjBwaXBlKGltYWdlKSUwQSUwQXZpcyUyMCUzRCUyMHBpcGUuaW1hZ2VfcHJvY2Vzc29yLnZpc3VhbGl6ZV9pbnRyaW5zaWNzKGludHJpbnNpY3MucHJlZGljdGlvbiUyQyUyMHBpcGUudGFyZ2V0X3Byb3BlcnRpZXMpJTBBdmlzJTVCMCU1RCU1QiUyMmFsYmVkbyUyMiU1RC5zYXZlKCUyMmVpbnN0ZWluX2FsYmVkby5wbmclMjIpJTBBdmlzJTVCMCU1RCU1QiUyMnNoYWRpbmclMjIlNUQuc2F2ZSglMjJlaW5zdGVpbl9zaGFkaW5nLnBuZyUyMiklMEF2aXMlNUIwJTVEJTVCJTIycmVzaWR1YWwlMjIlNUQuc2F2ZSglMjJlaW5zdGVpbl9yZXNpZHVhbC5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-keyword">import</span> torch | |
| pipe = diffusers.MarigoldIntrinsicsPipeline.from_pretrained( | |
| <span class="hljs-string">"prs-eth/marigold-iid-lighting-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| intrinsics = pipe(image) | |
| vis = pipe.image_processor.visualize_intrinsics(intrinsics.prediction, pipe.target_properties) | |
| vis[<span class="hljs-number">0</span>][<span class="hljs-string">"albedo"</span>].save(<span class="hljs-string">"einstein_albedo.png"</span>) | |
| vis[<span class="hljs-number">0</span>][<span class="hljs-string">"shading"</span>].save(<span class="hljs-string">"einstein_shading.png"</span>) | |
| vis[<span class="hljs-number">0</span>][<span class="hljs-string">"residual"</span>].save(<span class="hljs-string">"einstein_residual.png"</span>)`,lang:"python",wrap:!1}}),Xe=new Z({props:{title:"Speeding up inference",local:"speeding-up-inference",headingTag:"h2"}}),Ee=new j({props:{code:"JTIwJTIwaW1wb3J0JTIwZGlmZnVzZXJzJTBBJTIwJTIwaW1wb3J0JTIwdG9yY2glMEElMEElMjAlMjBwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSUyMCUyMCkudG8oJTIyY3VkYSUyMiklMEElMEElMjAlMjBpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQSUyMCUyMCUwQS0lMjBkZXB0aCUyMCUzRCUyMHBpcGUoaW1hZ2UpJTBBJTJCJTIwZGVwdGglMjAlM0QlMjBwaXBlKGltYWdlJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDEp",highlighted:` import diffusers | |
| import torch | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| "prs-eth/marigold-depth-v1-1", variant="fp16", torch_dtype=torch.float16 | |
| ).to("cuda") | |
| image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg") | |
| <span class="hljs-deletion">- depth = pipe(image)</span> | |
| <span class="hljs-addition">+ depth = pipe(image, num_inference_steps=1)</span>`,lang:"diff",wrap:!1}}),Le=new j({props:{code:"JTIwJTIwaW1wb3J0JTIwZGlmZnVzZXJzJTBBJTIwJTIwaW1wb3J0JTIwdG9yY2glMEElMEElMjAlMjBwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSUyMCUyMCkudG8oJTIyY3VkYSUyMiklMEElMEElMkIlMjBwaXBlLnZhZSUyMCUzRCUyMGRpZmZ1c2Vycy5BdXRvZW5jb2RlclRpbnkuZnJvbV9wcmV0cmFpbmVkKCUwQSUyQiUyMCUyMCUyMCUyMCUyMCUyMm1hZGVieW9sbGluJTJGdGFlc2QlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEElMkIlMjApLmN1ZGEoKSUwQSUwQSUyMCUyMGltYWdlJTIwJTNEJTIwZGlmZnVzZXJzLnV0aWxzLmxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZtYXJpZ29sZG1vbm9kZXB0aC5naXRodWIuaW8lMkZpbWFnZXMlMkZlaW5zdGVpbi5qcGclMjIpJTBBJTBBJTIwJTIwZGVwdGglMjAlM0QlMjBwaXBlKGltYWdlJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDEp",highlighted:` import diffusers | |
| import torch | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| "prs-eth/marigold-depth-v1-1", variant="fp16", torch_dtype=torch.float16 | |
| ).to("cuda") | |
| <span class="hljs-addition">+ pipe.vae = diffusers.AutoencoderTiny.from_pretrained(</span> | |
| <span class="hljs-addition">+ "madebyollin/taesd", torch_dtype=torch.float16</span> | |
| <span class="hljs-addition">+ ).cuda()</span> | |
| image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg") | |
| depth = pipe(image, num_inference_steps=1)`,lang:"diff",wrap:!1}}),Se=new j({props:{code:"JTIwJTIwaW1wb3J0JTIwZGlmZnVzZXJzJTBBJTIwJTIwaW1wb3J0JTIwdG9yY2glMEElMkIlMjBmcm9tJTIwZGlmZnVzZXJzLm1vZGVscy5hdHRlbnRpb25fcHJvY2Vzc29yJTIwaW1wb3J0JTIwQXR0blByb2Nlc3NvcjJfMCUwQSUwQSUyMCUyMHBpcGUlMjAlM0QlMjBkaWZmdXNlcnMuTWFyaWdvbGREZXB0aFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtZGVwdGgtdjEtMSUyMiUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBJTIwJTIwKS50byglMjJjdWRhJTIyKSUwQSUwQSUyQiUyMHBpcGUudmFlLnNldF9hdHRuX3Byb2Nlc3NvcihBdHRuUHJvY2Vzc29yMl8wKCkpJTIwJTBBJTJCJTIwcGlwZS51bmV0LnNldF9hdHRuX3Byb2Nlc3NvcihBdHRuUHJvY2Vzc29yMl8wKCkpJTBBJTBBJTIwJTIwaW1hZ2UlMjAlM0QlMjBkaWZmdXNlcnMudXRpbHMubG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRm1hcmlnb2xkbW9ub2RlcHRoLmdpdGh1Yi5pbyUyRmltYWdlcyUyRmVpbnN0ZWluLmpwZyUyMiklMEElMEElMjAlMjBkZXB0aCUyMCUzRCUyMHBpcGUoaW1hZ2UlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMSk=",highlighted:` import diffusers | |
| import torch | |
| <span class="hljs-addition">+ from diffusers.models.attention_processor import AttnProcessor2_0</span> | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| "prs-eth/marigold-depth-v1-1", variant="fp16", torch_dtype=torch.float16 | |
| ).to("cuda") | |
| <span class="hljs-addition">+ pipe.vae.set_attn_processor(AttnProcessor2_0()) </span> | |
| <span class="hljs-addition">+ pipe.unet.set_attn_processor(AttnProcessor2_0())</span> | |
| image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg") | |
| depth = pipe(image, num_inference_steps=1)`,lang:"diff",wrap:!1}}),Pe=new j({props:{code:"JTIwJTIwaW1wb3J0JTIwZGlmZnVzZXJzJTBBJTIwJTIwaW1wb3J0JTIwdG9yY2glMEElMjAlMjBmcm9tJTIwZGlmZnVzZXJzLm1vZGVscy5hdHRlbnRpb25fcHJvY2Vzc29yJTIwaW1wb3J0JTIwQXR0blByb2Nlc3NvcjJfMCUwQSUwQSUyMCUyMHBpcGUlMjAlM0QlMjBkaWZmdXNlcnMuTWFyaWdvbGREZXB0aFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjJwcnMtZXRoJTJGbWFyaWdvbGQtZGVwdGgtdjEtMSUyMiUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBJTIwJTIwKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMCUyMHBpcGUudmFlLnNldF9hdHRuX3Byb2Nlc3NvcihBdHRuUHJvY2Vzc29yMl8wKCkpJTIwJTBBJTIwJTIwcGlwZS51bmV0LnNldF9hdHRuX3Byb2Nlc3NvcihBdHRuUHJvY2Vzc29yMl8wKCkpJTBBJTBBJTJCJTIwcGlwZS52YWUlMjAlM0QlMjB0b3JjaC5jb21waWxlKHBpcGUudmFlJTJDJTIwbW9kZSUzRCUyMnJlZHVjZS1vdmVyaGVhZCUyMiUyQyUyMGZ1bGxncmFwaCUzRFRydWUpJTBBJTJCJTIwcGlwZS51bmV0JTIwJTNEJTIwdG9yY2guY29tcGlsZShwaXBlLnVuZXQlMkMlMjBtb2RlJTNEJTIycmVkdWNlLW92ZXJoZWFkJTIyJTJDJTIwZnVsbGdyYXBoJTNEVHJ1ZSklMEElMEElMjAlMjBpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQSUwQSUyMCUyMGRlcHRoJTIwJTNEJTIwcGlwZShpbWFnZSUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QxKQ==",highlighted:` import diffusers | |
| import torch | |
| from diffusers.models.attention_processor import AttnProcessor2_0 | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| "prs-eth/marigold-depth-v1-1", variant="fp16", torch_dtype=torch.float16 | |
| ).to("cuda") | |
| pipe.vae.set_attn_processor(AttnProcessor2_0()) | |
| pipe.unet.set_attn_processor(AttnProcessor2_0()) | |
| <span class="hljs-addition">+ pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=True)</span> | |
| <span class="hljs-addition">+ pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)</span> | |
| image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg") | |
| depth = pipe(image, num_inference_steps=1)`,lang:"diff",wrap:!1}}),De=new Z({props:{title:"Maximizing Precision and Ensembling",local:"maximizing-precision-and-ensembling",headingTag:"h2"}}),Qe=new j({props:{code:"JTIwJTIwaW1wb3J0JTIwZGlmZnVzZXJzJTBBJTBBJTIwJTIwcGlwZSUyMCUzRCUyMGRpZmZ1c2Vycy5NYXJpZ29sZE5vcm1hbHNQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycHJzLWV0aCUyRm1hcmlnb2xkLW5vcm1hbHMtdjEtMSUyMikudG8oJTIyY3VkYSUyMiklMEElMEElMjAlMjBpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQSUwQS0lMjBkZXB0aCUyMCUzRCUyMHBpcGUoaW1hZ2UpJTBBJTJCJTIwZGVwdGglMjAlM0QlMjBwaXBlKGltYWdlJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDEwJTJDJTIwZW5zZW1ibGVfc2l6ZSUzRDUpJTBBJTBBJTIwJTIwdmlzJTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IudmlzdWFsaXplX25vcm1hbHMoZGVwdGgucHJlZGljdGlvbiklMEElMjAlMjB2aXMlNUIwJTVELnNhdmUoJTIyZWluc3RlaW5fbm9ybWFscy5wbmclMjIp",highlighted:` import diffusers | |
| pipe = diffusers.MarigoldNormalsPipeline.from_pretrained("prs-eth/marigold-normals-v1-1").to("cuda") | |
| image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg") | |
| <span class="hljs-deletion">- depth = pipe(image)</span> | |
| <span class="hljs-addition">+ depth = pipe(image, num_inference_steps=10, ensemble_size=5)</span> | |
| vis = pipe.image_processor.visualize_normals(depth.prediction) | |
| vis[0].save("einstein_normals.png")`,lang:"diff",wrap:!1}}),Oe=new Z({props:{title:"Frame-by-frame Video Processing with Temporal Consistency",local:"frame-by-frame-video-processing-with-temporal-consistency",headingTag:"h2"}}),nt=new j({props:{code:"aW1wb3J0JTIwaW1hZ2VpbyUwQWltcG9ydCUyMGRpZmZ1c2VycyUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRpZmZ1c2Vycy5tb2RlbHMuYXR0ZW50aW9uX3Byb2Nlc3NvciUyMGltcG9ydCUyMEF0dG5Qcm9jZXNzb3IyXzAlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwdHFkbSUyMGltcG9ydCUyMHRxZG0lMEElMEFkZXZpY2UlMjAlM0QlMjAlMjJjdWRhJTIyJTBBcGF0aF9pbiUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZzcGFjZXMlMkZwcnMtZXRoJTJGbWFyaWdvbGQtbGNtJTJGcmVzb2x2ZSUyRmM3YWRiNTQyNzk0N2QyNjgwOTQ0Zjg5OGNkOTFkMzg2YmYwZDQ5MjQlMkZmaWxlcyUyRnZpZGVvJTJGb2JhbWEubXA0JTIyJTBBcGF0aF9vdXQlMjAlM0QlMjAlMjJvYmFtYV9kZXB0aC5naWYlMjIlMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oZGV2aWNlKSUwQXBpcGUudmFlJTIwJTNEJTIwZGlmZnVzZXJzLkF1dG9lbmNvZGVyVGlueS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIybWFkZWJ5b2xsaW4lMkZ0YWVzZCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oZGV2aWNlKSUwQXBpcGUudW5ldC5zZXRfYXR0bl9wcm9jZXNzb3IoQXR0blByb2Nlc3NvcjJfMCgpKSUwQXBpcGUudmFlJTIwJTNEJTIwdG9yY2guY29tcGlsZShwaXBlLnZhZSUyQyUyMG1vZGUlM0QlMjJyZWR1Y2Utb3ZlcmhlYWQlMjIlMkMlMjBmdWxsZ3JhcGglM0RUcnVlKSUwQXBpcGUudW5ldCUyMCUzRCUyMHRvcmNoLmNvbXBpbGUocGlwZS51bmV0JTJDJTIwbW9kZSUzRCUyMnJlZHVjZS1vdmVyaGVhZCUyMiUyQyUyMGZ1bGxncmFwaCUzRFRydWUpJTBBcGlwZS5zZXRfcHJvZ3Jlc3NfYmFyX2NvbmZpZyhkaXNhYmxlJTNEVHJ1ZSklMEElMEF3aXRoJTIwaW1hZ2Vpby5nZXRfcmVhZGVyKHBhdGhfaW4pJTIwYXMlMjByZWFkZXIlM0ElMEElMjAlMjAlMjAlMjBzaXplJTIwJTNEJTIwcmVhZGVyLmdldF9tZXRhX2RhdGEoKSU1QidzaXplJyU1RCUwQSUyMCUyMCUyMCUyMGxhc3RfZnJhbWVfbGF0ZW50JTIwJTNEJTIwTm9uZSUwQSUyMCUyMCUyMCUyMGxhdGVudF9jb21tb24lMjAlM0QlMjB0b3JjaC5yYW5kbiglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAoMSUyQyUyMDQlMkMlMjA3NjglMjAqJTIwc2l6ZSU1QjElNUQlMjAlMkYlMkYlMjAoOCUyMColMjBtYXgoc2l6ZSkpJTJDJTIwNzY4JTIwKiUyMHNpemUlNUIwJTVEJTIwJTJGJTJGJTIwKDglMjAqJTIwbWF4KHNpemUpKSklMEElMjAlMjAlMjAlMjApLnRvKGRldmljZSUzRGRldmljZSUyQyUyMGR0eXBlJTNEdG9yY2guZmxvYXQxNiklMEElMEElMjAlMjAlMjAlMjBvdXQlMjAlM0QlMjAlNUIlNUQlMEElMjAlMjAlMjAlMjBmb3IlMjBmcmFtZV9pZCUyQyUyMGZyYW1lJTIwaW4lMjB0cWRtKGVudW1lcmF0ZShyZWFkZXIpJTJDJTIwZGVzYyUzRCUyMlByb2Nlc3NpbmclMjBWaWRlbyUyMiklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBmcmFtZSUyMCUzRCUyMEltYWdlLmZyb21hcnJheShmcmFtZSklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsYXRlbnRzJTIwJTNEJTIwbGF0ZW50X2NvbW1vbiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGlmJTIwbGFzdF9mcmFtZV9sYXRlbnQlMjBpcyUyMG5vdCUyME5vbmUlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsYXRlbnRzJTIwJTNEJTIwMC45JTIwKiUyMGxhdGVudHMlMjAlMkIlMjAwLjElMjAqJTIwbGFzdF9mcmFtZV9sYXRlbnQlMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBkZXB0aCUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZnJhbWUlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG1hdGNoX2lucHV0X3Jlc29sdXRpb24lM0RGYWxzZSUyQyUyMCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxhdGVudHMlM0RsYXRlbnRzJTJDJTIwJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwb3V0cHV0X2xhdGVudCUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjApJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbGFzdF9mcmFtZV9sYXRlbnQlMjAlM0QlMjBkZXB0aC5sYXRlbnQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBvdXQuYXBwZW5kKHBpcGUuaW1hZ2VfcHJvY2Vzc29yLnZpc3VhbGl6ZV9kZXB0aChkZXB0aC5wcmVkaWN0aW9uKSU1QjAlNUQpJTBBJTBBJTIwJTIwJTIwJTIwZGlmZnVzZXJzLnV0aWxzLmV4cG9ydF90b19naWYob3V0JTJDJTIwcGF0aF9vdXQlMkMlMjBmcHMlM0RyZWFkZXIuZ2V0X21ldGFfZGF0YSgpJTVCJ2ZwcyclNUQp",highlighted:`<span class="hljs-keyword">import</span> imageio | |
| <span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers.models.attention_processor <span class="hljs-keyword">import</span> AttnProcessor2_0 | |
| <span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image | |
| <span class="hljs-keyword">from</span> tqdm <span class="hljs-keyword">import</span> tqdm | |
| device = <span class="hljs-string">"cuda"</span> | |
| path_in = <span class="hljs-string">"https://huggingface.co/spaces/prs-eth/marigold-lcm/resolve/c7adb5427947d2680944f898cd91d386bf0d4924/files/video/obama.mp4"</span> | |
| path_out = <span class="hljs-string">"obama_depth.gif"</span> | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| <span class="hljs-string">"prs-eth/marigold-depth-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| ).to(device) | |
| pipe.vae = diffusers.AutoencoderTiny.from_pretrained( | |
| <span class="hljs-string">"madebyollin/taesd"</span>, torch_dtype=torch.float16 | |
| ).to(device) | |
| pipe.unet.set_attn_processor(AttnProcessor2_0()) | |
| pipe.vae = torch.<span class="hljs-built_in">compile</span>(pipe.vae, mode=<span class="hljs-string">"reduce-overhead"</span>, fullgraph=<span class="hljs-literal">True</span>) | |
| pipe.unet = torch.<span class="hljs-built_in">compile</span>(pipe.unet, mode=<span class="hljs-string">"reduce-overhead"</span>, fullgraph=<span class="hljs-literal">True</span>) | |
| pipe.set_progress_bar_config(disable=<span class="hljs-literal">True</span>) | |
| <span class="hljs-keyword">with</span> imageio.get_reader(path_in) <span class="hljs-keyword">as</span> reader: | |
| size = reader.get_meta_data()[<span class="hljs-string">'size'</span>] | |
| last_frame_latent = <span class="hljs-literal">None</span> | |
| latent_common = torch.randn( | |
| (<span class="hljs-number">1</span>, <span class="hljs-number">4</span>, <span class="hljs-number">768</span> * size[<span class="hljs-number">1</span>] // (<span class="hljs-number">8</span> * <span class="hljs-built_in">max</span>(size)), <span class="hljs-number">768</span> * size[<span class="hljs-number">0</span>] // (<span class="hljs-number">8</span> * <span class="hljs-built_in">max</span>(size))) | |
| ).to(device=device, dtype=torch.float16) | |
| out = [] | |
| <span class="hljs-keyword">for</span> frame_id, frame <span class="hljs-keyword">in</span> tqdm(<span class="hljs-built_in">enumerate</span>(reader), desc=<span class="hljs-string">"Processing Video"</span>): | |
| frame = Image.fromarray(frame) | |
| latents = latent_common | |
| <span class="hljs-keyword">if</span> last_frame_latent <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>: | |
| latents = <span class="hljs-number">0.9</span> * latents + <span class="hljs-number">0.1</span> * last_frame_latent | |
| depth = pipe( | |
| frame, | |
| num_inference_steps=<span class="hljs-number">1</span>, | |
| match_input_resolution=<span class="hljs-literal">False</span>, | |
| latents=latents, | |
| output_latent=<span class="hljs-literal">True</span>, | |
| ) | |
| last_frame_latent = depth.latent | |
| out.append(pipe.image_processor.visualize_depth(depth.prediction)[<span class="hljs-number">0</span>]) | |
| diffusers.utils.export_to_gif(out, path_out, fps=reader.get_meta_data()[<span class="hljs-string">'fps'</span>])`,lang:"python",wrap:!1}}),st=new Z({props:{title:"Marigold for ControlNet",local:"marigold-for-controlnet",headingTag:"h2"}}),at=new j({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBkaWZmdXNlcnMlMEElMEFkZXZpY2UlMjAlM0QlMjAlMjJjdWRhJTIyJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRGRldmljZSkubWFudWFsX3NlZWQoMjAyNCklMEFpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdGlvbi1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmRpZmZ1c2VycyUyRmNvbnRyb2xuZXRfZGVwdGhfc291cmNlLnBuZyUyMiUwQSklMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLXYxLTElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUwQSkudG8oZGV2aWNlKSUwQSUwQWRlcHRoX2ltYWdlJTIwJTNEJTIwcGlwZShpbWFnZSUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvcikucHJlZGljdGlvbiUwQWRlcHRoX2ltYWdlJTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IudmlzdWFsaXplX2RlcHRoKGRlcHRoX2ltYWdlJTJDJTIwY29sb3JfbWFwJTNEJTIyYmluYXJ5JTIyKSUwQWRlcHRoX2ltYWdlJTVCMCU1RC5zYXZlKCUyMm1vdG9yY3ljbGVfY29udHJvbG5ldF9kZXB0aC5wbmclMjIpJTBBJTBBY29udHJvbG5ldCUyMCUzRCUyMGRpZmZ1c2Vycy5Db250cm9sTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmRpZmZ1c2VycyUyRmNvbnRyb2xuZXQtZGVwdGgtc2R4bC0xLjAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUwQSkudG8oZGV2aWNlKSUwQXBpcGUlMjAlM0QlMjBkaWZmdXNlcnMuU3RhYmxlRGlmZnVzaW9uWExDb250cm9sTmV0UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMlNHMTYxMjIyJTJGUmVhbFZpc1hMX1Y0LjAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMGNvbnRyb2xuZXQlM0Rjb250cm9sbmV0JTBBKS50byhkZXZpY2UpJTBBcGlwZS5zY2hlZHVsZXIlMjAlM0QlMjBkaWZmdXNlcnMuRFBNU29sdmVyTXVsdGlzdGVwU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGUuc2NoZWR1bGVyLmNvbmZpZyUyQyUyMHVzZV9rYXJyYXNfc2lnbWFzJTNEVHJ1ZSklMEElMEFjb250cm9sbmV0X291dCUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEJTIyaGlnaCUyMHF1YWxpdHklMjBwaG90byUyMG9mJTIwYSUyMHNwb3J0cyUyMGJpa2UlMkMlMjBjaXR5JTIyJTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEJTIyJTIyJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q2LjUlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjUlMkMlMEElMjAlMjAlMjAlMjBpbWFnZSUzRGRlcHRoX2ltYWdlJTJDJTBBJTIwJTIwJTIwJTIwY29udHJvbG5ldF9jb25kaXRpb25pbmdfc2NhbGUlM0QwLjclMkMlMEElMjAlMjAlMjAlMjBjb250cm9sX2d1aWRhbmNlX2VuZCUzRDAuNyUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSkuaW1hZ2VzJTBBY29udHJvbG5ldF9vdXQlNUIwJTVELnNhdmUoJTIybW90b3JjeWNsZV9jb250cm9sbmV0X291dC5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">import</span> diffusers | |
| device = <span class="hljs-string">"cuda"</span> | |
| generator = torch.Generator(device=device).manual_seed(<span class="hljs-number">2024</span>) | |
| image = diffusers.utils.load_image( | |
| <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/controlnet_depth_source.png"</span> | |
| ) | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| <span class="hljs-string">"prs-eth/marigold-depth-v1-1"</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">"fp16"</span> | |
| ).to(device) | |
| depth_image = pipe(image, generator=generator).prediction | |
| depth_image = pipe.image_processor.visualize_depth(depth_image, color_map=<span class="hljs-string">"binary"</span>) | |
| depth_image[<span class="hljs-number">0</span>].save(<span class="hljs-string">"motorcycle_controlnet_depth.png"</span>) | |
| controlnet = diffusers.ControlNetModel.from_pretrained( | |
| <span class="hljs-string">"diffusers/controlnet-depth-sdxl-1.0"</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">"fp16"</span> | |
| ).to(device) | |
| pipe = diffusers.StableDiffusionXLControlNetPipeline.from_pretrained( | |
| <span class="hljs-string">"SG161222/RealVisXL_V4.0"</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">"fp16"</span>, controlnet=controlnet | |
| ).to(device) | |
| pipe.scheduler = diffusers.DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=<span class="hljs-literal">True</span>) | |
| controlnet_out = pipe( | |
| prompt=<span class="hljs-string">"high quality photo of a sports bike, city"</span>, | |
| negative_prompt=<span class="hljs-string">""</span>, | |
| guidance_scale=<span class="hljs-number">6.5</span>, | |
| num_inference_steps=<span class="hljs-number">25</span>, | |
| image=depth_image, | |
| controlnet_conditioning_scale=<span class="hljs-number">0.7</span>, | |
| control_guidance_end=<span class="hljs-number">0.7</span>, | |
| generator=generator, | |
| ).images | |
| controlnet_out[<span class="hljs-number">0</span>].save(<span class="hljs-string">"motorcycle_controlnet_out.png"</span>)`,lang:"python",wrap:!1}}),lt=new Z({props:{title:"Quantitative Evaluation",local:"quantitative-evaluation",headingTag:"h2"}}),dt=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFkZXZpY2UlMjAlM0QlMjAlMjJjdWRhJTIyJTBBc2VlZCUyMCUzRCUyMDIwMjQlMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEZGV2aWNlKS5tYW51YWxfc2VlZChzZWVkKSUwQXBpcGUlMjAlM0QlMjBkaWZmdXNlcnMuTWFyaWdvbGREZXB0aFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJwcnMtZXRoJTJGbWFyaWdvbGQtZGVwdGgtdjEtMSUyMikudG8oZGV2aWNlKSUwQSUwQWltYWdlJTIwJTNEJTIwZGlmZnVzZXJzLnV0aWxzLmxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZtYXJpZ29sZG1vbm9kZXB0aC5naXRodWIuaW8lMkZpbWFnZXMlMkZlaW5zdGVpbi5qcGclMjIpJTBBJTBBZGVwdGglMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMGltYWdlJTJDJTIwJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDQlMkMlMjAlMjAlMjMlMjBzZXQlMjBhY2NvcmRpbmclMjB0byUyMHRoZSUyMGV2YWx1YXRpb24lMjBwcm90b2NvbCUyMGZyb20lMjB0aGUlMjBwYXBlciUwQSUyMCUyMCUyMCUyMGVuc2VtYmxlX3NpemUlM0QxMCUyQyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMHNldCUyMGFjY29yZGluZyUyMHRvJTIwdGhlJTIwZXZhbHVhdGlvbiUyMHByb3RvY29sJTIwZnJvbSUyMHRoZSUyMHBhcGVyJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBKSUwQSUwQSUyMyUyMGV2YWx1YXRlJTIwbWV0cmljcw==",highlighted:`<span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-keyword">import</span> torch | |
| device = <span class="hljs-string">"cuda"</span> | |
| seed = <span class="hljs-number">2024</span> | |
| generator = torch.Generator(device=device).manual_seed(seed) | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained(<span class="hljs-string">"prs-eth/marigold-depth-v1-1"</span>).to(device) | |
| image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| depth = pipe( | |
| image, | |
| num_inference_steps=<span class="hljs-number">4</span>, <span class="hljs-comment"># set according to the evaluation protocol from the paper</span> | |
| ensemble_size=<span class="hljs-number">10</span>, <span class="hljs-comment"># set according to the evaluation protocol from the paper</span> | |
| generator=generator, | |
| ) | |
| <span class="hljs-comment"># evaluate metrics</span>`,lang:"python",wrap:!1}}),ct=new Z({props:{title:"Using Predictive Uncertainty",local:"using-predictive-uncertainty",headingTag:"h2"}}),mt=new j({props:{code:"aW1wb3J0JTIwZGlmZnVzZXJzJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlJTIwJTNEJTIwZGlmZnVzZXJzLk1hcmlnb2xkRGVwdGhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycHJzLWV0aCUyRm1hcmlnb2xkLWRlcHRoLXYxLTElMjIlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFpbWFnZSUyMCUzRCUyMGRpZmZ1c2Vycy51dGlscy5sb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGbWFyaWdvbGRtb25vZGVwdGguZ2l0aHViLmlvJTJGaW1hZ2VzJTJGZWluc3RlaW4uanBnJTIyKSUwQSUwQWRlcHRoJTIwJTNEJTIwcGlwZSglMEElMDlpbWFnZSUyQyUwQSUwOWVuc2VtYmxlX3NpemUlM0QxMCUyQyUyMCUyMCUyMyUyMGFueSUyMG51bWJlciUyMCUzRSUzRCUyMDMlMEElMDlvdXRwdXRfdW5jZXJ0YWludHklM0RUcnVlJTJDJTBBKSUwQSUwQXVuY2VydGFpbnR5JTIwJTNEJTIwcGlwZS5pbWFnZV9wcm9jZXNzb3IudmlzdWFsaXplX3VuY2VydGFpbnR5KGRlcHRoLnVuY2VydGFpbnR5KSUwQXVuY2VydGFpbnR5JTVCMCU1RC5zYXZlKCUyMmVpbnN0ZWluX2RlcHRoX3VuY2VydGFpbnR5LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> diffusers | |
| <span class="hljs-keyword">import</span> torch | |
| pipe = diffusers.MarigoldDepthPipeline.from_pretrained( | |
| <span class="hljs-string">"prs-eth/marigold-depth-v1-1"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| image = diffusers.utils.load_image(<span class="hljs-string">"https://marigoldmonodepth.github.io/images/einstein.jpg"</span>) | |
| depth = pipe( | |
| image, | |
| ensemble_size=<span class="hljs-number">10</span>, <span class="hljs-comment"># any number >= 3</span> | |
| output_uncertainty=<span class="hljs-literal">True</span>, | |
| ) | |
| uncertainty = pipe.image_processor.visualize_uncertainty(depth.uncertainty) | |
| uncertainty[<span class="hljs-number">0</span>].save(<span class="hljs-string">"einstein_depth_uncertainty.png"</span>)`,lang:"python",wrap:!1}}),gt=new Z({props:{title:"Marigold Depth Prediction API",local:"diffusers.MarigoldDepthPipeline",headingTag:"h2"}}),ft=new W({props:{name:"class diffusers.MarigoldDepthPipeline",anchor:"diffusers.MarigoldDepthPipeline",parameters:[{name:"unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": diffusers.schedulers.scheduling_ddim.DDIMScheduler | diffusers.schedulers.scheduling_lcm.LCMScheduler"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"prediction_type",val:": str | None = None"},{name:"scale_invariant",val:": bool | None = True"},{name:"shift_invariant",val:": bool | None = True"},{name:"default_denoising_steps",val:": int | None = None"},{name:"default_processing_resolution",val:": int | None = None"}],parametersDescription:[{anchor:"diffusers.MarigoldDepthPipeline.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Text-encoder, for empty text embedding.`,name:"text_encoder"},{anchor:"diffusers.MarigoldDepthPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) — | |
| CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.MarigoldDepthPipeline.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) — | |
| 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>) — | |
| 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 | |
| “affine-invariant”. 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>) — | |
| 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 | |
| “affine-invariant”. 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>) — | |
| 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>) — | |
| 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_13098/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py#L104"}}),Mt=new W({props:{name:"__call__",anchor:"diffusers.MarigoldDepthPipeline.__call__",parameters:[{name:"image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor]"},{name:"num_inference_steps",val:": int | None = None"},{name:"ensemble_size",val:": int = 1"},{name:"processing_resolution",val:": int | None = 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:": dict[str, typing.Any] | None = None"},{name:"latents",val:": torch.Tensor | list[torch.Tensor] | None = None"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = 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>), — | |
| <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>) — | |
| Number of denoising diffusion steps during inference. The default value <code>None</code> results in automatic | |
| selection.`,name:"num_inference_steps"},{anchor:"diffusers.MarigoldDepthPipeline.__call__.ensemble_size",description:`<strong>ensemble_size</strong> (<code>int</code>, defaults to <code>1</code>) — | |
| Number of ensemble predictions. Higher values result in measurable improvements and visual degradation.`,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>) — | |
| 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>) — | |
| 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>"bilinear"</code>) — | |
| Resampling method used to resize input images to <code>processing_resolution</code>. The accepted values are: | |
| <code>"nearest"</code>, <code>"nearest-exact"</code>, <code>"bilinear"</code>, <code>"bicubic"</code>, or <code>"area"</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>"bilinear"</code>) — | |
| Resampling method used to resize output predictions to match the input resolution. The accepted values | |
| are <code>"nearest"</code>, <code>"nearest-exact"</code>, <code>"bilinear"</code>, <code>"bicubic"</code>, or <code>"area"</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>) — | |
| 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>) — | |
| 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>"median"</code>): Defines the ensembling function applied in | |
| every pixel location, can be either <code>"median"</code> or <code>"mean"</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>) — | |
| Latent noise tensors to replace the random initialization. These can be taken from the previous | |
| function call’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>) — | |
| 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>"np"</code>) — | |
| Preferred format of the output’s <code>prediction</code> and the optional <code>uncertainty</code> fields. The accepted | |
| values are: <code>"np"</code> (numpy array) or <code>"pt"</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>) — | |
| When enabled, the output’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>) — | |
| When enabled, the output’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>) — | |
| Whether or not to return a <a href="/docs/diffusers/pr_13098/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_13098/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py#L347",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_13098/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_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldDepthOutput" | |
| >MarigoldDepthOutput</a> or <code>tuple</code></p> | |
| `}}),se=new Si({props:{anchor:"diffusers.MarigoldDepthPipeline.__call__.example",$$slots:{default:[Oo]},$$scope:{ctx:z}}}),yt=new W({props:{name:"class diffusers.pipelines.marigold.MarigoldDepthOutput",anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput",parameters:[{name:"prediction",val:": numpy.ndarray | torch.Tensor"},{name:"uncertainty",val:": None | numpy.ndarray | torch.Tensor"},{name:"latent",val:": None | torch.Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput.prediction",description:`<strong>prediction</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>) — | |
| Predicted depth maps with values in the range [0, 1]. The shape is <code>numimages × 1 × height × width</code> for | |
| <code>torch.Tensor</code> or <code>numimages × height × width × 1</code> for <code>np.ndarray</code>.`,name:"prediction"},{anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput.uncertainty",description:`<strong>uncertainty</strong> (<code>None</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>) — | |
| Uncertainty maps computed from the ensemble, with values in the range [0, 1]. The shape is <code>numimages × 1 × height × width</code> for <code>torch.Tensor</code> or <code>numimages × height × width × 1</code> for <code>np.ndarray</code>.`,name:"uncertainty"},{anchor:"diffusers.pipelines.marigold.MarigoldDepthOutput.latent",description:`<strong>latent</strong> (<code>None</code>, <code>torch.Tensor</code>) — | |
| Latent features corresponding to the predictions, compatible with the <code>latents</code> argument of the pipeline. | |
| The shape is <code>numimages * numensemble × 4 × latentheight × latentwidth</code>.`,name:"latent"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py#L83"}}),bt=new W({props:{name:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_depth",anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_depth",parameters:[{name:"depth",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor]"},{name:"val_min",val:": float = 0.0"},{name:"val_max",val:": float = 1.0"},{name:"color_map",val:": str = 'Spectral'"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_depth.depth",description:"<strong>depth</strong> (<code>PIL.Image.Image | np.ndarray | torch.Tensor | list[PIL.Image.Image, list[np.ndarray], -- list[torch.Tensor]]</code>): Depth maps.",name:"depth"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_depth.val_min",description:"<strong>val_min</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.0</code>) — Minimum value of the visualized depth range.",name:"val_min"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_depth.val_max",description:"<strong>val_max</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1.0</code>) — Maximum value of the visualized depth range.",name:"val_max"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_depth.color_map",description:`<strong>color_map</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"Spectral"</code>) — Color map used to convert a single-channel | |
| depth prediction into colored representation.`,name:"color_map"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/marigold_image_processing.py#L387"}}),_t=new Z({props:{title:"Marigold Normals Estimation API",local:"diffusers.MarigoldNormalsPipeline",headingTag:"h2"}}),Tt=new W({props:{name:"class diffusers.MarigoldNormalsPipeline",anchor:"diffusers.MarigoldNormalsPipeline",parameters:[{name:"unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": diffusers.schedulers.scheduling_ddim.DDIMScheduler | diffusers.schedulers.scheduling_lcm.LCMScheduler"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"prediction_type",val:": str | None = None"},{name:"use_full_z_range",val:": bool | None = True"},{name:"default_denoising_steps",val:": int | None = None"},{name:"default_processing_resolution",val:": int | None = None"}],parametersDescription:[{anchor:"diffusers.MarigoldNormalsPipeline.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Text-encoder, for empty text embedding.`,name:"text_encoder"},{anchor:"diffusers.MarigoldNormalsPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) — | |
| CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.MarigoldNormalsPipeline.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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_13098/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py#L99"}}),wt=new W({props:{name:"__call__",anchor:"diffusers.MarigoldNormalsPipeline.__call__",parameters:[{name:"image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor]"},{name:"num_inference_steps",val:": int | None = None"},{name:"ensemble_size",val:": int = 1"},{name:"processing_resolution",val:": int | None = 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:": dict[str, typing.Any] | None = None"},{name:"latents",val:": torch.Tensor | list[torch.Tensor] | None = None"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = 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>), — | |
| <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>) — | |
| Number of denoising diffusion steps during inference. The default value <code>None</code> results in automatic | |
| selection.`,name:"num_inference_steps"},{anchor:"diffusers.MarigoldNormalsPipeline.__call__.ensemble_size",description:`<strong>ensemble_size</strong> (<code>int</code>, defaults to <code>1</code>) — | |
| Number of ensemble predictions. Higher values result in measurable improvements and visual degradation.`,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>) — | |
| 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>) — | |
| 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>"bilinear"</code>) — | |
| Resampling method used to resize input images to <code>processing_resolution</code>. The accepted values are: | |
| <code>"nearest"</code>, <code>"nearest-exact"</code>, <code>"bilinear"</code>, <code>"bicubic"</code>, or <code>"area"</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>"bilinear"</code>) — | |
| Resampling method used to resize output predictions to match the input resolution. The accepted values | |
| are <code>"nearest"</code>, <code>"nearest-exact"</code>, <code>"bilinear"</code>, <code>"bicubic"</code>, or <code>"area"</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>) — | |
| 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>) — | |
| 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>"closest"</code>): Defines the ensembling function applied in | |
| every pixel location, can be either <code>"closest"</code> or <code>"mean"</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>) — | |
| Latent noise tensors to replace the random initialization. These can be taken from the previous | |
| function call’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>) — | |
| 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>"np"</code>) — | |
| Preferred format of the output’s <code>prediction</code> and the optional <code>uncertainty</code> fields. The accepted | |
| values are: <code>"np"</code> (numpy array) or <code>"pt"</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>) — | |
| When enabled, the output’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>) — | |
| When enabled, the output’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>) — | |
| Whether or not to return a <a href="/docs/diffusers/pr_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldNormalsOutput">MarigoldNormalsOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py#L332",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_13098/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_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldNormalsOutput" | |
| >MarigoldNormalsOutput</a> or <code>tuple</code></p> | |
| `}}),oe=new Si({props:{anchor:"diffusers.MarigoldNormalsPipeline.__call__.example",$$slots:{default:[ea]},$$scope:{ctx:z}}}),vt=new W({props:{name:"class diffusers.pipelines.marigold.MarigoldNormalsOutput",anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput",parameters:[{name:"prediction",val:": numpy.ndarray | torch.Tensor"},{name:"uncertainty",val:": None | numpy.ndarray | torch.Tensor"},{name:"latent",val:": None | torch.Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput.prediction",description:`<strong>prediction</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>) — | |
| Predicted normals with values in the range [-1, 1]. The shape is <code>numimages × 3 × height × width</code> for | |
| <code>torch.Tensor</code> or <code>numimages × height × width × 3</code> for <code>np.ndarray</code>.`,name:"prediction"},{anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput.uncertainty",description:`<strong>uncertainty</strong> (<code>None</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>) — | |
| Uncertainty maps computed from the ensemble, with values in the range [0, 1]. The shape is <code>numimages × 1 × height × width</code> for <code>torch.Tensor</code> or <code>numimages × height × width × 1</code> for <code>np.ndarray</code>.`,name:"uncertainty"},{anchor:"diffusers.pipelines.marigold.MarigoldNormalsOutput.latent",description:`<strong>latent</strong> (<code>None</code>, <code>torch.Tensor</code>) — | |
| Latent features corresponding to the predictions, compatible with the <code>latents</code> argument of the pipeline. | |
| The shape is <code>numimages * numensemble × 4 × latentheight × latentwidth</code>.`,name:"latent"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/pipeline_marigold_normals.py#L78"}}),Jt=new W({props:{name:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_normals",anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_normals",parameters:[{name:"normals",val:": numpy.ndarray | torch.Tensor | list[numpy.ndarray] | list[torch.Tensor]"},{name:"flip_x",val:": bool = False"},{name:"flip_y",val:": bool = False"},{name:"flip_z",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_normals.normals",description:`<strong>normals</strong> (<code>np.ndarray | torch.Tensor | list[np.ndarray, list[torch.Tensor]]</code>) — | |
| Surface normals.`,name:"normals"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_normals.flip_x",description:`<strong>flip_x</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — Flips the X axis of the normals frame of reference. | |
| Default direction is right.`,name:"flip_x"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_normals.flip_y",description:`<strong>flip_y</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — Flips the Y axis of the normals frame of reference. | |
| Default direction is top.`,name:"flip_y"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_normals.flip_z",description:`<strong>flip_z</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — Flips the Z axis of the normals frame of reference. | |
| Default direction is facing the observer.`,name:"flip_z"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/marigold_image_processing.py#L486"}}),jt=new Z({props:{title:"Marigold Intrinsic Image Decomposition API",local:"diffusers.MarigoldIntrinsicsPipeline",headingTag:"h2"}}),Zt=new W({props:{name:"class diffusers.MarigoldIntrinsicsPipeline",anchor:"diffusers.MarigoldIntrinsicsPipeline",parameters:[{name:"unet",val:": UNet2DConditionModel"},{name:"vae",val:": AutoencoderKL"},{name:"scheduler",val:": diffusers.schedulers.scheduling_ddim.DDIMScheduler | diffusers.schedulers.scheduling_lcm.LCMScheduler"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"prediction_type",val:": str | None = None"},{name:"target_properties",val:": dict[str, typing.Any] | None = None"},{name:"default_denoising_steps",val:": int | None = None"},{name:"default_processing_resolution",val:": int | None = None"}],parametersDescription:[{anchor:"diffusers.MarigoldIntrinsicsPipeline.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) — | |
| Conditional U-Net to denoise the targets latent, conditioned on image latent.`,name:"unet"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.vae",description:`<strong>vae</strong> (<code>AutoencoderKL</code>) — | |
| Variational Auto-Encoder (VAE) Model to encode and decode images and predictions to and from latent | |
| representations.`,name:"vae"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.scheduler",description:`<strong>scheduler</strong> (<code>DDIMScheduler</code> or <code>LCMScheduler</code>) — | |
| A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) — | |
| Text-encoder, for empty text embedding.`,name:"text_encoder"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) — | |
| CLIP tokenizer.`,name:"tokenizer"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) — | |
| Type of predictions made by the model.`,name:"prediction_type"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.target_properties",description:`<strong>target_properties</strong> (<code>dict[str, Any]</code>, <em>optional</em>) — | |
| Properties of the predicted modalities, such as <code>target_names</code>, a <code>list[str]</code> used to define the number, | |
| order and names of the predicted modalities, and any other metadata that may be required to interpret the | |
| predictions.`,name:"target_properties"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.default_denoising_steps",description:`<strong>default_denoising_steps</strong> (<code>int</code>, <em>optional</em>) — | |
| 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.MarigoldIntrinsicsPipeline.default_processing_resolution",description:`<strong>default_processing_resolution</strong> (<code>int</code>, <em>optional</em>) — | |
| 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_13098/src/diffusers/pipelines/marigold/pipeline_marigold_intrinsics.py#L120"}}),It=new W({props:{name:"__call__",anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__",parameters:[{name:"image",val:": PIL.Image.Image | numpy.ndarray | torch.Tensor | list[PIL.Image.Image] | list[numpy.ndarray] | list[torch.Tensor]"},{name:"num_inference_steps",val:": int | None = None"},{name:"ensemble_size",val:": int = 1"},{name:"processing_resolution",val:": int | None = 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:": dict[str, typing.Any] | None = None"},{name:"latents",val:": torch.Tensor | list[torch.Tensor] | None = None"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = 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.MarigoldIntrinsicsPipeline.__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>), — | |
| <code>list[torch.Tensor]</code>: An input image or images used as an input for the intrinsic decomposition 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.MarigoldIntrinsicsPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| Number of denoising diffusion steps during inference. The default value <code>None</code> results in automatic | |
| selection.`,name:"num_inference_steps"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.ensemble_size",description:`<strong>ensemble_size</strong> (<code>int</code>, defaults to <code>1</code>) — | |
| Number of ensemble predictions. Higher values result in measurable improvements and visual degradation.`,name:"ensemble_size"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.processing_resolution",description:`<strong>processing_resolution</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| 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.MarigoldIntrinsicsPipeline.__call__.match_input_resolution",description:`<strong>match_input_resolution</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| 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.MarigoldIntrinsicsPipeline.__call__.resample_method_input",description:`<strong>resample_method_input</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"bilinear"</code>) — | |
| Resampling method used to resize input images to <code>processing_resolution</code>. The accepted values are: | |
| <code>"nearest"</code>, <code>"nearest-exact"</code>, <code>"bilinear"</code>, <code>"bicubic"</code>, or <code>"area"</code>.`,name:"resample_method_input"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.resample_method_output",description:`<strong>resample_method_output</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"bilinear"</code>) — | |
| Resampling method used to resize output predictions to match the input resolution. The accepted values | |
| are <code>"nearest"</code>, <code>"nearest-exact"</code>, <code>"bilinear"</code>, <code>"bicubic"</code>, or <code>"area"</code>.`,name:"resample_method_output"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) — | |
| Batch size; only matters when setting <code>ensemble_size</code> or passing a tensor of images.`,name:"batch_size"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.ensembling_kwargs",description:`<strong>ensembling_kwargs</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| 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>"median"</code>): Defines the ensembling function applied in | |
| every pixel location, can be either <code>"median"</code> or <code>"mean"</code>.</li> | |
| </ul>`,name:"ensembling_kwargs"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| Latent noise tensors to replace the random initialization. These can be taken from the previous | |
| function call’s output.`,name:"latents"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, or <code>list[torch.Generator]</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| Random number generator object to ensure reproducibility.`,name:"generator"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"np"</code>) — | |
| Preferred format of the output’s <code>prediction</code> and the optional <code>uncertainty</code> fields. The accepted | |
| values are: <code>"np"</code> (numpy array) or <code>"pt"</code> (torch tensor).`,name:"output_type"},{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.output_uncertainty",description:`<strong>output_uncertainty</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| When enabled, the output’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.MarigoldIntrinsicsPipeline.__call__.output_latent",description:`<strong>output_latent</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| When enabled, the output’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.MarigoldIntrinsicsPipeline.__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/pr_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldIntrinsicsOutput">MarigoldIntrinsicsOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/pipeline_marigold_intrinsics.py#L359",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldIntrinsicsOutput" | |
| >MarigoldIntrinsicsOutput</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_13098/en/api/pipelines/marigold#diffusers.pipelines.marigold.MarigoldIntrinsicsOutput" | |
| >MarigoldIntrinsicsOutput</a> or <code>tuple</code></p> | |
| `}}),ae=new Si({props:{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.example",$$slots:{default:[ta]},$$scope:{ctx:z}}}),le=new Si({props:{anchor:"diffusers.MarigoldIntrinsicsPipeline.__call__.example-2",$$slots:{default:[na]},$$scope:{ctx:z}}}),xt=new W({props:{name:"class diffusers.pipelines.marigold.MarigoldIntrinsicsOutput",anchor:"diffusers.pipelines.marigold.MarigoldIntrinsicsOutput",parameters:[{name:"prediction",val:": numpy.ndarray | torch.Tensor"},{name:"uncertainty",val:": None | numpy.ndarray | torch.Tensor"},{name:"latent",val:": None | torch.Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldIntrinsicsOutput.prediction",description:`<strong>prediction</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>) — | |
| Predicted image intrinsics with values in the range [0, 1]. The shape is <code>(numimages * numtargets) × 3 × height × width</code> for <code>torch.Tensor</code> or <code>(numimages * numtargets) × height × width × 3</code> for <code>np.ndarray</code>, | |
| where <code>numtargets</code> corresponds to the number of predicted target modalities of the intrinsic image | |
| decomposition.`,name:"prediction"},{anchor:"diffusers.pipelines.marigold.MarigoldIntrinsicsOutput.uncertainty",description:`<strong>uncertainty</strong> (<code>None</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>) — | |
| Uncertainty maps computed from the ensemble, with values in the range [0, 1]. The shape is <code>(numimages * numtargets) × 3 × height × width</code> for <code>torch.Tensor</code> or <code>(numimages * numtargets) × height × width × 3</code> for | |
| <code>np.ndarray</code>.`,name:"uncertainty"},{anchor:"diffusers.pipelines.marigold.MarigoldIntrinsicsOutput.latent",description:`<strong>latent</strong> (<code>None</code>, <code>torch.Tensor</code>) — | |
| Latent features corresponding to the predictions, compatible with the <code>latents</code> argument of the pipeline. | |
| The shape is <code>(numimages * numensemble) × (numtargets * 4) × latentheight × latentwidth</code>.`,name:"latent"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/pipeline_marigold_intrinsics.py#L96"}}),Ut=new W({props:{name:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_intrinsics",anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_intrinsics",parameters:[{name:"prediction",val:": numpy.ndarray | torch.Tensor | list[numpy.ndarray] | list[torch.Tensor]"},{name:"target_properties",val:": dict"},{name:"color_map",val:": str | dict[str, str] = 'binary'"}],parametersDescription:[{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_intrinsics.prediction",description:`<strong>prediction</strong> (<code>np.ndarray | torch.Tensor | list[np.ndarray, list[torch.Tensor]]</code>) — | |
| Intrinsic image decomposition.`,name:"prediction"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_intrinsics.target_properties",description:`<strong>target_properties</strong> (<code>dict[str, Any]</code>) — | |
| Decomposition properties. Expected entries: <code>target_names: list[str]</code> and a dictionary with keys | |
| <code>prediction_space: str</code>, <code>sub_target_names: list[str | Null]</code> (must have 3 entries, null for missing | |
| modalities), <code>up_to_scale: bool</code>, one for each target and sub-target.`,name:"target_properties"},{anchor:"diffusers.pipelines.marigold.MarigoldImageProcessor.visualize_intrinsics.color_map",description:`<strong>color_map</strong> (<code>str | dict[str, str]</code>, <em>optional</em>, defaults to <code>"Spectral"</code>) — | |
| Color map used to convert a single-channel predictions into colored representations. When a dictionary | |
| is passed, each modality can be colored with its own color map.`,name:"color_map"}],source:"https://github.com/huggingface/diffusers/blob/vr_13098/src/diffusers/pipelines/marigold/marigold_image_processing.py#L542"}}),Gt=new Ko({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/marigold.md"}}),{c(){M=a("meta"),v=s(),y=a("p"),b=s(),c(T.$$.fragment),f=s(),c(w.$$.fragment),cn=s(),me=a("p"),me.innerHTML=Zs,pn=s(),ue=a("p"),ue.innerHTML=Is,mn=s(),he=a("p"),he.innerHTML=xs,un=s(),A=a("blockquote"),A.innerHTML=Us,hn=s(),c(ge.$$.fragment),gn=s(),fe=a("p"),fe.textContent=Gs,fn=s(),Me=a("table"),Me.innerHTML=Ws,Mn=s(),c(ye.$$.fragment),yn=s(),be=a("p"),be.innerHTML=Ns,bn=s(),P=a("table"),Ct=a("thead"),Ct.innerHTML=Cs,Pi=s(),N=a("tbody"),Bt=a("tr"),Bt.innerHTML=Bs,Di=s(),kt=a("tr"),kt.innerHTML=ks,Fi=s(),$t=a("tr"),$t.innerHTML=$s,Qi=s(),E=a("tr"),zt=a("td"),zt.innerHTML=zs,Ki=s(),Rt=a("td"),Rt.textContent=Rs,Oi=s(),_e=a("td"),es=qo("HyperSim decomposition of an image "),_n=new Po(!1),Tn=qo(" is comprised of Albedo $A$, Diffuse shading $S$, and Non-diffuse residual $R$: $I = A*S+R$."),wn=s(),D=a("blockquote"),D.innerHTML=Vs,vn=s(),F=a("blockquote"),F.innerHTML=Xs,Jn=s(),Te=a("p"),Te.textContent=qs,jn=s(),R=a("div"),R.innerHTML=Es,Zn=s(),c(we.$$.fragment),In=s(),ve=a("p"),ve.innerHTML=Hs,xn=s(),c(Je.$$.fragment),Un=s(),je=a("p"),je.innerHTML=Ls,Gn=s(),Q=a("div"),Q.innerHTML=Ys,Wn=s(),c(Ze.$$.fragment),Nn=s(),Ie=a("p"),Ie.innerHTML=Ss,Cn=s(),c(xe.$$.fragment),Bn=s(),Ue=a("p"),Ue.innerHTML=As,kn=s(),V=a("div"),V.innerHTML=Ps,$n=s(),Ge=a("p"),Ge.innerHTML=Ds,zn=s(),c(We.$$.fragment),Rn=s(),Ne=a("p"),Ne.textContent=Fs,Vn=s(),Ce=a("ul"),Ce.innerHTML=Qs,Xn=s(),Be=a("p"),Be.textContent=Ks,qn=s(),c(ke.$$.fragment),En=s(),$e=a("p"),$e.textContent=Os,Hn=s(),c(ze.$$.fragment),Ln=s(),Re=a("p"),Re.innerHTML=eo,Yn=s(),Ve=a("p"),Ve.innerHTML=to,Sn=s(),K=a("div"),K.innerHTML=no,An=s(),c(Xe.$$.fragment),Pn=s(),qe=a("p"),qe.innerHTML=io,Dn=s(),c(Ee.$$.fragment),Fn=s(),He=a("p"),He.innerHTML=so,Qn=s(),c(Le.$$.fragment),Kn=s(),Ye=a("p"),Ye.textContent=oo,On=s(),c(Se.$$.fragment),ei=s(),Ae=a("p"),Ae.innerHTML=ao,ti=s(),c(Pe.$$.fragment),ni=s(),c(De.$$.fragment),ii=s(),Fe=a("p"),Fe.innerHTML=lo,si=s(),c(Qe.$$.fragment),oi=s(),O=a("div"),O.innerHTML=ro,ai=s(),Ke=a("p"),Ke.textContent=co,li=s(),c(Oe.$$.fragment),ri=s(),et=a("p"),et.textContent=po,di=s(),ee=a("div"),ee.innerHTML=mo,ci=s(),tt=a("p"),tt.innerHTML=uo,pi=s(),c(nt.$$.fragment),mi=s(),it=a("p"),it.innerHTML=ho,ui=s(),te=a("div"),te.innerHTML=go,hi=s(),c(st.$$.fragment),gi=s(),ot=a("p"),ot.textContent=fo,fi=s(),c(at.$$.fragment),Mi=s(),ne=a("div"),ne.innerHTML=Mo,yi=s(),c(lt.$$.fragment),bi=s(),rt=a("p"),rt.innerHTML=yo,_i=s(),c(dt.$$.fragment),Ti=s(),c(ct.$$.fragment),wi=s(),pt=a("p"),pt.innerHTML=bo,vi=s(),c(mt.$$.fragment),Ji=s(),ie=a("div"),ie.innerHTML=_o,ji=s(),ut=a("p"),ut.textContent=To,Zi=s(),ht=a("ul"),ht.innerHTML=wo,Ii=s(),c(gt.$$.fragment),xi=s(),I=a("div"),c(ft.$$.fragment),ts=s(),Vt=a("p"),Vt.innerHTML=vo,ns=s(),Xt=a("p"),Xt.innerHTML=Jo,is=s(),X=a("div"),c(Mt.$$.fragment),ss=s(),qt=a("p"),qt.textContent=jo,os=s(),c(se.$$.fragment),Ui=s(),H=a("div"),c(yt.$$.fragment),as=s(),Et=a("p"),Et.textContent=Zo,Gi=s(),C=a("div"),c(bt.$$.fragment),ls=s(),Ht=a("p"),Ht.innerHTML=Io,rs=s(),Lt=a("p"),Lt.innerHTML=xo,Wi=s(),c(_t.$$.fragment),Ni=s(),x=a("div"),c(Tt.$$.fragment),ds=s(),Yt=a("p"),Yt.innerHTML=Uo,cs=s(),St=a("p"),St.innerHTML=Go,ps=s(),q=a("div"),c(wt.$$.fragment),ms=s(),At=a("p"),At.textContent=Wo,us=s(),c(oe.$$.fragment),Ci=s(),L=a("div"),c(vt.$$.fragment),hs=s(),Pt=a("p"),Pt.textContent=No,Bi=s(),B=a("div"),c(Jt.$$.fragment),gs=s(),Dt=a("p"),Dt.innerHTML=Co,fs=s(),Ft=a("p"),Ft.innerHTML=Bo,ki=s(),c(jt.$$.fragment),$i=s(),U=a("div"),c(Zt.$$.fragment),Ms=s(),Qt=a("p"),Qt.innerHTML=ko,ys=s(),Kt=a("p"),Kt.innerHTML=$o,bs=s(),G=a("div"),c(It.$$.fragment),_s=s(),Ot=a("p"),Ot.textContent=zo,Ts=s(),c(ae.$$.fragment),ws=s(),c(le.$$.fragment),zi=s(),Y=a("div"),c(xt.$$.fragment),vs=s(),en=a("p"),en.textContent=Ro,Ri=s(),k=a("div"),c(Ut.$$.fragment),Js=s(),tn=a("p"),tn.innerHTML=Vo,js=s(),nn=a("p"),nn.innerHTML=Xo,Vi=s(),c(Gt.$$.fragment),Xi=s(),dn=a("p"),this.h()},l(e){const t=Do("svelte-u9bgzb",document.head);M=l(t,"META",{name:!0,content:!0}),t.forEach(n),v=o(e),y=l(e,"P",{}),J(y).forEach(n),b=o(e),p(T.$$.fragment,e),f=o(e),p(w.$$.fragment,e),cn=o(e),me=l(e,"P",{"data-svelte-h":!0}),r(me)!=="svelte-1musivh"&&(me.innerHTML=Zs),pn=o(e),ue=l(e,"P",{"data-svelte-h":!0}),r(ue)!=="svelte-z53d30"&&(ue.innerHTML=Is),mn=o(e),he=l(e,"P",{"data-svelte-h":!0}),r(he)!=="svelte-pdh9wl"&&(he.innerHTML=xs),un=o(e),A=l(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),r(A)!=="svelte-ujnrla"&&(A.innerHTML=Us),hn=o(e),p(ge.$$.fragment,e),gn=o(e),fe=l(e,"P",{"data-svelte-h":!0}),r(fe)!=="svelte-d9hh6k"&&(fe.textContent=Gs),fn=o(e),Me=l(e,"TABLE",{"data-svelte-h":!0}),r(Me)!=="svelte-1puk2lq"&&(Me.innerHTML=Ws),Mn=o(e),p(ye.$$.fragment,e),yn=o(e),be=l(e,"P",{"data-svelte-h":!0}),r(be)!=="svelte-1w30tm5"&&(be.innerHTML=Ns),bn=o(e),P=l(e,"TABLE",{});var Wt=J(P);Ct=l(Wt,"THEAD",{"data-svelte-h":!0}),r(Ct)!=="svelte-ubewwm"&&(Ct.innerHTML=Cs),Pi=o(Wt),N=l(Wt,"TBODY",{});var $=J(N);Bt=l($,"TR",{"data-svelte-h":!0}),r(Bt)!=="svelte-ao7el9"&&(Bt.innerHTML=Bs),Di=o($),kt=l($,"TR",{"data-svelte-h":!0}),r(kt)!=="svelte-9wucso"&&(kt.innerHTML=ks),Fi=o($),$t=l($,"TR",{"data-svelte-h":!0}),r($t)!=="svelte-1mu3nd5"&&($t.innerHTML=$s),Qi=o($),E=l($,"TR",{});var S=J(E);zt=l(S,"TD",{"data-svelte-h":!0}),r(zt)!=="svelte-1u8ffq5"&&(zt.innerHTML=zs),Ki=o(S),Rt=l(S,"TD",{"data-svelte-h":!0}),r(Rt)!=="svelte-pxwxqa"&&(Rt.textContent=Rs),Oi=o(S),_e=l(S,"TD",{});var Nt=J(_e);es=Eo(Nt,"HyperSim decomposition of an image "),_n=Fo(Nt,!1),Tn=Eo(Nt," is comprised of Albedo $A$, Diffuse shading $S$, and Non-diffuse residual $R$: $I = A*S+R$."),Nt.forEach(n),S.forEach(n),$.forEach(n),Wt.forEach(n),wn=o(e),D=l(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),r(D)!=="svelte-l138yr"&&(D.innerHTML=Vs),vn=o(e),F=l(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),r(F)!=="svelte-cqgv7b"&&(F.innerHTML=Xs),Jn=o(e),Te=l(e,"P",{"data-svelte-h":!0}),r(Te)!=="svelte-r6ainx"&&(Te.textContent=qs),jn=o(e),R=l(e,"DIV",{class:!0,style:!0,"data-svelte-h":!0}),r(R)!=="svelte-130z9iz"&&(R.innerHTML=Es),Zn=o(e),p(we.$$.fragment,e),In=o(e),ve=l(e,"P",{"data-svelte-h":!0}),r(ve)!=="svelte-9jngls"&&(ve.innerHTML=Hs),xn=o(e),p(Je.$$.fragment,e),Un=o(e),je=l(e,"P",{"data-svelte-h":!0}),r(je)!=="svelte-495u5i"&&(je.innerHTML=Ls),Gn=o(e),Q=l(e,"DIV",{class:!0,"data-svelte-h":!0}),r(Q)!=="svelte-16yoeuw"&&(Q.innerHTML=Ys),Wn=o(e),p(Ze.$$.fragment,e),Nn=o(e),Ie=l(e,"P",{"data-svelte-h":!0}),r(Ie)!=="svelte-dkqyx1"&&(Ie.innerHTML=Ss),Cn=o(e),p(xe.$$.fragment,e),Bn=o(e),Ue=l(e,"P",{"data-svelte-h":!0}),r(Ue)!=="svelte-c8sw6g"&&(Ue.innerHTML=As),kn=o(e),V=l(e,"DIV",{class:!0,style:!0,"data-svelte-h":!0}),r(V)!=="svelte-15wm70y"&&(V.innerHTML=Ps),$n=o(e),Ge=l(e,"P",{"data-svelte-h":!0}),r(Ge)!=="svelte-112j81b"&&(Ge.innerHTML=Ds),zn=o(e),p(We.$$.fragment,e),Rn=o(e),Ne=l(e,"P",{"data-svelte-h":!0}),r(Ne)!=="svelte-4kpwil"&&(Ne.textContent=Fs),Vn=o(e),Ce=l(e,"UL",{"data-svelte-h":!0}),r(Ce)!=="svelte-1ryhu3o"&&(Ce.innerHTML=Qs),Xn=o(e),Be=l(e,"P",{"data-svelte-h":!0}),r(Be)!=="svelte-5ngr7b"&&(Be.textContent=Ks),qn=o(e),p(ke.$$.fragment,e),En=o(e),$e=l(e,"P",{"data-svelte-h":!0}),r($e)!=="svelte-1gpdgbg"&&($e.textContent=Os),Hn=o(e),p(ze.$$.fragment,e),Ln=o(e),Re=l(e,"P",{"data-svelte-h":!0}),r(Re)!=="svelte-v16k7g"&&(Re.innerHTML=eo),Yn=o(e),Ve=l(e,"P",{"data-svelte-h":!0}),r(Ve)!=="svelte-120nvgo"&&(Ve.innerHTML=to),Sn=o(e),K=l(e,"DIV",{class:!0,"data-svelte-h":!0}),r(K)!=="svelte-nydk8v"&&(K.innerHTML=no),An=o(e),p(Xe.$$.fragment,e),Pn=o(e),qe=l(e,"P",{"data-svelte-h":!0}),r(qe)!=="svelte-ldmjw6"&&(qe.innerHTML=io),Dn=o(e),p(Ee.$$.fragment,e),Fn=o(e),He=l(e,"P",{"data-svelte-h":!0}),r(He)!=="svelte-1tl4vsj"&&(He.innerHTML=so),Qn=o(e),p(Le.$$.fragment,e),Kn=o(e),Ye=l(e,"P",{"data-svelte-h":!0}),r(Ye)!=="svelte-1qszioo"&&(Ye.textContent=oo),On=o(e),p(Se.$$.fragment,e),ei=o(e),Ae=l(e,"P",{"data-svelte-h":!0}),r(Ae)!=="svelte-uro3cy"&&(Ae.innerHTML=ao),ti=o(e),p(Pe.$$.fragment,e),ni=o(e),p(De.$$.fragment,e),ii=o(e),Fe=l(e,"P",{"data-svelte-h":!0}),r(Fe)!=="svelte-3i2mxl"&&(Fe.innerHTML=lo),si=o(e),p(Qe.$$.fragment,e),oi=o(e),O=l(e,"DIV",{class:!0,"data-svelte-h":!0}),r(O)!=="svelte-etsikn"&&(O.innerHTML=ro),ai=o(e),Ke=l(e,"P",{"data-svelte-h":!0}),r(Ke)!=="svelte-3lgzgw"&&(Ke.textContent=co),li=o(e),p(Oe.$$.fragment,e),ri=o(e),et=l(e,"P",{"data-svelte-h":!0}),r(et)!=="svelte-1liveae"&&(et.textContent=po),di=o(e),ee=l(e,"DIV",{class:!0,"data-svelte-h":!0}),r(ee)!=="svelte-1k6s96j"&&(ee.innerHTML=mo),ci=o(e),tt=l(e,"P",{"data-svelte-h":!0}),r(tt)!=="svelte-o99xnx"&&(tt.innerHTML=uo),pi=o(e),p(nt.$$.fragment,e),mi=o(e),it=l(e,"P",{"data-svelte-h":!0}),r(it)!=="svelte-1dxdmz7"&&(it.innerHTML=ho),ui=o(e),te=l(e,"DIV",{class:!0,"data-svelte-h":!0}),r(te)!=="svelte-u703tp"&&(te.innerHTML=go),hi=o(e),p(st.$$.fragment,e),gi=o(e),ot=l(e,"P",{"data-svelte-h":!0}),r(ot)!=="svelte-12oh700"&&(ot.textContent=fo),fi=o(e),p(at.$$.fragment,e),Mi=o(e),ne=l(e,"DIV",{class:!0,"data-svelte-h":!0}),r(ne)!=="svelte-bddy4e"&&(ne.innerHTML=Mo),yi=o(e),p(lt.$$.fragment,e),bi=o(e),rt=l(e,"P",{"data-svelte-h":!0}),r(rt)!=="svelte-1r9j6ij"&&(rt.innerHTML=yo),_i=o(e),p(dt.$$.fragment,e),Ti=o(e),p(ct.$$.fragment,e),wi=o(e),pt=l(e,"P",{"data-svelte-h":!0}),r(pt)!=="svelte-yvw9s0"&&(pt.innerHTML=bo),vi=o(e),p(mt.$$.fragment,e),Ji=o(e),ie=l(e,"DIV",{class:!0,"data-svelte-h":!0}),r(ie)!=="svelte-a7wlst"&&(ie.innerHTML=_o),ji=o(e),ut=l(e,"P",{"data-svelte-h":!0}),r(ut)!=="svelte-1kdua20"&&(ut.textContent=To),Zi=o(e),ht=l(e,"UL",{"data-svelte-h":!0}),r(ht)!=="svelte-41v41f"&&(ht.innerHTML=wo),Ii=o(e),p(gt.$$.fragment,e),xi=o(e),I=l(e,"DIV",{class:!0});var re=J(I);p(ft.$$.fragment,re),ts=o(re),Vt=l(re,"P",{"data-svelte-h":!0}),r(Vt)!=="svelte-41emwn"&&(Vt.innerHTML=vo),ns=o(re),Xt=l(re,"P",{"data-svelte-h":!0}),r(Xt)!=="svelte-103nteu"&&(Xt.innerHTML=Jo),is=o(re),X=l(re,"DIV",{class:!0});var sn=J(X);p(Mt.$$.fragment,sn),ss=o(sn),qt=l(sn,"P",{"data-svelte-h":!0}),r(qt)!=="svelte-typ793"&&(qt.textContent=jo),os=o(sn),p(se.$$.fragment,sn),sn.forEach(n),re.forEach(n),Ui=o(e),H=l(e,"DIV",{class:!0});var Ei=J(H);p(yt.$$.fragment,Ei),as=o(Ei),Et=l(Ei,"P",{"data-svelte-h":!0}),r(Et)!=="svelte-zmov3r"&&(Et.textContent=Zo),Ei.forEach(n),Gi=o(e),C=l(e,"DIV",{class:!0});var on=J(C);p(bt.$$.fragment,on),ls=o(on),Ht=l(on,"P",{"data-svelte-h":!0}),r(Ht)!=="svelte-2rqpmx"&&(Ht.innerHTML=Io),rs=o(on),Lt=l(on,"P",{"data-svelte-h":!0}),r(Lt)!=="svelte-1dv37nj"&&(Lt.innerHTML=xo),on.forEach(n),Wi=o(e),p(_t.$$.fragment,e),Ni=o(e),x=l(e,"DIV",{class:!0});var de=J(x);p(Tt.$$.fragment,de),ds=o(de),Yt=l(de,"P",{"data-svelte-h":!0}),r(Yt)!=="svelte-13lumts"&&(Yt.innerHTML=Uo),cs=o(de),St=l(de,"P",{"data-svelte-h":!0}),r(St)!=="svelte-103nteu"&&(St.innerHTML=Go),ps=o(de),q=l(de,"DIV",{class:!0});var an=J(q);p(wt.$$.fragment,an),ms=o(an),At=l(an,"P",{"data-svelte-h":!0}),r(At)!=="svelte-typ793"&&(At.textContent=Wo),us=o(an),p(oe.$$.fragment,an),an.forEach(n),de.forEach(n),Ci=o(e),L=l(e,"DIV",{class:!0});var Hi=J(L);p(vt.$$.fragment,Hi),hs=o(Hi),Pt=l(Hi,"P",{"data-svelte-h":!0}),r(Pt)!=="svelte-1msg7gm"&&(Pt.textContent=No),Hi.forEach(n),Bi=o(e),B=l(e,"DIV",{class:!0});var ln=J(B);p(Jt.$$.fragment,ln),gs=o(ln),Dt=l(ln,"P",{"data-svelte-h":!0}),r(Dt)!=="svelte-qt3ymb"&&(Dt.innerHTML=Co),fs=o(ln),Ft=l(ln,"P",{"data-svelte-h":!0}),r(Ft)!=="svelte-lp521e"&&(Ft.innerHTML=Bo),ln.forEach(n),ki=o(e),p(jt.$$.fragment,e),$i=o(e),U=l(e,"DIV",{class:!0});var ce=J(U);p(Zt.$$.fragment,ce),Ms=o(ce),Qt=l(ce,"P",{"data-svelte-h":!0}),r(Qt)!=="svelte-15yl9op"&&(Qt.innerHTML=ko),ys=o(ce),Kt=l(ce,"P",{"data-svelte-h":!0}),r(Kt)!=="svelte-103nteu"&&(Kt.innerHTML=$o),bs=o(ce),G=l(ce,"DIV",{class:!0});var pe=J(G);p(It.$$.fragment,pe),_s=o(pe),Ot=l(pe,"P",{"data-svelte-h":!0}),r(Ot)!=="svelte-typ793"&&(Ot.textContent=zo),Ts=o(pe),p(ae.$$.fragment,pe),ws=o(pe),p(le.$$.fragment,pe),pe.forEach(n),ce.forEach(n),zi=o(e),Y=l(e,"DIV",{class:!0});var Li=J(Y);p(xt.$$.fragment,Li),vs=o(Li),en=l(Li,"P",{"data-svelte-h":!0}),r(en)!=="svelte-1caxwky"&&(en.textContent=Ro),Li.forEach(n),Ri=o(e),k=l(e,"DIV",{class:!0});var rn=J(k);p(Ut.$$.fragment,rn),Js=o(rn),tn=l(rn,"P",{"data-svelte-h":!0}),r(tn)!=="svelte-gpcvn9"&&(tn.innerHTML=Vo),js=o(rn),nn=l(rn,"P",{"data-svelte-h":!0}),r(nn)!=="svelte-940nsl"&&(nn.innerHTML=Xo),rn.forEach(n),Vi=o(e),p(Gt.$$.fragment,e),Xi=o(e),dn=l(e,"P",{}),J(dn).forEach(n),this.h()},h(){_(M,"name","hf:doc:metadata"),_(M,"content",sa),_(A,"class","tip"),_n.a=Tn,_(D,"class","tip"),_(F,"class","warning"),_(R,"class","flex gap-4"),Yi(R,"justify-content","center"),Yi(R,"width","100%"),_(Q,"class","flex gap-4"),_(V,"class","flex gap-4"),Yi(V,"justify-content","center"),Yi(V,"width","100%"),_(K,"class","flex gap-4"),_(O,"class","flex gap-4"),_(ee,"class","flex gap-4"),_(te,"class","flex gap-4"),_(ne,"class","flex gap-4"),_(ie,"class","flex gap-4"),_(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){d(document.head,M),i(e,v,t),i(e,y,t),i(e,b,t),m(T,e,t),i(e,f,t),m(w,e,t),i(e,cn,t),i(e,me,t),i(e,pn,t),i(e,ue,t),i(e,mn,t),i(e,he,t),i(e,un,t),i(e,A,t),i(e,hn,t),m(ge,e,t),i(e,gn,t),i(e,fe,t),i(e,fn,t),i(e,Me,t),i(e,Mn,t),m(ye,e,t),i(e,yn,t),i(e,be,t),i(e,bn,t),i(e,P,t),d(P,Ct),d(P,Pi),d(P,N),d(N,Bt),d(N,Di),d(N,kt),d(N,Fi),d(N,$t),d(N,Qi),d(N,E),d(E,zt),d(E,Ki),d(E,Rt),d(E,Oi),d(E,_e),d(_e,es),_n.m(Ho,_e),d(_e,Tn),i(e,wn,t),i(e,D,t),i(e,vn,t),i(e,F,t),i(e,Jn,t),i(e,Te,t),i(e,jn,t),i(e,R,t),i(e,Zn,t),m(we,e,t),i(e,In,t),i(e,ve,t),i(e,xn,t),m(Je,e,t),i(e,Un,t),i(e,je,t),i(e,Gn,t),i(e,Q,t),i(e,Wn,t),m(Ze,e,t),i(e,Nn,t),i(e,Ie,t),i(e,Cn,t),m(xe,e,t),i(e,Bn,t),i(e,Ue,t),i(e,kn,t),i(e,V,t),i(e,$n,t),i(e,Ge,t),i(e,zn,t),m(We,e,t),i(e,Rn,t),i(e,Ne,t),i(e,Vn,t),i(e,Ce,t),i(e,Xn,t),i(e,Be,t),i(e,qn,t),m(ke,e,t),i(e,En,t),i(e,$e,t),i(e,Hn,t),m(ze,e,t),i(e,Ln,t),i(e,Re,t),i(e,Yn,t),i(e,Ve,t),i(e,Sn,t),i(e,K,t),i(e,An,t),m(Xe,e,t),i(e,Pn,t),i(e,qe,t),i(e,Dn,t),m(Ee,e,t),i(e,Fn,t),i(e,He,t),i(e,Qn,t),m(Le,e,t),i(e,Kn,t),i(e,Ye,t),i(e,On,t),m(Se,e,t),i(e,ei,t),i(e,Ae,t),i(e,ti,t),m(Pe,e,t),i(e,ni,t),m(De,e,t),i(e,ii,t),i(e,Fe,t),i(e,si,t),m(Qe,e,t),i(e,oi,t),i(e,O,t),i(e,ai,t),i(e,Ke,t),i(e,li,t),m(Oe,e,t),i(e,ri,t),i(e,et,t),i(e,di,t),i(e,ee,t),i(e,ci,t),i(e,tt,t),i(e,pi,t),m(nt,e,t),i(e,mi,t),i(e,it,t),i(e,ui,t),i(e,te,t),i(e,hi,t),m(st,e,t),i(e,gi,t),i(e,ot,t),i(e,fi,t),m(at,e,t),i(e,Mi,t),i(e,ne,t),i(e,yi,t),m(lt,e,t),i(e,bi,t),i(e,rt,t),i(e,_i,t),m(dt,e,t),i(e,Ti,t),m(ct,e,t),i(e,wi,t),i(e,pt,t),i(e,vi,t),m(mt,e,t),i(e,Ji,t),i(e,ie,t),i(e,ji,t),i(e,ut,t),i(e,Zi,t),i(e,ht,t),i(e,Ii,t),m(gt,e,t),i(e,xi,t),i(e,I,t),m(ft,I,null),d(I,ts),d(I,Vt),d(I,ns),d(I,Xt),d(I,is),d(I,X),m(Mt,X,null),d(X,ss),d(X,qt),d(X,os),m(se,X,null),i(e,Ui,t),i(e,H,t),m(yt,H,null),d(H,as),d(H,Et),i(e,Gi,t),i(e,C,t),m(bt,C,null),d(C,ls),d(C,Ht),d(C,rs),d(C,Lt),i(e,Wi,t),m(_t,e,t),i(e,Ni,t),i(e,x,t),m(Tt,x,null),d(x,ds),d(x,Yt),d(x,cs),d(x,St),d(x,ps),d(x,q),m(wt,q,null),d(q,ms),d(q,At),d(q,us),m(oe,q,null),i(e,Ci,t),i(e,L,t),m(vt,L,null),d(L,hs),d(L,Pt),i(e,Bi,t),i(e,B,t),m(Jt,B,null),d(B,gs),d(B,Dt),d(B,fs),d(B,Ft),i(e,ki,t),m(jt,e,t),i(e,$i,t),i(e,U,t),m(Zt,U,null),d(U,Ms),d(U,Qt),d(U,ys),d(U,Kt),d(U,bs),d(U,G),m(It,G,null),d(G,_s),d(G,Ot),d(G,Ts),m(ae,G,null),d(G,ws),m(le,G,null),i(e,zi,t),i(e,Y,t),m(xt,Y,null),d(Y,vs),d(Y,en),i(e,Ri,t),i(e,k,t),m(Ut,k,null),d(k,Js),d(k,tn),d(k,js),d(k,nn),i(e,Vi,t),m(Gt,e,t),i(e,Xi,t),i(e,dn,t),qi=!0},p(e,[t]){const Wt={};t&2&&(Wt.$$scope={dirty:t,ctx:e}),se.$set(Wt);const $={};t&2&&($.$$scope={dirty:t,ctx:e}),oe.$set($);const S={};t&2&&(S.$$scope={dirty:t,ctx:e}),ae.$set(S);const Nt={};t&2&&(Nt.$$scope={dirty:t,ctx:e}),le.$set(Nt)},i(e){qi||(u(T.$$.fragment,e),u(w.$$.fragment,e),u(ge.$$.fragment,e),u(ye.$$.fragment,e),u(we.$$.fragment,e),u(Je.$$.fragment,e),u(Ze.$$.fragment,e),u(xe.$$.fragment,e),u(We.$$.fragment,e),u(ke.$$.fragment,e),u(ze.$$.fragment,e),u(Xe.$$.fragment,e),u(Ee.$$.fragment,e),u(Le.$$.fragment,e),u(Se.$$.fragment,e),u(Pe.$$.fragment,e),u(De.$$.fragment,e),u(Qe.$$.fragment,e),u(Oe.$$.fragment,e),u(nt.$$.fragment,e),u(st.$$.fragment,e),u(at.$$.fragment,e),u(lt.$$.fragment,e),u(dt.$$.fragment,e),u(ct.$$.fragment,e),u(mt.$$.fragment,e),u(gt.$$.fragment,e),u(ft.$$.fragment,e),u(Mt.$$.fragment,e),u(se.$$.fragment,e),u(yt.$$.fragment,e),u(bt.$$.fragment,e),u(_t.$$.fragment,e),u(Tt.$$.fragment,e),u(wt.$$.fragment,e),u(oe.$$.fragment,e),u(vt.$$.fragment,e),u(Jt.$$.fragment,e),u(jt.$$.fragment,e),u(Zt.$$.fragment,e),u(It.$$.fragment,e),u(ae.$$.fragment,e),u(le.$$.fragment,e),u(xt.$$.fragment,e),u(Ut.$$.fragment,e),u(Gt.$$.fragment,e),qi=!0)},o(e){h(T.$$.fragment,e),h(w.$$.fragment,e),h(ge.$$.fragment,e),h(ye.$$.fragment,e),h(we.$$.fragment,e),h(Je.$$.fragment,e),h(Ze.$$.fragment,e),h(xe.$$.fragment,e),h(We.$$.fragment,e),h(ke.$$.fragment,e),h(ze.$$.fragment,e),h(Xe.$$.fragment,e),h(Ee.$$.fragment,e),h(Le.$$.fragment,e),h(Se.$$.fragment,e),h(Pe.$$.fragment,e),h(De.$$.fragment,e),h(Qe.$$.fragment,e),h(Oe.$$.fragment,e),h(nt.$$.fragment,e),h(st.$$.fragment,e),h(at.$$.fragment,e),h(lt.$$.fragment,e),h(dt.$$.fragment,e),h(ct.$$.fragment,e),h(mt.$$.fragment,e),h(gt.$$.fragment,e),h(ft.$$.fragment,e),h(Mt.$$.fragment,e),h(se.$$.fragment,e),h(yt.$$.fragment,e),h(bt.$$.fragment,e),h(_t.$$.fragment,e),h(Tt.$$.fragment,e),h(wt.$$.fragment,e),h(oe.$$.fragment,e),h(vt.$$.fragment,e),h(Jt.$$.fragment,e),h(jt.$$.fragment,e),h(Zt.$$.fragment,e),h(It.$$.fragment,e),h(ae.$$.fragment,e),h(le.$$.fragment,e),h(xt.$$.fragment,e),h(Ut.$$.fragment,e),h(Gt.$$.fragment,e),qi=!1},d(e){e&&(n(v),n(y),n(b),n(f),n(cn),n(me),n(pn),n(ue),n(mn),n(he),n(un),n(A),n(hn),n(gn),n(fe),n(fn),n(Me),n(Mn),n(yn),n(be),n(bn),n(P),n(wn),n(D),n(vn),n(F),n(Jn),n(Te),n(jn),n(R),n(Zn),n(In),n(ve),n(xn),n(Un),n(je),n(Gn),n(Q),n(Wn),n(Nn),n(Ie),n(Cn),n(Bn),n(Ue),n(kn),n(V),n($n),n(Ge),n(zn),n(Rn),n(Ne),n(Vn),n(Ce),n(Xn),n(Be),n(qn),n(En),n($e),n(Hn),n(Ln),n(Re),n(Yn),n(Ve),n(Sn),n(K),n(An),n(Pn),n(qe),n(Dn),n(Fn),n(He),n(Qn),n(Kn),n(Ye),n(On),n(ei),n(Ae),n(ti),n(ni),n(ii),n(Fe),n(si),n(oi),n(O),n(ai),n(Ke),n(li),n(ri),n(et),n(di),n(ee),n(ci),n(tt),n(pi),n(mi),n(it),n(ui),n(te),n(hi),n(gi),n(ot),n(fi),n(Mi),n(ne),n(yi),n(bi),n(rt),n(_i),n(Ti),n(wi),n(pt),n(vi),n(Ji),n(ie),n(ji),n(ut),n(Zi),n(ht),n(Ii),n(xi),n(I),n(Ui),n(H),n(Gi),n(C),n(Wi),n(Ni),n(x),n(Ci),n(L),n(Bi),n(B),n(ki),n($i),n(U),n(zi),n(Y),n(Ri),n(k),n(Vi),n(Xi),n(dn)),n(M),g(T,e),g(w,e),g(ge,e),g(ye,e),g(we,e),g(Je,e),g(Ze,e),g(xe,e),g(We,e),g(ke,e),g(ze,e),g(Xe,e),g(Ee,e),g(Le,e),g(Se,e),g(Pe,e),g(De,e),g(Qe,e),g(Oe,e),g(nt,e),g(st,e),g(at,e),g(lt,e),g(dt,e),g(ct,e),g(mt,e),g(gt,e),g(ft),g(Mt),g(se),g(yt),g(bt),g(_t,e),g(Tt),g(wt),g(oe),g(vt),g(Jt),g(jt,e),g(Zt),g(It),g(ae),g(le),g(xt),g(Ut),g(Gt,e)}}}const sa='{"title":"Marigold Computer Vision","local":"marigold-computer-vision","sections":[{"title":"Available Pipelines","local":"available-pipelines","sections":[],"depth":2},{"title":"Available Checkpoints","local":"available-checkpoints","sections":[],"depth":2},{"title":"Depth Prediction","local":"depth-prediction","sections":[],"depth":2},{"title":"Surface Normals Estimation","local":"surface-normals-estimation","sections":[],"depth":2},{"title":"Intrinsic Image Decomposition","local":"intrinsic-image-decomposition","sections":[],"depth":2},{"title":"Speeding up inference","local":"speeding-up-inference","sections":[],"depth":2},{"title":"Maximizing Precision and Ensembling","local":"maximizing-precision-and-ensembling","sections":[],"depth":2},{"title":"Frame-by-frame Video Processing with Temporal Consistency","local":"frame-by-frame-video-processing-with-temporal-consistency","sections":[],"depth":2},{"title":"Marigold for ControlNet","local":"marigold-for-controlnet","sections":[],"depth":2},{"title":"Quantitative Evaluation","local":"quantitative-evaluation","sections":[],"depth":2},{"title":"Using Predictive Uncertainty","local":"using-predictive-uncertainty","sections":[],"depth":2},{"title":"Marigold Depth Prediction API","local":"diffusers.MarigoldDepthPipeline","sections":[],"depth":2},{"title":"Marigold Normals Estimation API","local":"diffusers.MarigoldNormalsPipeline","sections":[],"depth":2},{"title":"Marigold Intrinsic Image Decomposition API","local":"diffusers.MarigoldIntrinsicsPipeline","sections":[],"depth":2}],"depth":1}';function oa(z){return Yo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ua extends So{constructor(M){super(),Ao(this,M,oa,ia,Lo,{})}}export{ua as component}; | |
Xet Storage Details
- Size:
- 142 kB
- Xet hash:
- a292f8815a2605eb34f321fada1aa6e1f3311c2f1effbb99e0ec3feed8a049e0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.