Skip to main content

An FREE AI image generation plugin for NoneBot2 using Akash Network.

Project description

NoneBot Plugin AkashGen

License PyPI

一个使用 Akash Network 为 NoneBot2 提供 AI 图像生成功能的插件。

功能

  • 通过简单的命令调用 AI 进行画图。
  • 支持自定义参数,如负面提示词、采样器和调度器。
  • 内置速率限制和权限控制。
  • 显示生成任务的详细信息(GPU、地理位置、耗时等)。

安装

通过 pipnb-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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_akashgen-0.1.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_akashgen-0.1.1-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_akashgen-0.1.1.tar.gz.

File metadata

  • Download URL: nonebot_plugin_akashgen-0.1.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nonebot_plugin_akashgen-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b24bfd9042395302074bc58342c9c6372a0537eccdc13d4c6a5faaa0c899c178
MD5 352d234e80d478f7787d40ddb5be6c32
BLAKE2b-256 a313cc0792222b987d9e019464d44d858e7d76c30a8475301ca64d2e9b3e7e33

See more details on using hashes here.

File details

Details for the file nonebot_plugin_akashgen-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_akashgen-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd376e19cab5bf7de7a453b3fdaf56dc5019240e841b1be1a77ced450cf61bca
MD5 061084c7d5ab08b6676368e3ae31feec
BLAKE2b-256 4f8e6abf7c9d56d40392716b11856e4e3e29a080ccd6b4db342aad72881c62df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page