Sign In

Get your AI images on your phone instantly

4

Get your AI images on your phone instantly

Many creators rely on local, GPU-accelerated setups to generate high-quality images. Whether you’re using Stable Diffusion, ComfyUI, or custom pipelines, you often kick off a batch process and then step away from the keyboard.

Wouldn’t it be great if, while AFK, you could receive the resulting images directly on your phone, via Telegram? That’s exactly what this project enables.

This article introduces a fully Dockerized Telegram bot that monitors a local directory for new files and sends them to your Telegram account automatically as soon as they’re ready. It’s asynchronous, cross-platform, and resilient to partial writes and file race conditions. Perfect for image creators, automation nerds, or anyone who wants immediate mobile access to local file outputs.

🧩 What the Bot Does

In a nutshell:

  • Watches a directory (e.g., where your image generator saves outputs)

  • Detects new files (images, captions, videos, any file)

  • Waits until each file is fully written (avoids truncation issues)

  • Sends it to your Telegram account using the Telegram Bot API

  • Runs in Docker for easy setup and isolation

🧠 Why It’s Useful

For people generating media locally (via Stable Diffusion, LoRAs, upscalers, render farms, etc.), this bot provides:

  • Remote Notifications: See new results immediately on your phone, wherever you are.

  • Low Friction Sharing: No need to manually transfer files via USB, cloud sync, or messaging.

  • Automation Friendly: Plug it into any pipeline that outputs to disk.

  • Reliable: Async-safe, handles network timeouts, and avoids incomplete file sends.

  • Secure: Only sends files to a specific Telegram user ID, never shared publicly.

Imagine finishing a long image batch overnight and waking up to all results already queued in Telegram. That’s the value.

🚀 How to Use It

1. Clone the Repo


git clone https://github.com/alcaitiff/telegram-monitor.git
cd telegram-monitor

2. Follow the README instructions

3. ???

4. Profit!


🖼️ Use Case Example: ComfyUI + Telegram Sync

Say you're rendering prompts via ComfyUI, and it saves images to:

/home/john-doe/ComfyUI/output

You run:

./run.sh /home/john-doe/ComfyUI/output

Now every new image generated is sent to your Telegram in seconds, no USB cables, no browsing folders.


🔒 Security Notes

This bot:

  • Sends files only to one specific user ID

  • Does not expose a public webhook

  • Does not download anything from the web

It’s secure for local use and won’t expose your files.


📦 Final Thoughts

This project is a simple but powerful way to integrate Telegram into your local creative workflows. If you’re using AI to generate media on your desktop or server, and want to be notified or receive results on your phone automatically, this tool bridges the gap beautifully.


📁 Resources

4

Comments