From fd742b30b4258106008a6af4d0dd4664904f8595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tolga=20Cang=C3=B6z?= Date: Fri, 31 May 2024 14:52:36 +0300 Subject: [PATCH] chore: Update MarigoldDepthPipeline checkpoint to prs-eth/marigold-lcm-v1-0 --- docs/source/en/using-diffusers/marigold_usage.md | 10 +++++----- .../pipelines/marigold/pipeline_marigold_depth.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/en/using-diffusers/marigold_usage.md b/docs/source/en/using-diffusers/marigold_usage.md index f8d08dcf32..cc26fdd2b8 100644 --- a/docs/source/en/using-diffusers/marigold_usage.md +++ b/docs/source/en/using-diffusers/marigold_usage.md @@ -49,14 +49,14 @@ This makes it easier to compare visualizations of the predictions across various ### Depth Prediction Quick Start -To get the first depth prediction, load `prs-eth/marigold-depth-lcm-v1-0` checkpoint into `MarigoldDepthPipeline` pipeline, put the image through the pipeline, and save the predictions: +To get the first depth prediction, load `prs-eth/marigold-lcm-v1-0` checkpoint into `MarigoldDepthPipeline` pipeline, put the image through the pipeline, and save the predictions: ```python import diffusers import torch pipe = diffusers.MarigoldDepthPipeline.from_pretrained( - "prs-eth/marigold-depth-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 + "prs-eth/marigold-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 ).to("cuda") image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg") @@ -140,7 +140,7 @@ Because Marigold's latent space is compatible with the base Stable Diffusion, it import torch pipe = diffusers.MarigoldDepthPipeline.from_pretrained( - "prs-eth/marigold-depth-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 + "prs-eth/marigold-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 ).to("cuda") + pipe.vae = diffusers.AutoencoderTiny.from_pretrained( @@ -158,7 +158,7 @@ As suggested in [Optimizations](torch2.0), adding `torch.compile` may squeeze ex import torch pipe = diffusers.MarigoldDepthPipeline.from_pretrained( - "prs-eth/marigold-depth-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 + "prs-eth/marigold-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 ).to("cuda") + pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True) @@ -287,7 +287,7 @@ import diffusers import torch pipe = diffusers.MarigoldDepthPipeline.from_pretrained( - "prs-eth/marigold-depth-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 + "prs-eth/marigold-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 ).to("cuda") image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg") diff --git a/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py b/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py index a602ba611e..8ccfec6d0f 100644 --- a/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py +++ b/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py @@ -56,7 +56,7 @@ Examples: >>> import torch >>> pipe = diffusers.MarigoldDepthPipeline.from_pretrained( -... "prs-eth/marigold-depth-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 +... "prs-eth/marigold-lcm-v1-0", variant="fp16", torch_dtype=torch.float16 ... ).to("cuda") >>> image = diffusers.utils.load_image("https://marigoldmonodepth.github.io/images/einstein.jpg")