https://github.com/daxcay/comfyui-tg
Comfy UI in Telegram
https://github.com/daxcay/comfyui-tg
comfyui comfyui-nodes comfyui-workflow telegram-bot telegram-chat
Last synced: 6 months ago
JSON representation
Comfy UI in Telegram
- Host: GitHub
- URL: https://github.com/daxcay/comfyui-tg
- Owner: daxcay
- License: mit
- Created: 2024-09-13T03:25:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-28T09:45:12.000Z (10 months ago)
- Last Synced: 2025-03-20T19:17:26.174Z (7 months ago)
- Topics: comfyui, comfyui-nodes, comfyui-workflow, telegram-bot, telegram-chat
- Language: JavaScript
- Homepage:
- Size: 160 KB
- Stars: 16
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About The Project
This project enables the use of ComfyUI Workflows in Telegram.
> [!IMPORTANT]
> This node works on **Bot** provided by **Telegram** so if you want to change Bot register New bot using **BotFather** and change **BOT_TOKEN** in `telegram.json`> [!IMPORTANT]
> Supports group chat. add bot to a group and any user can give commands of that group.
# Installation
- ### Installing Using `comfy-cli`
- `comfy node registry-install ComfyUI-TG`
- https://registry.comfy.org/publishers/daxcay/nodes/comfyui-tg
- ### Manual Method
- Go to your `ComfyUI\custom_nodes` and Run CMD.
- Copy and paste this command: `git clone https://github.com/daxcay/ComfyUI-TG.git`
- ### Automatic Method with [Comfy Manager](https://github.com/ltdrdata/ComfyUI-Manager)
- Inside ComfyUI > Click the Manager Button on the side.
- Click `Custom Nodes Manager` and search for `ComfyUI-TG`, then install this node.- ### Node Installation
- For someone facing automated node installation error or is not on windows os.
- Install lateset version of node js.
- https://nodejs.org/en/download/package-manager
> [!CAUTION]
> Update to nodejs version v20.17.0 if you already have it. https://nodejs.org/dist/v20.17.0/node-v20.17.0-x64.msi
>[!IMPORTANT]
> #### **Restart ComfyUI and Stop ComfyUI before proceeding to next step**
# Setup
## Enable Dev Mode
>[!IMPORTANT]
> #### **Enable dev mode and save workflow in `api` format to make it compatible.**
### Getting bot token from BotFather

### Location of Telegram folder
#### ComfyUI Folder
- `Drive:/ComfyUI_windows_portable/Telegram`#### Stable Matrix
- **Full Version**: `Drive:/StabilityMatrix/Packages/ComfyUI/Telegram`
- **Portable Version**: `Drive:/StabilityMatrix/Data/Packages/ComfyUI/Telegram`From `ComfyUI/Telegram` folder open `telegram.json`

> [!IMPORTANT]
> Fill `BOT_TOKEN` and save it.>[!IMPORTANT]
> #### **Start ComfyUI before proceeding to next step**
## Uploading WorkFlow
To upload a workflow to be used in in telegram use the `workflow` button in telegram dashboard.
>[!IMPORTANT]
> #### **Attach `TG-ImageSaver` Node before saving the workflow in api format**
Now upload it in workflow section

# Telegram Commands
Writing **/c** or **/start** will also provide the list of all commands:

- Write **/wfs** to get a numbered list of uploaded workflows.

- Write **/wf id** to select the workflow.

- Write **/wns** to get numbered list of selected workflow nodes.

- Write **/wn id** to get numbered list of inputs available.

- Write **/s node_id input_id value** to set value for input selected.

- Sending Image to Load Image
https://github.com/user-attachments/assets/e3b1d267-11b6-46b8-8a80-8d2c4b9512c5
- find node id of load image you want.
- find input id of load image node (0 most of time could be other if using custom node )
- attach image and in caption write `/s 25 0` and send like this
- Once uploaded you can use it like `/s 25 0 {file}` as it reside in `Comfy/Input` folder.
- Write **/sce** enable auto ksampler seed change.

- Write **/scd** disable auto ksampler seed change.

- Write **/q** to queue.

- Write **/r** to reset all to default settings.

- Write **/i** to interrupt queue.

# Contact
### Daxton Caylor - ComfyUI Node Developer
- ### Contact
- **Email** - daxtoncaylor+Github@gmail.com
- **Discord Server**: https://discord.gg/UyGkJycvyW
- ### Support
- **Patreon**: https://patreon.com/daxtoncaylor
- **Buy me a coffee**: https://buymeacoffee.com/daxtoncaylor
# Disclaimer
This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Telegram or any of its subsidiaries or its affiliates. The official Telegram website can be found at https://telegram.org/. "Telegram" as well as related names, marks, emblems and images are registered trademarks of their respective owners.
I have used `NodeJS` and 'Python` combined to make this project the library, I am using the following library in nodejs to enable telegram functionality.
https://github.com/yagop/node-telegram-bot-api