Configuration (CLI / REPL)¶
AbstractVision configuration is intentionally simple:
- In Python, you configure backends by instantiating backend config objects (see docs/reference/backends.md).
- The CLI/REPL/playground reads
ABSTRACTVISION_*environment variables to set defaults (../../src/abstractvision/cli.py,../../src/abstractvision/playground_server.py). - The AbstractCore capability plugin also reads
owner.configplus a small set of standard OpenAI environment aliases. Plugin-only aliases are called out below.
See also: - Getting started (examples): docs/getting-started.md - Backends: docs/reference/backends.md
CLI commands (overview)¶
Implemented in ../../src/abstractvision/cli.py:
abstractvision models— list known registry model idsabstractvision tasks— list known tasksabstractvision show-model <id>— print a model’s tasks + paramsabstractvision provider-models --openai --task text_to_image— explicitly query the official OpenAI/modelscatalogabstractvision provider-models --base-url http://localhost:1234/v1 --task text_to_image— explicitly query an OpenAI-compatible provider catalogabstractvision repl— interactive testing (supportsopenai,diffusers,sdcpp)abstractvision playground [--host 127.0.0.1] [--port 8091]— self-contained local web UI and/v1/vision/*APIabstractvision serve [--host 127.0.0.1] [--port 8091]— alias forabstractvision playgroundabstractvision t2i .../abstractvision i2i ...— one-shot commands using the OpenAI-compatible HTTP backend
Note:
- abstractvision t2i / abstractvision i2i always use the OpenAI-compatible backend (they do not switch based on ABSTRACTVISION_BACKEND).
- Use abstractvision repl or abstractvision playground for local backends (diffusers, sdcpp).
- Local Diffusers requires abstractvision[diffusers]. stable-diffusion.cpp python binding fallback requires abstractvision[sdcpp]; external sd-cli can be used without the binding.
REPL backend selection¶
Inside abstractvision repl:
/backend openai <base_url> [api_key] [model_id]/provider-models [--task text_to_image] [--json]— query the configured OpenAI-compatible provider catalog/backend diffusers <model_id_or_path> [device] [torch_dtype]/backend sdcpp <model.gguf|model.safetensors> [sd_cli_path]/backend sdcpp <diffusion_model.gguf> <vae.safetensors> <llm.gguf> [sd_cli_path]
Run /help in the REPL to see the full command list (generated by _repl_help() in ../../src/abstractvision/cli.py).
Environment variables¶
The CLI/REPL state object (_ReplState in ../../src/abstractvision/cli.py) reads the common and backend env vars below. The playground server reads the same backend family plus a few playground-only Diffusers cache/version vars through PlaygroundServerConfig in ../../src/abstractvision/playground_server.py.
Common¶
ABSTRACTVISION_BACKEND— backend selector:openai,openai-compatible,diffusers, orsdcpp- AbstractCore plugin default:
openaiusinghttps://api.openai.com/v1plusOPENAI_API_KEYorABSTRACTVISION_API_KEY - AbstractCore compatibility: selecting
abstractvision:openai-compatibledirectly, or setting onlyABSTRACTVISION_BASE_URL, keeps compatible-endpoint semantics - if unset and
ABSTRACTVISION_BASE_URLis set, REPL/playground default toopenai - if unset and no base URL is configured, no backend is selected until you use
/backend ...or load a model explicitly ABSTRACTVISION_STORE_DIR— local artifact output directory (default:~/.abstractvision/assets)ABSTRACTVISION_TIMEOUT_S— HTTP timeout for OpenAI-compatible backend (default:300)ABSTRACTVISION_MODEL_ID— model id for the current backend in the REPL:openai: sent asmodelin HTTP requests (optional; server-dependent)diffusers: Diffusers model id or local pathABSTRACTVISION_CAPABILITIES_MODEL_ID— optional capability-gating model id (must exist in the registry)
OpenAI / OpenAI-Compatible HTTP Backend¶
ABSTRACTVISION_BASE_URL— compatible/v1endpoint; optional for the AbstractCoreopenaidefault because it useshttps://api.openai.com/v1OPENAI_BASE_URL— override for the official OpenAI profile whenABSTRACTVISION_BASE_URL/vision_base_urlare unset; also used byabstractvision provider-models --openaiABSTRACTVISION_API_KEY— bearer token for OpenAI or compatible providers that require authOPENAI_API_KEY— fallback whenABSTRACTVISION_API_KEY/vision_api_keyare unset; also used byabstractvision provider-models --openaiABSTRACTVISION_MODEL_ID— optional remote model id/name (see also “Common”)OPENAI_IMAGE_MODEL_ID/OPENAI_IMAGE_MODEL— plugin-only OpenAI model aliases whenABSTRACTVISION_MODEL_ID/vision_model_idare unsetABSTRACTVISION_MODELS_PATH/vision_models_path— provider catalog path for explicit listing (default:/models, so a/v1base URL queries/v1/models)- Many OpenAI-compatible providers expose
GET /models. AbstractVision exposes that catalog viaabstractvision provider-models,VisionManager.list_provider_models(...), and the AbstractCore plugin methodllm.vision.list_provider_models(...); it does not call the catalog automatically or use it to select a model. The plugin uses its static default (gpt-image-1) unless a model id is configured. ABSTRACTVISION_IMAGES_GENERATIONS_PATH— default:/images/generationsABSTRACTVISION_IMAGES_EDITS_PATH— default:/images/editsABSTRACTVISION_TEXT_TO_VIDEO_PATH— optional (enablestext_to_video)ABSTRACTVISION_IMAGE_TO_VIDEO_PATH— optional (enablesimage_to_video)ABSTRACTVISION_IMAGE_TO_VIDEO_MODE—multipart(default) orjson_b64
Diffusers backend¶
ABSTRACTVISION_DIFFUSERS_DEVICE—auto(default),cpu,cuda,mps, …ABSTRACTVISION_DIFFUSERS_TORCH_DTYPE— optional (float16,bfloat16,float32)ABSTRACTVISION_DIFFUSERS_ALLOW_DOWNLOAD—0(default/cache-only/offline) or1to permit runtime downloadsABSTRACTVISION_DIFFUSERS_AUTO_RETRY_FP32—1(default) or0(MPS-only fallback behavior)
Playground-only Diffusers vars:
- ABSTRACTVISION_ALLOW_DOWNLOAD — legacy fallback used only when ABSTRACTVISION_DIFFUSERS_ALLOW_DOWNLOAD is unset
- ABSTRACTVISION_DIFFUSERS_CACHE_DIR — optional Hugging Face cache directory override
- ABSTRACTVISION_DIFFUSERS_REVISION — optional model revision
- ABSTRACTVISION_DIFFUSERS_VARIANT — optional model variant
stable-diffusion.cpp backend¶
ABSTRACTVISION_SDCPP_BIN—sd-clipath/name (default:sd-cli)ABSTRACTVISION_SDCPP_MODEL— optional full-model path for single-file Stable Diffusion checkpoints/GGUF (alternative to component mode)ABSTRACTVISION_SDCPP_DIFFUSION_MODEL— GGUF diffusion model pathABSTRACTVISION_SDCPP_VAE— VAE safetensors path (required for component-mode models like Qwen Image GGUF and FLUX.2 GGUF)ABSTRACTVISION_SDCPP_LLM— text encoder path (often GGUF; required for component-mode models like Qwen Image GGUF and FLUX.2 GGUF)ABSTRACTVISION_SDCPP_LLM_VISION— optional vision encoder GGUF pathABSTRACTVISION_SDCPP_EXTRA_ARGS— extrasd-cliflags (string, split like a shell)
Tip:
- If you want Metal acceleration on macOS (Apple Silicon), install a Metal-capable sd-cli binary from
stable-diffusion.cpp releases and point ABSTRACTVISION_SDCPP_BIN at it (or pass the path as the last arg to
/backend sdcpp ... in the REPL). If you don’t, the backend may fall back to python bindings that run CPU-only.