ComfyUI Extension: Kraken Discord Bot
All-in-one Discord bot node for AI image generation. Simple setup - just add token, select model, and queue. Includes style presets, rate limiting, and queue management.
Custom Nodes (0)
README
Kraken Discord Bot
A standalone ComfyUI custom node that turns your ComfyUI instance into a Discord image generation bot. No complex workflows needed - just one node that handles everything!

Features
- All-in-One Node: Single node handles Discord bot, image generation, and response
- Simple Setup: Just add your Discord token, select a model, and queue
- Discord Commands: Users can generate images with
!generate <prompt> - Style Presets: Built-in styles (anime, photorealistic, fantasy, etc.)
- Parameter Control: Users can customize steps, CFG, size, seed via flags
- Rate Limiting: Configurable per-user cooldown to prevent spam
- Queue Management: Handles multiple requests with queue position feedback
- Persistent Config: Settings are saved and restored between sessions
Installation
Method 1: Git Clone (Recommended)
cd ComfyUI/custom_nodes
git clone https://github.com/krakenunbound/kraken-discord-bot.git
cd kraken-discord-bot
pip install -r requirements.txt
Method 2: Download ZIP
- Download this repository as ZIP
- Extract to
ComfyUI/custom_nodes/kraken-discord-bot - Install requirements:
pip install discord.py requests
Method 3: ComfyUI Manager (Coming Soon)
- Open ComfyUI Manager
- Search for "Kraken Discord Bot"
- Click Install
Setup
1. Create a Discord Bot
- Go to Discord Developer Portal
- Click "New Application" and give it a name
- Go to "Bot" section and click "Add Bot"
- Under "Privileged Gateway Intents", enable Message Content Intent
- Copy the bot token (you'll need this)
2. Invite Bot to Your Server
- Go to "OAuth2" > "URL Generator"
- Select scopes:
bot - Select permissions:
Send Messages,Attach Files,Read Message History - Copy the generated URL and open it to invite the bot
3. Configure the Node
- Add the "Kraken Discord Bot (All-in-One)" node to your workflow
- Paste your Discord token in the
discord_tokenfield - Select a checkpoint model
- Configure default settings (steps, CFG, size)
- Queue the workflow - the bot will start and wait for commands!
Discord Commands
Generate Images
!generate <prompt>
!gen <prompt>
!g <prompt>
Optional Flags
--negative <text> What to avoid in the image
--steps <1-100> Number of generation steps (default: 20)
--cfg <1-30> Guidance scale (default: 7)
--width <512-2048> Image width (default: 1024)
--height <512-2048> Image height (default: 1024)
--seed <number> Specific seed for reproducibility
--style <name> Style preset (see below)
Size Presets
Use with --width:
square(1024x1024)landscape(1216x832)portrait(832x1216)wide(1344x768)tall(768x1344)
Style Presets
photorealistic- Realistic photo styleanime- Anime/manga stylefantasy- Epic fantasy artscifi- Science fictionartistic- Painterly stylecinematic- Movie-like shotscute- Adorable kawaii styledark- Dark and moodyvintage- Retro aestheticminimalist- Clean and simple
Examples
!generate a majestic dragon flying over mountains
!gen cyberpunk city at night --style scifi --steps 25
!g portrait of a warrior --width portrait --style fantasy
!generate cute cat --negative ugly, blurry --seed 12345
Other Commands
!help - Show help message
!status - Show bot status and queue
Node Settings
| Setting | Description | Default | |---------|-------------|---------| | discord_token | Your Discord bot token | (required) | | checkpoint | Model to use for generation | (required) | | default_negative | Default negative prompt | ugly, blurry... | | default_steps | Default generation steps | 20 | | default_cfg | Default CFG scale | 7.0 | | default_width | Default image width | 1024 | | default_height | Default image height | 1024 | | sampler_name | Sampler to use | euler_ancestral | | scheduler | Scheduler to use | normal | | denoise | Denoise strength | 1.0 | | rate_limit_seconds | Cooldown between requests per user | 30 | | max_queue_size | Maximum pending requests | 10 | | allowed_channels | Restrict to specific channel IDs | (all) |
Configuration File
Settings are automatically saved to:
kraken-discord-bot/kraken_discord/kraken_discord_config.json
Your Discord token and all settings persist between restarts.
Troubleshooting
Bot not responding
- Make sure "Message Content Intent" is enabled in Discord Developer Portal
- Check that the bot has permissions in the channel
- Verify the token is correct
Generation errors
- Ensure you have a valid checkpoint selected
- Check ComfyUI console for error messages
- Make sure you have enough VRAM
Rate limiting
- Users must wait 30 seconds (default) between requests
- Adjust
rate_limit_secondsto change this
Requirements
- ComfyUI (latest version recommended)
- Python 3.10+
- discord.py >= 2.0
- A Discord bot token
- GPU with sufficient VRAM for your chosen model
License
MIT License - feel free to use, modify, and distribute!
Credits
- Built for ComfyUI
- Uses discord.py for Discord integration
- Kraken theme styling included
Made with love for the AI art community!