AI conversations that remember and become images.

Fabrexa AI brings personality-driven conversations to Telegram, keeps each session coherent, and turns the latest moment into an image. Ollama and ComfyUI run on your machine while Telegram stays the interface.

Requirements

  • Node.js 22+
  • Ollama
  • ComfyUI for local images
  • A Telegram bot token
Fabrexa AI Telegram output showing Elara Voss in a moonlit library with image regeneration controls

The character, context, and image stay connected.

A personality shapes the voice. Recent messages keep the exchange natural. Ordered session memory preserves important changes. When images are enabled, the same state guides what ComfyUI renders next.

Models you control

Choose an Ollama-compatible language model that fits your machine, including supported GGUF releases from Hugging Face, then pair it with the ComfyUI checkpoint you prefer for images.

Replies that arrive live

Fabrexa updates the Telegram message while the model is responding instead of making you wait for the complete answer.

Characters with a visual identity

Friendly, Elara Voss, Sherlock Holmes, and Vent Girl are included. Each personality can pair its conversation prompt with a separate appearance reference for consistent images.

Memory for the current story

Important events, locations, relationships, clothing, and object state stay ordered inside the active session. A new chat begins with fresh memory.

Images grounded in the conversation

Fabrexa directs the next scene from the character appearance, session state, and latest exchange, then sends the local image with its prompt and a Regenerate action.

See the conversation become a scene.

Text arrives first. Fabrexa then directs a visual from the character's appearance, the active session, and the latest exchange before delivering the local ComfyUI image to the same Telegram chat.

A Fabrexa Telegram conversation with Elara Voss, followed by a generated rainy-library portrait, an expandable image direction, and a Regenerate button
From reply to generated image A streamed response, rendered scene, expandable direction, and Regenerate action.
Fabrexa end-to-end flow from Telegram input through Ollama text generation, optional ComfyUI image generation, and session-memory update
One ordered processing flow Request preparation, streaming, model handoff, image delivery, cleanup, and memory.

From message to memory, in one ordered flow.

  1. 01

    A message starts the turn

    Telegram provides the familiar interface; Fabrexa receives the request on your host.

  2. 02

    Fabrexa rebuilds the context

    It combines the active personality, recent messages, and relevant ordered memory from the current session.

  3. 03

    The character replies live

    Ollama generates the response on your machine while Fabrexa streams it into the Telegram message.

  4. 04

    The latest moment becomes an image

    If images are enabled, Fabrexa directs the scene, hands the GPU to ComfyUI, and sends the result back to Telegram.

  5. 05

    The session carries the result forward

    After delivery and model cleanup, important developments from the exchange are added to ordered memory for later replies and images.

What stays local: model inference, generated images, personality files, and session data remain on the host machine. Telegram still transports messages and delivered media, so Fabrexa is local-first rather than offline.

Run the full stack on your own machine.

Fabrexa is self-hosted. You choose the text model, image checkpoint, and Telegram bot that make up your instance. Before you begin, install Node.js 22+ and Ollama. Install and run ComfyUI for image generation, then create a bot with @BotFather.

The example uses gemma3:12b, but the runtime is not tied to it. You can use a compatible GGUF model from Hugging Face and select a separate ComfyUI checkpoint for the visual style you want.

  1. 1

    Get Fabrexa and install dependencies

    git clone https://github.com/Ali-Sdg90/Fabrexa-AI.git
    cd Fabrexa-AI
    npm install
  2. 2

    Choose a text model

    Start with the example model

    The quickest route is the model used by the included example configuration.

    ollama pull gemma3:12b

    Or bring a GGUF model from Hugging Face

    Find an instruction or chat model with GGUF files on Hugging Face. On its model page, choose Use this model → Ollama and copy the command. It will look like this:

    ollama run hf.co/<publisher>/<model>-GGUF:Q4_K_M

    Model names and available quantizations vary by repository. Use the exact Ollama command shown on the model's Hugging Face page, then keep that same model reference for .env.

  3. 3

    Connect Telegram and image generation

    Copy .env.example to .env, then add the token from BotFather, your numeric Telegram user ID, and your public Telegram username.

    TELEGRAM_BOT_TOKEN=your_token_from_botfather
    OWNER_ID=your_numeric_telegram_id
    OWNER_USERNAME=your_telegram_username
    OLLAMA_MODEL=gemma3:12b
    BOT_PRIVATE=true
    IMAGE_GENERATION_AVAILABLE=true
    COMFYUI_CHECKPOINT_NAME=your-local-checkpoint-file.safetensors

    If you chose Hugging Face, replace gemma3:12b with the exact hf.co/... model reference from the previous step. Never commit your token or .env file. In private mode, OWNER_USERNAME is shown to users who want to request access; the leading @ is optional. Keep the checkpoint filename only in .env. For a text-only setup, set IMAGE_GENERATION_AVAILABLE=false.

  4. 4

    Validate the setup and launch

    npm run check
    npm start

    When the checks pass, open your bot in Telegram, send /start, choose a personality, and begin the conversation.

Hugging Face setup follows the official Hugging Face guide for Ollama.

Start with the defaults. Shape everything else.

Keep the included personalities or create your own. Change the conversation prompt, visual appearance, text model, image checkpoint, and memory settings to fit the experience you want to build.

Explore the project