AIComfyUITelegram BotRapid Prototyping

Any Gen Bot

Self-Adapting AI Media Pipeline via Telegram

Overview

Architected a self-adapting AI media pipeline accessible entirely through Telegram. The system automatically converts any ComfyUI workflow into a Telegram bot — no redevelopment required. Supports image-to-video, image-to-image, and image mixing pipelines today, with zero integration work needed as new AI workflows are introduced into ComfyUI.

Architecture

Architecture: Telegram Bot API as the client surface, bridged to ComfyUI via a custom Node.js REST translation layer (flow2restful). The bridge introspects ComfyUI workflow graphs at runtime and auto-generates the corresponding Telegram interface — any new flow planned in ComfyUI is instantly exposed as a bot command. Supports WAN2.2 (image-to-video), image-to-image, and image mixing pipelines. Async callback pipeline delivers generated media back to the originating Telegram thread. Stateless middleware design supports concurrent generation requests.

Key Technical Decisions

  • 01.Designed a zero-redevelopment integration model: any ComfyUI workflow is automatically exposed as a Telegram bot command via runtime graph introspection.
  • 02.Built flow2restful — a custom Node.js REST translation layer that introspects ComfyUI workflow graphs and auto-generates the corresponding Telegram interface.
  • 03.Stateless middleware design enables concurrent generation requests across multiple users without session contention.
  • 04.Async callback pipeline delivers generated media (video, image) back to the originating Telegram thread upon completion.
  • 05.Supports WAN2.2 (image-to-video), image-to-image, and image mixing pipelines with a single unified architecture.

Outcome

A fully self-adapting AI media pipeline where introducing a new ComfyUI workflow requires zero integration work — the system discovers and exposes it automatically.

Tech Stack

AIComfyUITelegram BotRapid Prototyping