skip to content
home / projects / image-generation-ecosystem

The Local Image Generation Ecosystem

WebbDuck, DNADuck, and DuckMotion — a modular, local-first creative stack.

What started as a practical need — a self-hosted image generation studio that actually worked for daily creative iteration — grew into a modular ecosystem of local-first tools connected through WebbDuck's plugin system. WebbDuck is the core: a queue-based SDXL generation studio with text-to-image, img2img, inpainting, smart extend, upscaling, LoRA management, and a searchable gallery. Around it, specialized plugins handle image-to-video (DuckMotion, powered by Wan 2.2) and face identity extraction for dataset preparation (DNADuck). Together they form a creative workstation that runs entirely on local hardware, with no cloud dependency and no per-generation costs.

Local SDXL studio · Identity pipeline · I2V plugin · Modular plugin architecture case study
PythonFastAPIDiffusersPyTorchInsightFaceSQLiteWebSocketsVanilla JS

01. WebbDuck: the core studio

WebbDuck is a local-first SDXL image generation studio built on FastAPI and Hugging Face Diffusers. The design centers on a queue-first GPU worker — generation requests are enqueued and processed asynchronously, with real-time WebSocket updates on progress, queue position, and completion. This means the UI never blocks and multiple generations can be managed in parallel. The studio supports text-to-image, img2img, inpainting, smart extend (outpainting), second-pass refinement, and upscaling. A LoRA stack provides per-LoRA weights with trigger phrase injection. An embedding stack auto-discovers textual inversions with architecture filtering. A token counter warns when prompts exceed the 77-token CLIP window, and long prompts beyond 77 tokens are chunk-encoded instead of hard-truncated — preserving prompt fidelity.

02. Gallery and metadata: outputs as a library

Every generation produces a metadata sidecar and is indexed in a manifest file (manifest.jsonl) that powers a flat gallery grid with infinite scroll, global keyword search, thumbnail-size slider, and a lightbox with action toolbar. Outputs are filesystem-backed — there is no database dependency for the gallery. A catalog watcher monitors checkpoint, LoRA, and embedding directories for changes and pushes updates to the UI in real time. The metadata store (webbduck_meta/) is the canonical source for tags, families, descriptions, and recommendations — consumed by external tools like PhoenixDraw through a dedicated API rather than maintained in separate copies.

03. Plugin architecture: composable capabilities

WebbDuck has a generic web-app plugin host that lets companion tools render their own UI pages within the studio. DuckMotion adds a local Wan 2.2 image-to-video workflow with staged uploads, model discovery, runtime compatibility checks, queued GPU jobs, and a plugin-local video gallery. DNADuck adds face identity extraction and clustering: it scans image libraries, detects and embeds faces with InsightFace, groups identities with DBSCAN, stores durable state in SQLite, and supports review, merge, search, and export workflows through a plugin UI. Both plugins coordinate GPU memory and runtime state with the parent WebbDuck process so they can coexist without resource conflicts.

04. DNADuck: identity pipeline for dataset preparation

Preparing image datasets for LoRA training is usually a messy manual process: identify subjects, de-duplicate, cluster, label, export, and keep track of what changed. DNADuck turns that into a repeatable pipeline. It recursively scans image directories, embeds faces with InsightFace, clusters identities with DBSCAN, and stores everything in a persistent SQLite database. The system supports review, merge, search, and export workflows through CLI, REST API, and WebbDuck plugin interfaces. Export modes include hardlink, symlink, and copy — so the original files are never duplicated. Training hooks connect to Kohya-oriented training workflows. The identity database accumulates across sessions, so re-scanning only processes new or changed images.

05. DuckMotion: bringing video generation to the same stack

DuckMotion extends the ecosystem into video. Powered by Wan 2.2 through Diffusers, it handles model discovery across local folders and Hugging Face cache, queues GPU jobs behind a plugin API, coordinates runtime and memory usage with WebbDuck, and presents the whole workflow through a polished multi-tab plugin UI. The system handles staging, model discovery, runtime compatibility, queue management, cancellation, and a plugin-local gallery — the messy parts of local video generation that most demos skip.

06. Design principles: local-first, practical, composable

Every tool in this ecosystem follows the same principles: run on local hardware with zero cloud dependency for core operations, use filesystem-backed storage so there is no vendor lock-in, communicate through well-defined APIs and WebSocket events, and keep the UI lightweight and hackable (vanilla JavaScript ES modules, no build pipeline). The plugin system means capabilities compose without the core needing to know about them. The result is not just a set of tools but a creative workstation that grows with its user.

◆ Outcome

A modular local-first creative ecosystem spanning image generation, video generation, and dataset preparation. WebbDuck is the core studio with queue-based GPU orchestration, a searchable gallery, LoRA management, and plugin hooks. DNADuck turns messy image libraries into structured identity datasets. DuckMotion brings local I2V generation into the same workflow. Together they form a practical alternative to cloud-dependent creative tooling — everything runs on local hardware, costs nothing per generation, and improves with every plugin added.