No description
Add detailed logging throughout ComfyUI client and plugin to aid troubleshooting of API interactions and workflow execution. Implement specific Matrix error handling with graceful degradation for robust operation. |
||
---|---|---|
comfyui | ||
.gitignore | ||
.markdownlint.yaml | ||
.pre-commit-config.yaml | ||
base-config.yaml | ||
LICENSE | ||
maubot.yaml | ||
pyproject.toml | ||
README.md | ||
uv.lock |
ComfyUI Maubot plugin
Matrix bot for AI image generation via ComfyUI. Send text prompts, get images back with rate limiting and access control.
Quick start
- Build:
zip -r comfyui.mbp maubot.yaml base-config.yaml comfyui/
- Upload to Maubot and create bot instance
- Configure ComfyUI URL and workflow name
- Use:
!generate <prompt>
Configuration
Required settings:
comfyui_url
: ComfyUI instance URL (e.g.http://localhost:8188
)workflow_name
: Saved workflow name in ComfyUI
Optional settings:
rate_limit
: Per-user limits (default: 5 per 24 hours)allow_list
/deny_list
: User access controlmessages
: Custom denial/error messagesreactions
: Status emoji (👀→⚙️→✅/❌)
Example config:
comfyui_url: "http://localhost:8188"
workflow_name: "default_txt2img"
rate_limit:
max_generations: 10
hours: 24
allow_list: ["@admin:example.org"]
Features
- Text-to-image generation with ComfyUI workflows
- Sequential request queueing with emoji status updates
- Per-user rate limiting with rolling time windows
- Allow/deny lists (allow_list bypasses rate limits)
- Configurable messages and reactions
Development
Structure: base.py
(queueing/limits), client.py
(ComfyUI API), plugin.py
(Matrix handlers), config.py
(settings)
Dependencies: aiohttp
, pillow
Licensed under Apache 2.0.