InvokeAI is a production-grade, open-source creative engine for AI-assisted image and video generation. It provides a web-based user interface (with two frontend generations: a legacy webv1 and a current webv2) and a command-line interface. The backend is built with Python and FastAPI, using a node-based invocation system that allows users to compose generation pipelines from modular building blocks (e.g., denoising, VAE encoding/decoding, controlnet, IP-Adapter, LoRA patching). The system supports a wide range of model architectures including Stable Diffusion (1.5, 2.0, XL, 3.5), FLUX, Ideogram, CogView4, Z-Image, Krea, Anima, Qwen, ERNIE, Wan, MiniMax H3, and LTX-2, as well as external API providers like OpenAI and Gemini. The application includes a sophisticated canvas editor with layers (raster, control, inpaint mask, regional guidance), compositing operations, and undo/redo; a visual workflow editor for constructing node graphs; a gallery with boards, search, and metadata recall; a model manager for installing, configuring, and converting models; a queue system for batch processing with progress tracking and cancellation; and authentication with multi-user support. Persistence is handled via SQLite (with a custom migration system) or external MySQL/MariaDB. The frontend is built with React, Chakra UI, and nanostores/Redux for state management, with extensive internationalization scaffolding. While primarily an application, the repository contains significant research-oriented code for model architecture definitions, quantization (bitsandbytes, GGUF, SDNQ), custom PyTorch module autocasting, and image processing pipelines (Canny, depth estimation, face detection, segment anything, upscaling). The codebase demonstrates high engineering craftsmanship with abstract service layers, registry patterns, and a node-based architecture that cleanly separates concerns. However, it carries maintenance complexity from two parallel frontend codebases, vendored dependencies, and a large migration chain.
ADetailer is a script extension for AUTOMATIC1111's Stable Diffusion Web UI that performs automatic object detection and inpainting. After an initial image is generated, it runs detection models (YOLOv8, YOLO World, MediaPipe face detection/mesh) to identify objects such as faces, hands, or persons. It creates masks from the detections and performs targeted inpainting on those regions using separate prompts, denoising strength, and other configurable parameters. The extension supports multiple detection models per run, ControlNet integration for guided inpainting, and various mask preprocessing options (dilation/erosion, offset, merge, invert, filtering by area/confidence). It also provides a REST API for querying version, schema, and available models. Architecturally, ADetailer is a plugin that hooks into the webui's script system. It consists of several internal modules: `adetailer/` contains the core detection logic (ultralytics and mediapipe wrappers), mask processing functions, argument validation using pydantic, and utility functions for model management. The `aaaaaa/` module provides webui-specific helpers for compatibility, UI generation, and rich traceback formatting. The `controlnet_ext/` module handles ControlNet integration for both standard and Forge versions. The main script `scripts/!adetailer.py` orchestrates the entire pipeline: argument parsing, detection, mask preprocessing, and inpainting for each detected object. Key features include: support for multiple detection models simultaneously, configurable per-tab settings, dynamic denoising strength based on bounding box size, optimal crop size calculation for inpainting (SDXL and free modes), XYZ grid support for batch experimentation, and a comprehensive settings panel in the webui. The codebase demonstrates good engineering practices with type hints, pydantic validation, comprehensive tests, and clean separation of concerns.
Koharu is a desktop application for manga and comic translation, built with a Rust backend (Tauri) and a React/TypeScript frontend. It orchestrates a multi-stage ML pipeline: page import, layout detection (YOLO, RT-DETR), speech bubble segmentation, OCR (PP-OCR, Manga OCR), translation (local LLMs via llama.cpp or cloud APIs), and inpainting (LaMa, FLUX.2, AOT-GAN). The system includes a custom deep learning framework (`koharu-torch`) with inference-only ports of common vision models, a scene graph for versioned project state, and a WebGPU/WASM canvas for interactive editing. The application supports multiple hardware backends (CUDA, ROCm, Vulkan, Metal) and can run entirely offline. Architecturally, the project is a monorepo with over 30 Rust crates and two JavaScript packages. The backend is organized around clearly separated concerns: model inference (`koharu-ml`), pipeline orchestration (`koharu-pipeline`), project state (`koharu-scene`), persistent storage (`koharu-storage`), and rendering (`koharu-renderer`/`koharu-rasterizer`). The frontend provides an editor with panels for page management, canvas, inspection, and an AI agent panel that uses OpenAI's Codex protocol for tool-driven project editing. The translation subsystem abstracts over local and remote providers with a common prompt and schema interface. While the primary purpose is an application, the ML model implementations are notable for their fidelity to upstream Python references, including exact preprocessing (LetterBox padding, pixel normalization) and postprocessing (NMS, mask decoding). This makes the repository valuable as a reference for Rust ports of computer vision models. However, the codebase is tightly coupled to specific model architectures and pinned revisions, limiting direct reuse without significant adaptation. The UI component library (`packages/ui`) and several backend abstractions (e.g., configuration, storage format, runtime dependency graph) are designed for reusability and could be extracted with minimal effort.
BallonsTranslator is a desktop application for translating manga and comics, built with PyQt6. It orchestrates a full pipeline from image loading through text detection, OCR, translation, inpainting, and typesetting. The architecture is modular with a lazy plugin system for detectors, OCR engines, translators, and inpainters, supporting both local ML models and cloud LLM APIs (OpenAI, Codex, etc.). The application features a rich interactive canvas with advanced text editing (rich formatting, effects, transforms like bend and grid warp), project management with undo/redo, a Photoshop bridge, and internationalization. Code quality is good with extensive test coverage, but there are signs of technical drift such as hardcoded API keys, platform-specific fragility, and dependency version locks. Overall, it's a well-crafted tool with several genuinely reusable components, particularly in module registration, secret storage, filter plugins, and download utilities.