(深度估计学习)Win11复现DepthFM

目录

论文链接:https://depthfm.github.io/

讲解链接:https://www.php.cn/faq/734404.html

1. 系统配置

本人系统:Win11 CUDA12.2 python3.11.5

这里附上几个CUDA安装链接:

  1. 安装CUDA和CudaNN
  2. CUDA Toolkit 12.2 Update 2 Downloads
  3. cuDNN Archive,这里我选择的:Download cuDNN v8.9.7 (December 5th, 2023), for CUDA 12.x
  4. windows下切换不同版本cuda

2. 拉取代码,配置环境

首先,克隆 github 仓库

shell 复制代码
git clone git@github.com:CompVis/depth-fm.git
cd depth-fm

下载权重

shell 复制代码
Invoke-WebRequest -Uri "https://ommer-lab.com/files/depthfm/depthfm-v1.ckpt" -OutFile "checkpoints/depthfm-v1.ckpt"                          

创建 conda 环境。这里我之前的环境是cuda11.8就失败了,然后换到了cuda12.2

python 复制代码
conda env create -f environment.yml

3.开始深度预测

python 复制代码
python inference.py \
   --num_steps 2 \
   --ensemble_size 4 \
   --img assets/dog.png \
   --ckpt checkpoints/depthfm-v1.ckpt

但是此时报错了:
OSError: runwayml/stable-diffusion-v1-5 does not appear to have a file named config.json.

在项目的issue中找到了解决方法:https://github.com/CompVis/depth-fm/issues/16

一句命令解决huggingface.co无法下载模型问题

在windows里面直接设置环境变量

接下来重新运行python inference.py

4.运行结果

相关推荐
YJlio7 小时前
Windows Sysinternals 文件工具学习笔记(12.11):综合实战——从磁盘告警到文件替换的一条龙排障
windows·笔记·学习
旖旎夜光9 小时前
Linux(4)(下)
linux·学习
敲敲了个代码12 小时前
从硬编码到 Schema 推断:前端表单开发的工程化转型
前端·javascript·vue.js·学习·面试·职场和发展·前端框架
我命由我1234515 小时前
SVG - SVG 引入(SVG 概述、SVG 基本使用、SVG 使用 CSS、SVG 使用 JavaScript、SVG 实例实操)
开发语言·前端·javascript·css·学习·ecmascript·学习方法
Fern_blog17 小时前
鸿蒙学习之路
学习
小智RE0-走在路上17 小时前
Python学习笔记(11) --数据可视化
笔记·python·学习
Asus.Blogs20 小时前
SSE + Resty + Goroutine + Channel 完整学习笔记
笔记·学习·golang
charlie11451419121 小时前
Git团队协作完全入门指南(上)
笔记·git·学习·教程·工程
迷茫的启明星21 小时前
Git命令学习
git·学习