A simplified interface to ComfyUI through Discord
Go to file
2025-03-10 12:58:11 -06:00
conf Added better logging, added allowed and ignored users options 2025-03-04 14:57:40 -07:00
lib Reduced text logging, added SQLite3 prompt and statistics logging, reading and measuring execution time from ComfyUI 2025-03-10 12:58:11 -06:00
.gitignore Reduced text logging, added SQLite3 prompt and statistics logging, reading and measuring execution time from ComfyUI 2025-03-10 12:58:11 -06:00
bot.py Reduced text logging, added SQLite3 prompt and statistics logging, reading and measuring execution time from ComfyUI 2025-03-10 12:58:11 -06:00
comfyui-discord.sh Initial code commit, basic functionality working 2025-03-04 11:19:34 -07:00
README.md Update README.md 2025-03-04 11:41:34 -07:00

comfyui-discord

A simplified interface to ComfyUI through Discord

Quick Start
  1. Run comfyui-discord.sh to create settings.json

  2. Modify settings.json, e.g.

    {
        "token": "Your Discord bot's token here"
        "api_url": "http://127.0.0.1:8188",
        ...
    }
    

    ...where token is set to your Discord bot's token and api_url is the address to your running & accessible ComfyUI web interface.

  3. Set a channel's topic to example-workflow

  4. Run comfyui-discord.sh

  5. Send a message in that channel, e.g.

    steps25 cfg8 width512 height480 > a bowl of fruit on a wooden desk -red, strawberry, red apple, raspberry, metal x4
    
  6. Observe the bot's response with attachment

Explanation

The message above is broken into a several compontents:

  • steps - 25
  • cfg - 8
  • width - 512
  • height - 480
  • positive: "a bowl of fruit on a wooden desk"
  • negative: "red, strawberry, red apple, raspberry, metal"
  • repeat_n_times: 4

...and is passed to ComfyUI by loading example-workflow.json and making text replacements, e.g.

  • __STEPS__ with 25
  • __POSITIVE__ with a bowl of fruit on a wooden desk

The example-workflow_settings.json file can be used to provide default values that are left unspecified in the user's message. For example, keys width and height can be set in example-workflow_settings.json and used for direct replacements of __WIDTH__ and __HEIGHT__ in the API workflow JSON body.