Depth-Anything icon indicating copy to clipboard operation
Depth-Anything copied to clipboard

how load model form local host?

Open machine52vision opened this issue 1 year ago • 5 comments

how load model form local host?

machine52vision avatar Jan 24 '24 03:01 machine52vision

We have added a solution in the README: https://github.com/LiheYoung/Depth-Anything#no-network-connection-cannot-load-these-models

LiheYoung avatar Jan 24 '24 08:01 LiheYoung

我们在自述文件中添加了一个解决方案:https://github.com/LiheYoung/Depth-Anything#no-network-connection-cannot-load-these-models

本地加载模型时提示缺少from_pretrained()函数参数,一个config文件?

xxxxzsxxxx avatar Jan 24 '24 12:01 xxxxzsxxxx

@xxxxzsxxxx You should also download the config file in the huggingface repo.

LiheYoung avatar Jan 24 '24 12:01 LiheYoung

@LiheYoung I have stored the config and checkpoint files under the folder checkpoints/depth_anything_vitx14,Where should I put the checkpoints folder? DepthAnything? Uploading clipbord_1706248272473.png…

jx-99321 avatar Jan 26 '24 05:01 jx-99321

You can simply put the checkpoints folder under the current path, e.g., the Depth-Anything root path. Then you can load our models via:

depth_anything = DepthAnything.from_pretrained('./checkpoints/depth_anything_vitl14', local_files_only=True)

LiheYoung avatar Jan 26 '24 10:01 LiheYoung