AbstractVision
Model-agnostic generative vision API (images, optional video) for Python and the Abstract* ecosystem.
What you get
How it fits together (diagram)
flowchart LR
Caller[Python / CLI / AbstractCore] --> VM[VisionManager]
VM --> BE[VisionBackend]
BE --> VM
VM -->|optional| Store[MediaStore]
Store --> Ref[Artifact ref dict]
VM -->|no store| Asset["GeneratedAsset (bytes + mime)"]
Loading
Status (current backend support)
- Development status: Alpha (0.x). The public API is stable-by-design, but breaking changes may still happen and will be called out in
CHANGELOG.md.
- Checked on Linux without a GPU, Linux with an NVIDIA card and Apple silicon; the measured generation times per model are in docs/benchmark.md.
- Built-in backends implement images (
text_to_image, image_to_image) plus backend-dependent video (text_to_video, image_to_video).
- Local MLX-Gen supports
text_to_image for curated FLUX.2, Qwen Image, Z-Image, ERNIE Image Turbo, FIBO, and Bonsai ternary models; supports image_to_image for FLUX.2 klein/base, Qwen Image Edit, ERNIE Image Turbo, FIBO, and FIBO Edit models; and supports Wan 2.2 TI2V plus task-specific Wan 2.2 A14B packages for local text_to_video and first-frame image_to_video.
- Local MLX-Gen
0.38.0+ exposes route-aware Qwen structured control on validated base-Qwen routes through control_image / control_strength, and route-aware masked edit on validated Qwen 2511 edit routes through mask.
- Local MLX-Gen exposes a shared
lora_adapters contract across text_to_image, image_to_image, text_to_video, and image_to_video. Route-level LoRA truth stays backend-owned and is surfaced through provider catalogs as supports_lora, lora_status, lora_target_roles, and lora_validation_profile.
- Local Diffusers
text_to_video remains experimental and is temporarily disabled from the normal local runtime surfaces pending docs/backlog/planned/0023_local_runtime_capability_quarantine_for_glm_mflux_and_t2v.md.
- Remote
text_to_video / image_to_video are also supported through the OpenAI-compatible backend when endpoints are configured.
multi_view_image is part of the public API (VisionManager.generate_angles) but no built-in backend implements it yet.
Details: docs/reference/backends.md.
Installation
One line, no admin rights, no Python needed beforehand:
# macOS / Linux
curl -LsSf https://abstractframework.ai/vision/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://abstractframework.ai/vision/install.ps1 | iex"
It installs AbstractVision alone as a uv tool (the abstractvision command, Python 3.12
through uv) and picks the profile for the machine: apple (Apple Silicon, macOS 14+: MLX-Gen
and Diffusers), gpu (NVIDIA or ROCm: Diffusers on PyTorch) or light (the CLI and the
OpenAI-compatible backend; no local generation). On Linux without a GPU,
curl -LsSf https://abstractframework.ai/vision/install.sh | sh -s -- --profile gpu generates
locally on the processor. Prebuilt wheels only: on Apple Silicon stable-diffusion-cpp-python is
left out (PyPI has only its source build); GGUF models run through stable-diffusion.cpp's
sd-cli, which AbstractVision downloads itself at the first GGUF generation. Run the line again
to upgrade. Profiles, options and what is left out:
One-line install.
Or with pip, in your own environment:
pip install abstractvision # light: no dependency
pip install "abstractvision[apple]" # Apple Silicon
pip install "abstractvision[gpu]" # NVIDIA / Linux
The base install is lightweight. It includes the shared API, capability
registry, artifact helpers, CLI, AbstractCore plugin entry point, and the
stdlib OpenAI-compatible HTTP backend. Local inference runtimes are explicit
extras.
Optional extras:
| Extra |
Use |
abstractvision[openai] |
Official OpenAI provider intent marker; no SDK dependency today. |
abstractvision[openai-compatible] |
Generic local/remote OpenAI-shaped endpoint intent marker; stdlib-only today. |
abstractvision[models] |
Curated Hugging Face download helpers for cache-backed local quantized vision model presets. |
abstractvision[diffusers] |
Install Torch/Diffusers and related packages for local Diffusers generation. |
abstractvision[huggingface] |
Compatibility alias for callers that still request the historical Diffusers extra. |
abstractvision[sdcpp] |
Install stable-diffusion-cpp-python for the pip binding fallback. |
abstractvision[mlx-gen] |
Install the optional MLX-Gen image/video runtime, validated on Apple Silicon. The extra also installs on Linux, where it is not validated yet (see backlog 030). |
abstractvision[mflux] |
Compatibility alias for the MLX-Gen runtime. |
abstractvision[local] |
Convenience for the Diffusers + sdcpp local runtime stack. Add abstractvision[mlx-gen] or use abstractvision[all] / abstractvision[all-apple] when you also want MLX-Gen. |
abstractvision[all] |
All runtime backend dependencies, without contributor tooling. |
abstractvision[apple] / abstractvision[all-apple] |
Native macOS Python profile: Diffusers/Torch MPS, stable-diffusion.cpp bindings, and MLX-Gen. |
abstractvision[gpu] |
NVIDIA/Linux local profile: Diffusers/Torch, no MLX. Install a CUDA/ROCm-enabled PyTorch wheel when needed. |
abstractvision[all-gpu] |
Full NVIDIA local profile: Diffusers/Torch and stable-diffusion.cpp bindings (not on Windows, where PyPI has only its source build), no MLX. Add abstractvision[mlx-gen] explicitly if you want to try MLX-Gen on Linux. |
abstractvision[abstractcore] |
Compatibility marker only; AbstractCore is still supplied by the host application. |
stable-diffusion-cpp-python is currently constrained below 0.4.6 because
that release's source distribution is missing vendored CMake files required by
native Linux builds.
Contributor-only extras:
| Extra |
Use |
abstractvision[diffusers-dev] / abstractvision[huggingface-dev] |
Looser dependency pins for newer/unreleased Diffusers pipelines; install Diffusers main separately if needed. |
abstractvision[test] |
Local test dependencies. |
abstractvision[docs] |
Documentation build tooling. |
abstractvision[dev] |
Full contributor workflow: tests, docs, build, lint, formatting, and pre-commit. Do not use this as an application runtime profile. |
Note (CUDA): on Windows, pip install "abstractvision[diffusers]" installs PyPI's CPU-only PyTorch build; for an NVIDIA GPU, install a CUDA-enabled PyTorch build first (see https://pytorch.org/get-started/locally/; the one-line installer picks it for the driver). On Linux, PyPI's PyTorch is the CUDA 13 build (NVIDIA driver 580 or newer, compute capability 7.5 or newer). Verify torch.cuda.is_available() is True.
AbstractCore is not installed by AbstractVision. When an AbstractCore application
has AbstractVision installed in the same environment, AbstractCore can discover
the plugin entry point and use the integration modules lazily.
If you hit “missing pipeline class” errors for newer model families, see docs/getting-started.md. In that case you may need Diffusers from source (main):
pip install -U "abstractvision[diffusers-dev]"
pip install -U "git+https://github.com/huggingface/diffusers@main"
For local development from a repo checkout:
Usage
Start here: