Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog.d/nemotron-super-media-structured-output-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Nemotron Super serves JSON output, tools and its settings with images and video

- An image or video request to Nemotron 3.5 Super now takes the same request plan as a text request. `response_format` (`json_object` and `json_schema`), `tools`, `tool_choice` (auto, none, required or a named function), `parallel_tool_calls` and `min_p: 0` are served with media. Before, the Mac refused every such request as `invalid_media` (400).
- Tool calls and JSON answers with media are withheld and validated as for text: an invalid JSON answer or a broken forced tool choice returns 422, or ends a stream with an error event.
- Nemotron Super now advertises `native_media_tools`, so the coordinator sends it forced tool choice with media and media in tool results. It also advertises `native_media_controls`, which a coordinator can require before it sends a Super request with media and a JSON response format or tools, so Macs without this release do not receive them.
- A media-route refusal names its cause by its failure code. A request control that the text route also refuses (`logit_bias`, `n > 1`, `min_p` other than 0, `prompt_cache_key`, `top_logprobs` outside 0 to 20) is `invalid_request` (400), as are a prompt whose visual tokens do not fit the context and text that names `<image>` or `<video>`. Media the route does not serve (a label or encoding outside the image format reference, audio, more than 16 images, images with a video, a second video, a codec other than H.264 or HEVC) is `unsupported_media` (the coordinator answers 415). Media above a size, pixel or frame limit is `media_too_large` (the coordinator answers 413). Only corrupt media stays `invalid_media` (400).
5 changes: 5 additions & 0 deletions changelog.d/nemotron-super-webp-gif-bmp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Nemotron Super takes WebP, GIF and BMP images

- Nemotron 3.5 Super now decodes WebP, GIF (the first frame) and BMP images as well as PNG and JPEG, under the `data:image/webp`, `data:image/gif` and `data:image/bmp` labels. The coordinator already fetched and inlined these formats; every Super Mac refused them.
- ImageIO decodes them to the same RGB input as PNG and JPEG, under the same byte, pixel and resize limits, checked from the header before any pixel is decoded. A WebP's EXIF orientation is applied as for PNG and JPEG. Alpha is dropped; a fully transparent pixel reads as black.
- Other formats (TIFF, HEIC and the rest) are still refused, now as `unsupported_media`.
50 changes: 40 additions & 10 deletions docs/architecture/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -708,23 +708,26 @@ owner, holds its own media reservations (its prompt's KV pages are charged
like text's, by the engine's process-memory owner), and cancels/drains
through terminal retirement. Synthetic tests exercise image cancellation, reuse
and close. It does not manufacture a shared native lease; the managed slot's
chat route is its only production caller. The CPU `NemotronSuperImageDecode` sniffs PNG or JPEG content and
chat route is its only production caller. The CPU `NemotronSuperImageDecode` sniffs PNG, JPEG, WebP, GIF or BMP content and
reproduces the reference loader's RGB8 conversion: PNG of every colour type and
bit depth is decoded in-process and matches Pillow exactly, while JPEG samples
come from ImageIO within test-enforced bounds. Container limits are checked
come from ImageIO within test-enforced bounds. WebP, GIF (frame 0) and BMP
come from ImageIO (`NemotronSuperImageIORaster`), read without colour
management with alpha dropped. Container limits are checked
before any raster buffer exists, and the SDK resize is bitwise equal to CPU
PyTorch on the golden fixtures; see the
[image format reference](../reference/nemotron-super-image-formats.md).
Its quote alone is not admission. The exact-owner `runEncoded` boundary charges
ingress before JSON/base64/header inspection and media before decode. The media
charge adds the SDK's shape-derived tower and projector working-memory bound for
the largest image, which preparation evaluates one at a time; the global
activation reserve is unchanged. It only accepts `data:image/png;base64,` and
`data:image/jpeg;base64,` URIs, whose content selects the format, and uses the
activation reserve is unchanged. It only accepts `data:image/png;base64,`,
`data:image/jpeg;base64,`, `data:image/webp;base64,`, `data:image/gif;base64,`
and `data:image/bmp;base64,` URIs, whose content selects the format, and uses the
owned tokenizer. Native input arrays are constructed in a separate retained,
fenced epoch before tower preparation. Synthetic RGB tests cover generation,
cancellation, busy rejection and release after task completion; loopback HTTP
tests serve PNG and JPEG variants through the tiny synthetic owner. Actual
tests serve PNG, JPEG, WebP, GIF and BMP variants through the tiny synthetic owner. Actual
tokenizer parity, RADIO peak workspace and full-checkpoint image qualification
remain required.

