当前位置: 首页 > news >正文

HiNeRV 隐式神经编码环境搭建

由于直接下载 torch2.1.0,torchvision0.16.0 已不可得,只能手动下载
可以去该网址下载对应版本:https://download.pytorch.org/whl/torch_stable.html
torch下载地址:https://download.pytorch.org/whl/cu121/torch-2.1.0%2Bcu121-cp310-cp310-linux_x86_64.whl
torchvision下载地址:https://download.pytorch.org/whl/cu121/torchvision-0.16.0%2Bcu121-cp310-cp310-linux_x86_64.whl 
torchaudio下载地址:https://download.pytorch.org/whl/cu121/torchaudio-2.1.0%2Bcu121-cp310-cp310-linux_x86_64.whl

# 克隆代码
git clone https://github.com/hmkx/HiNeRV.git
cd HiNeRV
# 创建环境
conda create -n hinerv python=3.10
conda activate hinerv
# 安装torch
# torch, torchvision, torchaudio直接下载不可用,需要手动下载文件并安装
pip install torch-2.1.0+cu121-cp310-cp310-linux_x86_64.whl
pip install torchvision-0.16.0+cu121-cp310-cp310-linux_x86_64.whl
pip install torchaudio-2.1.0+cu121-cp310-cp310-linux_x86_64.whl
# 安装依赖
pip install accelerate==0.23.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install deepspeed==0.11.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pytorch-msssim==1.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install timm==0.9.7 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install torchac==0.9.3 -i https://pypi.tuna.tsinghua.edu.cn/simple

安装 torch, torchvision, torchaudio 的时候可能会报如下错误:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/filelock/

原因是:即使下载到本地,然后安装 .whl 文件,pip 仍然会去 pypi.org 下载依赖项(如 filelock、typing_extensions 等),而当前网络无法稳定访问 PyPI,导致超时失败。
解决方案如下:

pip install torch-2.1.0+cu121-cp310-cp310-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip install torchvision-0.16.0+cu121-cp310-cp310-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip install torchaudio-2.1.0+cu121-cp310-cp310-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

安装好 torch 之后,继续安装其他依赖
安装好其他依赖之后,import torch时可能会有报错:

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.6 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

使用如下方法解决:

pip uninstall numpy
pip install numpy==1.26.4 -i https://pypi.tuna.tsinghua.edu.cn/simple

Training

# 对显存需求极大,需要多卡训练
bash train_hinerv.sh

Evaluation

bash eval_hinerv.sh
http://www.jsqmd.com/news/359425/

相关文章:

  • Avalonia
  • 哪些招聘软件平台效果好?最新招聘平台权威排行
  • 上海黄金回收真实探店:终于找到靠谱的上海附近回收黄金店
  • RIFE 插帧模型环境搭建
  • PostgreSQL 中 pg_wal 目录里的 .ready .done .history 文件的生命周期
  • 中国招聘行业20年演进白皮书——从信息展示到AI智能,易直聘引领第四代招聘革命
  • csc(0x0006.d75a14f4) higher than block scn(0x0000.00000000)--故障处理--obet
  • Docker 安装 OpenClaw 报错排查:如何解决Gateway auth is set to token, but no token is configured``Missing config
  • DCVC-RT 深度条件视频压缩环境搭建
  • 20260208
  • Docker 安装 OpenClaw 报错排查完全手册(续):如何解决pairing required,`EACCES: permission denied`Docker 拉取镜像提示 `denied
  • 股票融资融券交易时间限制一览与制度说明
  • ​ 云游戏画质与体验天花板:从RTX 4090到8ms延迟,定义“最好的云游戏平台”标准
  • 知云题库:保健按摩师高分攻略,为何他们刷题效率翻倍?
  • 三维扫描数据能直接用吗?3DeVOK Studio让数据处理效率提升300%!
  • Java 循环结构之 do-while 语句新手核心学习笔记
  • VastBase 高可用集群完整操作报告
  • 37-学习笔记尚硅谷数仓搭建-ADS层分析并以各品牌商品下单统计为例
  • 学习记录260208
  • Helm Chart 是什么?
  • P8340 [AHOI2022] 山河重整 题解
  • wc 听课总结
  • 强化学习中的单个回合的回报估计动作值和所有回合的回报估计动作值的理解及exploring starts条件
  • 《凌微经 · 理悖相涵》第七章 形性一体——本然如是之元观
  • AX3000T刷机教程
  • 听《卡农》有感 - Mars
  • 深入解析:FPGA纯verilog实现JESD204B协议,基于AD9250数据接收,提供3套工程源码和技术支持
  • 局域网内如何互相ping通?
  • python使用pip安装jupter报错,并且用conda安装jupter后,启动jupter也报一样的错误:checking the latest version of pip...如何解决?
  • 【SQL笔记1】SQL真正的执行顺序