omnivision安装及使用文档

一、安装相关指令

  • 安装torch及相关库
# 创建omni环境
conda create -n omni python=3.9
conda activate omni

# 安装torch及依赖库
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 
pip install einops timm pillow
pip install transformers accelerate diffusers
pip install huggingface_hub
pip install sentencepiece bitsandbytes protobuf record
  • 安装omni
    进入omni下载网页下载电脑对应的omni文件 : https://nexaai.github.io/nexa-sdk/whl/cu124

在这里插入图片描述

安装cmake后进行本地编译

# 事先下载安装可以使用清华源安装其他库,
CMAKE_ARGS="-DGGML_CUDA=ON -DSD_CUBLAS=ON" pip install /home/wu/下载/whl/nexaai-0.0.9.7-cp39-cp39-linux_x86_64.whl --prefer-binary  --extra-index-url https://pypi.org/simple --no-cache-dir  -i https://pypi.tuna.tsinghua.edu.cn/simple/


# 没有预先下载也可以使用 进行安装
CMAKE_ARGS="-DGGML_CUDA=ON -DSD_CUBLAS=ON" pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/cu124  --extra-index-url https://pypi.org/simple  --no-cache-dir


安装完成后可以使用运行
相关链接 :https://nexa.ai/NexaAI/omniVLM/gguf-q4_K_M/readme

nexa run omniVLM 

二、模型下载

  • 官网:https://nexa.ai/
  • 官网下载模型地址:https://nexa.ai/NexaAI/omnivision-preview/gguf-fp16/file
  • huggingface对应模型网址:https://huggingface.co/NexaAIDev/OmniVLM-968M/tree/main
    下载的模型放入电脑隐藏文件夹下:/home/wu/.cache/nexa/hub/official/omniVLM
    在这里插入图片描述

运行模型

  • 运行指令
nexa run omniVLM 

更多运行方式参考:https://docs.nexa.ai/sdk/cli-reference

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

五小白

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值