政安晨的个人主页:************政安晨****************
欢迎 👍点赞✍评论⭐收藏
希望政安晨的博客能够对您有所裨益,如有不足之处,欢迎在评论区提出指正!
目录
[安装 Gradio(UI)](#安装 Gradio(UI))
[运行 Janus Pro UI](#运行 Janus Pro UI)
以后铁子们玩开源大模型就朝着多模态的方面进发吧,未来开源的多模态大模型不在多模态领域整出点花花儿,都不好意思说自己是搞开源的。🤭🤭🤭
今天我们一起部署一下这个Janus-Pro-7B的模型,正好手头缺一款轻量级自由出图助手!嘻嘻。

下载项目
git clone https://github.com/deepseek-ai/Janus.git
网速慢的小伙伴可以考虑镜像站点。

创建虚拟环境
conda create -n janus python=3.10.6 -y


进行项目目录:

安装项目依赖
pip install -e .


耐心等待。
为确保与 GPU 兼容,请安装支持 CUDA 的最新版本的 PyTorch、TorchVision 和 TorchAudio。即使已经安装了 PyTorch,您在运行 Web 应用程序时也可能会遇到问题,因此最好更新:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
或者这样:
pip uninstall torch torchvision torchaudio -y
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
(当然,如果更新过了也可以不执行上面指令)


这样依赖库就安装成功了。
安装 Gradio(UI)
pip install gradio



完成安装。
运行 Janus Pro UI
python demo/app_januspro.py
首次运行时会下载模型:

差不多20G大小,建议准备足够的空间。



或者这样(指定GPU):
python demo/app_januspro.py --device cuda


好了,可以好好用了。
多模态大模型的价值在哪里?

以多模态的开源权重,驱动具体事务问题的解决。
