Back to Blog

AstrBot / Image Generation / LLM

Designing a Multi-Executor Image Generation Pipeline for AstrBot

A command-driven image workflow plugin with executor adapters and task assets.

Image generation plugins need to handle multiple model providers, inconsistent parameters, and long-running jobs. The command entry should stay small, while executors absorb provider-specific differences.

Project Overview

main.py connects to AstrBot commands, imgflow/commands parses inputs, imgflow/runtime loads workflows and manages tasks, and imgflow/executors adapts providers such as AI Studio, Vertex, and other image services.

The plugin organizes image generation, editing, reruns, resends, favorites, and cleanup into controlled chat tasks. It fits fixed prompt recipes, multi-model switching, async generation, and group-managed usage.

Implementation

YAML workflow definitions act as task blueprints. At runtime, the runner parses inputs, chooses an executor, saves task metadata, and records callbacks for foreground replies or background delivery.

The executor registry keeps model aliases, aspect-ratio support, and provider capabilities. Permissions decide who can start, resend, favorite, or clean up tasks.