macos 上运行deepseek janus-pro

160 阅读2分钟

使用 deepseek 的 janus-pro 的模型来进行绘图和图片生成文字,效果如下图所示

图片

部署这个模型是参考这个 repo:github.com/deepseek-ai…

图片

点击这个 JanusFlow 可以看到如下界面:

图片

可以看到example 的例子,一会部署的时候会使用到:

图片图片接下来开始操作:

首先需要在 macos 上安装好 comfyUI,接下来安装ComfyUI Manager

cd ~/ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git

安装完后重启 comfyUI,可以在顶部右侧看到 Manger图标

图片

点击 Manager,可以看到配置面板

图片

我目前已经安装了这些功能

图片

另外需要下载好 Model:

图片

图片

下载好后既可以进行图形生成工作了:

具体使用的文件在这个 github 上:github.com/CY-CHENYUE/…

在 ComfyUi 界面上,点击 open 选择ComfyUi Janus-Pro-workflow 图片即可,这里如果报错了,则需要进行安装 miss 组件,如下图所示的图片:

图片

图片

安装完后会提示重启,重启之后打开上面的图片即可。

默认推荐的生成的图片就是一个小女孩的提示,我们可以生成一个可爱的小狐狸,提示词如下所示:

A cute and adorable baby fox with big brown eyes, autumn leaves in the background enchanting,immortal,fluffy, shiny mane,Petals,fairyism,unreal engine 5 and Octane Render,highly detailed, photorealistic, cinematic, natural colors.

生成的小狐狸是这个样子的

图片

接下来的一部分工作流我们可以看到是图形识别成文字

图片

我们上传了一个照片,让模型生成文字描述

The image shows a person with long, straight, blonde hair. 
The background is a plain, dark gray color. 
The person's skin is fair, 
and they have a fair complexion. 
Their eyes are blue, 
and they are looking directly at the camera.
 The overall setting appears to be a studio
  with a neutral backdrop.

中文意思就是:

图片

描述比较符合。

这里实验的状态是 M3Max+48g 显存,第一次生成图片花了 600 多秒,后面正常了

图片

gpu 的占用达到了百分之九十有点慢

一次生成四张,在 10 秒之内:

图片

运行的装备是:

图片

注意因为运行在 macos 上是需要 修改代码的,不能直接运行:

具体代码在下面这个位置:

github.com/CY-CHENYUE/…

本文使用 文章同步助手 同步