Nodes Browser

ComfyDeploy: How ComfyUI-TG works in ComfyUI?

What is ComfyUI-TG?

Node to enable Telegram in ComfyUI.

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for ComfyUI-TG and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

<a id="readme-top"></a>

<br /> <div align="center"> <a href="https://github.com/daxcay/ComfyUI-TG"> <img src="https://github.com/user-attachments/assets/c35f3c6f-9a8b-426f-9dc8-79c7b2e535d1" width="256px" height="128px"> </a> <h3 align="center">ComfyUI in Telegram</h3> <p align="center"> <a href="https://github.com/daxcay/ComfyUI-TG/issues/new?labels=bug&template=bug-report---.md">Report Bug</a> · <a href="https://github.com/daxcay/ComfyUI-TG/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a> </p> <p align="center"> <img src="https://img.shields.io/badge/version-1.0.0-green" > <img src="https://img.shields.io/badge/last_update-Sept_2024-green" > </p> </div>

About The Project

This project enables the use of ComfyUI Workflows in Telegram.

<br />

[!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.

<br />

Installation

  • Installing Using comfy-cli

  • 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

    • Inside ComfyUI > Click the Manager Button on the side.
    • Click Custom Nodes Manager and search for ComfyUI-TG, then install this node.
  • Node Installation

[!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

<br>

[!IMPORTANT]

Restart ComfyUI and Stop ComfyUI before proceeding to next step

<br />

Setup

Enable Dev Mode

[!IMPORTANT]

Enable dev mode and save workflow in api format to make it compatible.

download (1)

<br>

Getting bot token from BotFather

Untitled design (6)

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

image

[!IMPORTANT] Fill BOT_TOKEN and save it.

[!IMPORTANT]

Start ComfyUI before proceeding to next step

<br />

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

image

Now upload it in workflow section

image

<br />

Telegram Commands

Writing /c or /start will also provide the list of all commands:

image

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

image

  • Write /wf id to select the workflow.

image

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

image

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

image

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

image

  • 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.
<br>
  • Write /sce enable auto ksampler seed change.

image

  • Write /scd disable auto ksampler seed change.

image

  • Write /q to queue.

image

  • Write /r to reset all to default settings.

image

  • Write /i to interrupt queue.

image

<br/>

Contact

Daxton Caylor - ComfyUI Node Developer

<br/>

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