NoneBot2 plugin for use AI to draw image
Project description
📖 介绍
使用第三方 API 的 NovelAI 绘图插件
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-aidraw
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-aidraw
pdm
pdm add nonebot-plugin-aidraw
poetry
poetry add nonebot-plugin-aidraw
conda
conda install nonebot-plugin-aidraw
打开 nonebot2 项目的 bot.py
文件, 在其中写入
nonebot.load_plugin('nonebot_plugin_aidraw')
⚙️ 配置
在 nonebot2 项目的.env
文件中添加下表中的必填配置
配置项 | 必填 | 说明 |
---|---|---|
AI_DRAW_API | 否 | 第三方 API 的地址 |
AI_DRAW_TOKEN | 是 | 第三方 API 的 token, 点击这里获取 |
AI_DRAW_COOLDOWN | 否 | 插件的冷却时间, 默认60秒 |
🎉 使用
指令表
指令 | 需要@ | 范围 | 说明 |
---|---|---|---|
绘画/画画/画图/作图/绘图/约稿 | 否 | 群聊/私聊 | 使用描述性文本生成图画, 可用参数见附表 |
以图绘图/以图生图/以图制图 | 否 | 群聊/私聊 | 在基准图像上使用描述性文本生成图画, 支持回复图片消息使用 |
附表
参数名 | 简写 | 全写 | 说明 |
---|---|---|---|
shape | -p | --shape | 可选 Portrait(纵向)、Landscape(横向)、Square(方形),默认图像为纵向, 支持缩写为 p、l、s |
scale | -c | --scale | 指示 AI 对提示的遵守程度,较大的值可以帮助 AI 更接近文本提示的整体意图 |
seed | -s | --seed | 随机种子。在其他条件不变的情况下,相同的种子代表生成相同的图 |
steps | -t | --steps | 定义 AI 从最初创建提示时应优化的迭代次数 |
ntags | -n | --ntags | 不需要的内容,可以列出希望 AI 避免的任何内容 |
使用示例:
绘图 描述文本 -p l --scale 12
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot-plugin-aidraw-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45c292b9a83f723cd9f26dc154c6e30afeaa58e658184d419adfcc2227fc4156 |
|
MD5 | c5fa09753333ee4a531151ee480f7ad1 |
|
BLAKE2b-256 | aa24ae2e9e53560066ff5332753438e99f338f55dbffc7ecbdf1d83540dcd081 |
Close
Hashes for nonebot_plugin_aidraw-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7057fe9094a5b6aabfb4b19ee3b972858383b6f45739d3ba76296fddb1337de |
|
MD5 | bae8e50e21b9fdb773dac6370d8d3a50 |
|
BLAKE2b-256 | 72473865ba4b8460565e9d46064620f4beef59e1ff0258dc19b95d86114aceda |