For n > 1, the image endpoints returned one preview grid instead of n images.
The endpoints now run one model batch, save each decoded sample as its own file,
and return one URL or base64 item for each image. This applies to generations
and edits.
A keyword-only return_samples field (default False) is added to OutputConfig,
SamplingParam and ForwardBatch. Batched image requests set it and do not build
preview frames. The worker keeps the sample tensor for these requests, and
non-output ranks clear the field. Defaults and positional arguments do not
change.
The image endpoints now validate size, output format and count before they
create output directories, save uploads or start generation. An invalid value
returns HTTP 400. Omitted or null values keep their defaults.
Behavior change: an explicit empty size or output format, and a count outside
1-10, now return HTTP 400. Before, the server replaced them with defaults or
clamped the count.
- create_app reads distributed_executor_backend with getattr(..., None): the MLX
server passes a SimpleNamespace without it, so since #1746 the server could not
start (28 test_openai_video_client failures). An explicit external_launcher
request is still rejected.
- test_cpu_sdpa patches fastvideo.platforms._current_platform instead of
current_platform. monkeypatch restored the real platform as a module attribute
that shadowed the lazy __getattr__, so later tests that fake _current_platform
(gpu_worker dist timeout, ROCm detection, selector role override) failed on
GPU hosts.
GB200 unit lane, A/B on one tray: main 36 failures, this change 0 (2720 passed).