An FREE AI image generation plugin for NoneBot2 using Akash Network.
Project description
NoneBot Plugin AkashGen
一个使用 Akash Network 为 NoneBot2 提供 AI 图像生成功能的插件。
功能
- 通过简单的命令调用 AI 进行画图。
- 支持自定义参数,如负面提示词、采样器和调度器。
- 内置速率限制和权限控制。
- 显示生成任务的详细信息(GPU、地理位置、耗时等)。
安装
通过 pip 或 nb-cli 安装:
pip install nonebot-plugin-akashgen
nb plugin install nonebot-plugin-akashgen
配置
在你的 NoneBot 项目的 .env 或 .env.* 文件中添加以下配置项:
# Akash Network API Base URL (默认为官方地址)
# AKASH_API_BASE_URL="https://gen.akash.network"
# 请求超时时间 (秒)
# AKASH_REQUEST_TIMEOUT=60
# 最大重试次数
# AKASH_MAX_RETRIES=3
# 任务状态轮询间隔 (秒)
# AKASH_POLL_INTERVAL=1.0
# 默认负面提示词
# AKASH_NEGATIVE_PROMPT=""
# 默认采样器
# AKASH_SAMPLER="dpmpp_2m"
# 默认调度器
# AKASH_SCHEDULER="sgm_uniform"
# 最大提示词长度
# AKASH_MAX_PROMPT_LENGTH=500
# 命令冷却时间 (秒)
# AKASH_COOLDOWN_SECONDS=30
# 是否显示队列信息
# AKASH_ENABLE_QUEUE_INFO=True
# 是否仅限超级用户使用
# AKASH_SUPERUSER_ONLY=False
# 允许使用的群组列表 (留空则不限制)
# AKASH_ALLOWED_GROUPS=[]
# 禁用用户列表
# AKASH_BLOCKED_USERS=[]
使用
/draw <描述>: 生成一张图片。/画图 <描述>:/draw的别名。
高级用法:
你可以在命令中使用参数来微调生成过程:
-n <负面提示词>: 指定不希望在图片中出现的内容。-s <采样器>: 指定使用的采样器。-c <调度器>: 指定使用的调度器。
示例:
/draw a beautiful sunset over the mountains/画图 一只可爱的猫/draw -n blurry,ugly -s dpmpp_sde a robot holding a flower
管理命令:
/draw_help: 显示帮助信息。/draw_status: (仅限超级用户) 显示插件的运行状态。
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_akashgen-0.1.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_akashgen-0.1.0.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
523c81e13369488bda6d3bcce771bc3d549592f29ab761ed0e5e4ee222669b2b
|
|
| MD5 |
13f7a0df67b30424d033f7df38c86b3b
|
|
| BLAKE2b-256 |
4732bfc169be1f6c1133e90d2fc09ba7279493bb5bc9f9c565f928a0e71998aa
|
File details
Details for the file nonebot_plugin_akashgen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_akashgen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36287f71301e7b732ec0da818999bf0c46e73a36eee601b533444faa68ed00be
|
|
| MD5 |
7b8ccb21e65bdeeed45b3e675337e44b
|
|
| BLAKE2b-256 |
7baa75fb2764ebcadb1d41ff92ffa7c9af63e9327b968443076faf29bd228e25
|