Repository navigation
imagewright v0.1.0
Release Notes -- v0.1.0
Released: 2026-11-22
Added
- Documentation site at
flux-frontiers.github.io/imagewright:
getting started, choosing a backend, the servers, the HTTP contract, the MCP
server, the CLI reference and an API reference. A test fails the suite when
a command, MCP tool or public module has no page. - Release workflow. A
v*tag builds the wheel and sdist, creates the
GitHub Release and publishes to PyPI by trusted publishing. imagewright-mcp, an MCP server over stdio with onegeneratetool
(prompt,size,seed,steps, bounded). It chooses its backend with
resolve_image_configon the first call and keeps it. Needs the newmcp
extra (mcp>=1.23.0,<2); without it the command exits naming the pip
command.compress_imageandas_mcp_image(imagewright.mcp_image, also
exported fromimagewright), from gutenberg_kg's_compress_for_mcpand
_as_mcp_image. They fit an image underMCP_IMAGE_MAX_BYTES(3,750,000)
and keep downscaling until it fits instead of giving up after two rounds.
as_mcp_imagereturns the bytes in memory rather than writing a temporary
file.compress_imageneeds only Pillow.- Image servers.
imagewright serveruns the FLUX.2 Klein server
(imagewright.flux_server, port 8090) or, with--backend sdxl, the
SDXL-Lightning server (imagewright.sdxl_server, port 8091). Both are
ports of gutenberg_kg'sserve/image_server.pyandserve/sdxl_server.py
and answer the same routes, request fields and response bodies. The FLUX
server keeps oneImageSynthesizerloaded, renders one image at a time, and
honorsIMAGE_PRELOADandIMAGE_IDLE_UNLOAD_S. The SDXL server also
renders one image at a time; gutenberg_kg's let two requests share the
pipeline. Each module builds its app
withcreate_app()and imports nothing from fastapi or the model stacks at
module scope. - The servers bind
127.0.0.1by default, not0.0.0.0as gutenberg_kg's
do; they have no authentication.--host,MFLUX_SERVER_HOSTor
SDXL_SERVER_HOSToverride it. - Extras
serve(fastapi, uvicorn, pydantic) andsdxl(torch,
diffusers, transformers, accelerate, safetensors, huggingface_hub).serve
without them exits with thepip installcommand to run. ImageSynthesizer.load_model()loads the in-process model ahead of the
first render; the FLUX server uses it to preload.NoImageBackendErrornamesimagewright serve.- The client.
ImageSynthesizer,ImageConfig,ImageBackendand
image_config_from_env, copied fromkg_utils.synthesiswith the same
names and signatures. Backends:mflux-serve(HTTP),mflux-local
(FLUX.2 Klein in process) andopenai. - In-process model lifecycle.
ImageSynthesizer.model_loadedand
unload_model(), fromgutenberg_kg.image_gen. - Discovery.
discover_image_endpointandDEFAULT_IMAGE_ENDPOINTSprobe
IMAGE_ENDPOINT,GUTENKG_IMAGE_ENDPOINT, thenlocalhost:8090and
:8091, on/healthand then/v1/models. - Backend selection.
resolve_image_configchooses, in order: the named
backend or endpoint, the environment, a discovered server, in-process FLUX
with a warning, orNoImageBackendErrorlisting the fixes. imagewright generate PROMPTwrites one PNG and prints its path.- Extras.
flux(mflux>=0.24.0) andopenai(openai>=1.30.0). A
backend whose extra is missing raisesMissingExtraErrornaming the
pip installcommand. The core dependencies areclick,httpxand
pillow. - The repository. Package layout, CI, pre-commit hooks and
imagewright --version.
Full changelog: CHANGELOG.md