brycedrennan/imaginAIry
Local diffusion for scriptable image and video generation in Python and the CLI
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
ImaginAIry is a Python application and library for local diffusion inference, with imagine for generation and aimg for interactive use and commands such as describe, upscale, videogen, and server. In Python, ImaginePrompt describes a generation job, WeightedPrompt combines prompt components, and LazyLoadingImage accepts a path or URL. imagine() yields results for caller-side processing, while imagine_image_files() handles file output. The source package lives under imaginairy/, with separate docs/ and tests/ directories.
Model weights download automatically, with cache paths for Hugging Face and PyTorch. The application combines Stable Diffusion generation with specialized components: CLIPSeg builds text-driven masks, BLIP captions inputs, CodeFormer enhances faces, and Spandrel is the integration layer for selectable upscalers. aimg server adds an alpha HTTP API and StableStudio web UI, with interactive API documentation at /docs. Treat this as a narrower integration surface than the CLI, not a way to expose every local operation.
Key Capabilities & Differentiators
The image CLI covers text-to-image, image-to-image, outpainting, and tiled output. A documented model sweep compares SD 1.4, 1.5, 2.0, 2.1, and OpenJourney v1/v2 at a fixed seed via --arg-schedule. For reference-driven generation, --control-mode can use poses, edges, depth, or normals, but the listed controls are not supported for SDXL. CLIPSeg masks can combine regions with Boolean operators and adjust their extent or strength before applying keep or replace behavior. SD 1.5-based editing through --control-mode edit is distinct from the standalone instruction-edit workflow, which is marked broken as of 14.0.0.
For image-to-video, aimg videogen --start-image uses SVD or SVD-XT, with image-decoder variants also selectable. The CLI separates target --fps for generation from --output-fps for playback and exposes frame count, motion amount, seed, and --decoding_t to set how many frames are decoded at once. That last control is a useful tuning point when decoding memory is a constraint; it is not a guarantee that a given clip will fit.
Trade-offs & Limitations
Compared with a node-based diffusion UI, ImaginAIry is a better fit for scripted batches: prompt expansion, seeded runs, parameter schedules, and prompt metadata in output files can be driven without a visual graph. Choose a node-based tool instead when operators need to inspect and rewire individual stages interactively. Compared with a hosted image API, local inference reduces reliance on a remote inference service but shifts GPU provisioning, dependency compatibility, and weight-cache management to your team.
Two limits matter in adoption tests: the alpha server has a smaller feature set than the CLI, and the standalone instruction-edit workflow is marked broken as of 14.0.0 despite the separate SD 1.5 editing control. Test the exact model and operation through the interface you intend to deploy. The project is MIT-licensed, but the separate STABLE_DIFFUSION_LICENSE file makes it important to verify checkpoint and auxiliary-model terms independently before commercial use or redistribution.
Hardware & Deployment Guide
Use Python 3.10 with pip install imaginairy; Python 3.11 is not supported for the documented setup. Image generation targets CUDA hardware or Apple M1, with roughly 10 GB of disk space for model downloads and at least 11 GB of VRAM specified for the CUDA path. The macOS setup calls for Rust and setuptools-rust to build the tokenizer. Video requires an NVIDIA GPU and does not run on Mac or CPU; the Windows video setup calls for installing PyTorch 2.0 first.
The Dockerfile uses python:3.10.6-slim, installs libgl1, libglib2.0-0, and gcc, then installs the published PyPI package and runs imagine --help. It does not build the checked-out source, and the help check is not an inference test. For GPU runs, pass --gpus all and persist /root/.cache/huggingface, /root/.cache/torch, and /outputs; HUGGINGFACE_HUB_CACHE can relocate the Hugging Face cache. Plan for network access to fetch weights initially and test offline execution separately if required. For HTTP access, run aimg server and test the UI and /docs at localhost:8000. With no latest GitHub release listed, pin and verify the package version used in deployment.
--arg-schedule sweeps model or generation parameters; seeds and prompt metadata help track outputs.--control-mode supports OpenPose, Canny, HED, depth, normal maps, and image shuffle; the listed controls are not supported for SDXL.AND, OR, NOT, and pixel expansion or contraction for keep/replace workflows.aimg videogen offers SVD and SVD-XT variants with frame count, motion, generation FPS, and output FPS controls.Creators and engineering teams with local GPU capacity who want scripted image batches, controlled variations, and selective upscaling or NVIDIA-backed image-to-video.
You need a visual node editor, a web API with CLI feature parity, SDXL structural controls, or Stable Video Diffusion on Mac or CPU.
Quick Start & Installation
docker build . -t imaginairy # you really want to map the cache or you end up wasting a lot of time and space redownloading the model weights docker run -it --gpus all -v $HOME/.cache/huggingface:/root/.cache/huggingface -v $HOME/.cache/torch:/root/.cache/torch -v `pwd`/outputs:/outputs imaginairy /bin/bash
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| imaginAIry ★ | 8.2k | +1 | Python | MIT | Local diffusion for scriptable image and video generation in Python and the CLI |
| ComfyUI | 149.9k | +945 | Python | GPL-3.0 | A node-graph engine for building and running multimodal AI workflows locally |
| OpenMontage | 85.4k | +1.5k | Python | AGPL-3.0 | Agent-led video production from brief to finished edit |
| autoclip | 21.7k | +4k | Python | MIT | Local-first AI turns long videos into captioned clips via desktop, CLI, and MCP. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/brycedrennan/imaginAIry.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about imaginAIry
How should I integrate ImaginAIry into an existing pipeline?
What hardware should I provision for images and video?
Does the MIT license cover commercial self-hosting and model redistribution?
When is this a better choice than a node-based UI or a hosted image API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy