5 min read
小孩子才做选择,语言大模型我全都要!

AI元年以来,各家大模型百花齐放,有开源的也有闭源的,有垂直领域的模型,也有泛用途模型,有对中文支持好的,也有对英文支持更好的模型,,有些便宜有些贵…,着实让人眼花缭乱。
作为消费者,普通设计师,我们更关注的是如何利用这些大模型资源,辅助我们设计。
设计师如何使用语言大模型?
关于如何使用,网络上已经有太多教程了,大家可以回顾以下“一舟博士”的课程(不是🙅)。我是这样使用的:
- 日常知识问答
- 知识库管理
- 帮助AI绘图。接入comfyui,帮我写提示词,完成剧本等。 本文我重点讲comfyui如何接入“百模”,作为AI绘图的第二大脑。日常知识问题和知识库管理放在后续介绍。
系统架构
说系统架构,概念有点太大了。无非就是利用各种开源工具,把整个工作流串联起来。
大模型申请或使用
线上大模型
openai、阿里、百度、清华智谱、科大讯飞都提供大模型的API接口,大家自行申请即可。
本地大模型
本地的可运行大模型也有很多,包括ChatGLM系列,MOSS,baichuan系列等,关于本地大模型如何部署,可以使用docker方式一键部署,这个我下次再讲。
one-api部署
安装和部署
one-api相当于一个管家,把各家的API包括本地的统一管理起来,我们使用统一的接口调用即可,非常方便。
官方github地址https://github.com/songquanpeng/one-api
有详细的安装教程,我使用的docker安装方式,直接部署在我的nas服务器上,通过内网ip访问接口。安装完成后会获得一个webui访问地址http://192.168.1.22:3000
使用
安装完成后,访问oneapi web地址,即可进行管理。
新建渠道
建立API渠道,很简单。渠道的模型,可以查看各家模型的使用文档获取,oneapi已经内置了大部分模型名称。这里注意,模型名称必须要准确。
新建令牌
令牌相当于key,作为访问认证。
调用oneapi接口
一切配置好后,oneapi的地址和令牌就可以作为应用调用的接口了。
api_url: http://192.168.1.22:3000 #举例
api_key:sk-adadsknjkhjgkjkahdkajskdnmljskf #举例
ComfyUI调用
为了调用one-api接口,我根据别人代码,重新写了一个node节点,使用非常简单。ComfyUI-LLMs:https://github.com/leoleelxh/ComfyUI-LLMs
安装ComfyUI-LLMs
安装方法跟其他插件一样,但是目前只能通过url安装,因为还没上架到comfyui官方市场。
配置
所有配置在setting.yaml文件中,用vscode或者txt打开进行配置即可,把上面one-api的信息填进去即可。
使用ComfyUI-LLMs
配置完成后,启动comfyui,点击新建节点,就可以找到插件了。
添加节点后,可以看到我已经内置了系统提示词,当然你也可以删掉自己写,然后在填写用户提示词,就可以让AI帮你完善提示词了,不需要自己想破头去写提示词。
当然,还有其他玩法,例如让大模型写小说等。
还有我前几天发的,用于漫画的创作。【AI辅助设计】只需要一句话就可以生成漫画 不过,下面这个截图还是用mixlab的gpt节点,还没接入我自己的节点插件。
流程案例
以下是我结合字节的闪电模型(【AI辅助设计】就在刚刚!字节发布SDXL-lightning!没有最快只有更快!) 全自动快速绘图流程,出图如闪电快速,而且质量还很好。
AI大模型+风格提示词
大模型给出详细描述词,加上风格提示。
可以看到,我只输入了女机器人,AI给我非常细节地描述提示词。
Image Description: The image depicts a female robot with a sleek, humanoid design. The body of the robot is made of a shining silver metal, reflecting a futuristic and high-tech aesthetic. The face of the robot is distinctly feminine, with an expressionless, smooth surface that hints at facial features without fully mimicking human detail, including two visual sensors where the eyes would be, a subtle indication of a nose, and a thin, straight line for a mouth to suggest lips.
The head is framed with what appears to be short, metallic hair that conforms to the shape of the robot's skull. This robot is equipped with two articulated arms and hands designed with intricate joints and panels, allowing for a wide range of motion and dexterity. The torso is slender and tapers at the waist before connecting to its two-legged lower section, which is built for balance and agility.
The female robot stands in a neutral posture within a modern lab environment with diffuse, soft lighting that casts gentle shadows across her form. Around her, there are hints of advanced technology, such as holographic displays and diagnostic equipment, indicating that this robot is within a setting where it might either be under development or performing tasks that require intelligence and precision. The robot does not carry any overt gender markers such as clothing or accessories, but there is a subtle elegance to its design, imbuing it with an understated femininity.
最终给我的图
关注我公众号(设计小站):sjxz00,获取更多AI辅助设计和设计灵感趋势。