Expand Down Expand Up @@ -764,8 +767,8 @@ image's charge. As for images, a body over
`NemotronSuperServingPolicy.maximumEncodedBodyBytes` (40 MiB, which holds one
part at the shared 25 MiB inline-media cap as base64 and every body the
provider's transports deliver) returns `media_too_large`, a video prompt over
the context returns the invalid-media 400, and a charge the shared budget
cannot hold returns the media-memory 503. The owner lock covers
the context returns `invalid_request` (400, `promptExceedsContext`), and a
charge the shared budget cannot hold returns the media-memory 503. The owner lock covers
only the admission check while the video prompt is decoded and rendered.
`NemotronSuperVideoDecode.Frames` decodes the movie in order as the batch needs
frames: AVFoundation decodes every frame up to the last sampled one to BGRA,
Expand Down Expand Up @@ -799,12 +802,39 @@ batch's last tubelet, since a token scores only against the same position of
the previous tubelet; the host scores then select the kept rows, the same rows
EVS selects over the whole video. Each tubelet's kept rows are substituted
at its `<image>` run as a causal span with `mediaKind` `video`. A tubelet whose
rows were all pruned keeps its label and wrappers and has no span. Invalid,
oversized or undecodable videos map to the invalid-media 400; a spent decode
allowance maps to the retryable 503. AVFoundation's
rows were all pruned keeps its label and wrappers and has no span. A codec or
frame layout the route does not serve maps to `unsupported_media`, a video
above a frame, frame-count or decoded-pixel limit to `media_too_large`, and an
unreadable movie to `invalid_media`; a spent decode allowance maps to the
retryable 503. AVFoundation's
BGRA conversion differs from FFmpeg's at chroma edges, so frames are close to,
not equal to, the reference loader's.

Image and video requests take the same request plan as text
(`NemotronSuperRequestPlan`): the prompt renders the plan's messages, with the
tool-choice and response-format instructions, its declared tools and its
controls (`imagePromptTokens`, `videoPrompt`), the bridge runs the plan's
`bridgeRequest`, and `NemotronSuperLocalOutput` withholds and validates tool
calls and JSON answers as for text. So `response_format` (`json_object`,
`json_schema`), `tools`, `tool_choice` (auto, none, required, a named
function), `parallel_tool_calls` and `min_p: 0` are served with media, and
every control the text route refuses is refused with media in the same way
(`invalid_request`). Super therefore advertises `native_media_tools`
(`ToolChoiceEnforcementPolicy.advertisesNativeMediaTools`), and the coordinator
routes forced tool choice with media, and media in tool results, to it. It also
advertises `native_media_controls` (`advertisesNativeMediaControls`): during
rollout the coordinator sends a Super request with image or video and a JSON
response format or tools only to a Mac that advertises it.
`NemotronSuperLocalImageBinding.encodedBody` keeps only the media rules. Each
refusal names its cause by its failure code (`SuperHTTPErrors.map`):

| Cause | Failure code |
|---|---|
| A request control, tool or prompt fault, a prompt with its visual tokens beyond the context, or rendered text (message, tool declaration, response-format instruction) that names `<image>` or `<video>` | `invalid_request` |
| A media label or source the route does not take, audio, a content part that is not text, image or video, more than 16 images, images with a video, a second video, an image encoding or geometry the decoder does not serve, a video codec, frame layout or frame geometry it does not serve | `unsupported_media` (`MediaIngest.MediaError.unsupportedMedia`) |
| An image above the byte, pixel or resize-workspace limit, a body above the owner's bound, a video above a frame, frame-count or decoded-pixel limit | `media_too_large` |
| Corrupt or truncated media | `invalid_media` |

SDK installation now holds resident plus bounded staging reservations across
sequential exclusive construction epochs. Completed fences release temporary
roots, while failed completion retains resident objects and charges. Header-derived
Expand Down
7 changes: 5 additions & 2 deletions docs/architecture/model-registry.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Provider Model Registry Boundary

> Last updated: 2026-10-30
> Last updated: 2026-11-09

Providers discover model identity through external registry manifests, then
download and verify model bytes locally. The database and catalog API are owned
Expand Down Expand Up @@ -67,7 +67,10 @@ withholds that id unless `config.json` and `model.safetensors.index.json` are th
pinned bytes (`NemotronSuperServingPolicy.hasPinnedMetadata`); the managed load
verifies every shard. A discovered Super artifact reports `quantization`
`nvfp4`, image input (`ModelMediaPolicy.advertisesMedia`, for that exact id
only), the ordinary template render check, and its managed LOAD footprint
only), the ordinary template render check, `native_media_tools` and
`native_media_controls` (`ToolChoiceEnforcementPolicy`, with image input and a
template that renders: its media route serves forced tool choice, tool-result
media, JSON output and tools), and its managed LOAD footprint
(`NemotronSuperServingPolicy.discoveryFootprint`): `estimated_memory_gb` is the
same on every Mac, what the narrowest configuration the managed load serves
requires (`NemotronSuperLoadFit.narrowestRequirementBytes`: the installation
Expand Down
3 changes: 3 additions & 0 deletions docs/developer/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,9 @@ Nemotron Super image fixtures and their goldens are generated by
[README](../../scripts/nemotron-qualification/README.md)). PNG must match Pillow
byte for byte and the final tensors bitwise; JPEG uses the bounds in the
[image format reference](../reference/nemotron-super-image-formats.md).
`NemotronSuperImageIOFormatTests` decodes WebP, GIF and BMP made from the PNG
fixtures (the three WebP files with `cwebp`, the others in the test) to the same
RGB8, and every sample layout ImageIO returns.
Regenerated fixtures must be byte-identical unless a pinned reference changes.

The three Nemotron Super reference clips in
Expand Down
Loading
Loading