回老家做PHP网站网站开发项目团队人员
目录
- 1. 系统配置
 - 2. 拉取代码,配置环境
 - 3.开始深度预测
 - 4.运行结果
 
论文链接:https://depthfm.github.io/
讲解链接:https://www.php.cn/faq/734404.html
1. 系统配置
本人系统:Win11 CUDA12.2 python3.11.5
这里附上几个CUDA安装链接:
- 安装CUDA和CudaNN
 - CUDA Toolkit 12.2 Update 2 Downloads
 - cuDNN Archive,这里我选择的:Download cuDNN v8.9.7 (December 5th, 2023), for CUDA 12.x
 - windows下切换不同版本cuda
 
2. 拉取代码,配置环境
首先,克隆 github 仓库
git clone git@github.com:CompVis/depth-fm.git
cd depth-fm
 
下载权重
Invoke-WebRequest -Uri "https://ommer-lab.com/files/depthfm/depthfm-v1.ckpt" -OutFile "checkpoints/depthfm-v1.ckpt"                          
 
创建 conda 环境。这里我之前的环境是cuda11.8就失败了,然后换到了cuda12.2
conda env create -f environment.yml
 
3.开始深度预测
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.运行结果

