Setting it all up
Prerequisites
Python 3.10+ | A recent version of Python. Can be installed from the official website or your favourite package manager. |
ComfyUI and models | Installed and running ComfyUI server. A downloaded Flux model, VAE and the coresponding T5 and L text encoders. For detailed instructions visit the ComfyUI repo. |
Git | Can be installed from the official website or your favourite package manager. |
Installation
- Clone the ComfyUI Telegram Bot repo from Github:
git clone https://github.com/lovec741/comfyui_telegram_bot.git
- Open the cloned repo:
cd comfyui_telegram_bot
- Install dependencies:
pip install -r requirements.txt
- Now we need to configure the bot.
Configuration
Copy the config.example.yaml
and rename it to config.yaml
All of the configuration takes place in the config.yaml
file
What needs to be changed:
telegram_bot | |
token |
To get this token message @BotFather on Telegram and create a bot. |
image_generation | |
server_url and websocket_url |
Can be left as is. You will need to change this if the ComfyUI server is not running on your local machine or you changed the default port. |
model |
The name of your model located in the models/unet in your ComfyUI installation. (By default only UNET models are supported) |
vae |
The name the VAE located in the models/vae in your ComfyUI installation. |
clip_t5 |
The name the T5 text encoder located in the models/clip in your ComfyUI installation. |
clip_l |
The name the L text encoder located in the models/clip in your ComfyUI installation. |
save_images |
Whether to store all generated images in the ComfyUI output folder. |
placeholder_image_font_filepath |
Here you can customize the font if you want. For Windows is has to be changed to Windows path C:/Windows/Fonts/arial.ttf |
prompt_enhancement | |
service |
Service used to generate the enhanced prompts. Currently only "anthropic" is supported. |
api_key |
API key for the prompt generation service. For "anthropic" its the API key you can find in your Anthropic Console. |
And thats it! Now we can start the bot!
If you are interested in configuring the bot further visit the Customization and Extensibility page.
Running the Bot
The Bot can be started by executing the run.py
script.
python3 run.py