Field noteNov 16, 20265 min read1 source

Hy-Nomas web worker adds session rollback and KV snapshot APIs

In one minute

Tencent-Hunyuan’s Hy-Nomas web worker now exposes HTTP APIs to roll back the latest interactive video segment and snapshot or restore a live session. The update gives builders explicit controls for undoing and resuming generation, but snapshot and restore currently require a single-GPU worker and trusted local snapshot files.

What changed: Hy-Nomas adds HTTP session rollback, state snapshot, and restore APIs for interactive GPU-worker sessions.

What happened

Tencent-Hunyuan’s GitHub commit adds session-lifecycle operations to the Hy-Nomas GPU worker’s web interface. POST /v1/rollback accepts a session_id, removes the most recently generated segment, and restores its matching KV/cache state. The project documentation describes this as the same primitive used by the demo’s undo button. GET /v1/session/state returns the active session ID and the current cache_valid_len, making the worker’s current session state observable to an application.

The commit adds two persistence endpoints. POST /v1/session/snapshot accepts a session ID and a filesystem path, while POST /v1/session/restore accepts the same fields and loads a prior snapshot on the same worker. The implementation checks that both fields are present and returns errors for an absent path, an invalid snapshot, a snapshot belonging to a different session, or a snapshot without a KV cache. Snapshot creation is restricted to the currently active session on the worker.

Tencent-Hunyuan’s documentation says the saved state includes the KV cache, cache masks, noise state, random-number-generator state, frame counters, segment metadata, and the PixelUMM streaming decode session. The saved decoder state covers latent buffers, pending data, window counters, committed output, and push history. The intended result is that a restored session continues the same stable-prefix decoder timeline rather than beginning a fresh decode sequence.

The implementation writes a temporary file and then renames it into place, so an interrupted save does not replace a previously valid snapshot with a partial one. On restore, it loads and validates the snapshot before resetting the live pipeline state. It also checks that cache masks agree with the stored KV cache and moves stored tensor state back to the worker device before continuing generation. The restore response reports the session ID, a restored flag, and cache_valid_len.

There are material operational limits. Snapshot and restore require world_size == 1; the documentation says multi-rank restoration would need collective coordination because non-zero ranks retain their own KV and PixelUMM state. The code also limits snapshot and restore initiation to rank zero. Tencent-Hunyuan states that snapshots use torch.save and contain tensors and RNG state, so operators should restore only files created by the same worker and treat those files as trusted local files. The commit exposes the HTTP surface and documents it; it does not announce pricing, a managed offering, or general multi-worker recovery.

What the archive adds

New Runtime covered Hy-Nomas support in SGLang for offline video jobs and real-time WebSocket generation in an earlier Field Note on 2026-10-28. That was a related serving integration; this is a new fact about the Hy-Nomas web worker’s session controls, not a restatement.

Trend signal

This supports agent-ready software exposes capabilities. The worker now presents inspect, undo, save, and resume operations as bounded HTTP calls with explicit session IDs and restrictions. These are operator-facing controls for a generation system rather than an agent-specific protocol, so the fit is limited, but it illustrates how stateful AI services become composable when their lifecycle actions are addressable.

Why now

The commit moves the demo’s undo operation onto the web worker’s HTTP interface and adds persistent state for the active session. For an interactive generation application, that creates a distinction between abandoning a generation run and deliberately rolling it back or suspending it for later continuation. Tencent-Hunyuan does not state an external deadline or rollout trigger for the change.

Why it matters

Interactive video generation has different operational needs from a one-shot request. A user may want to remove only the latest unwanted segment, or an application may need to pause a world and return to it later without discarding the context accumulated in the worker. The new endpoints offer a defined API contract for those actions instead of forcing a client to restart the entire session.

The details matter to teams integrating the worker. A snapshot contains more than a visible output: it includes cache, decoding, frame, and random-state information needed for continuity. That makes snapshot storage a part of the application’s operational design. The atomic write and pre-reset validation are useful safeguards against corrupting the active world when a save or restore goes wrong.

The single-GPU restriction is equally important. Teams using multi-rank workers cannot treat these endpoints as a complete checkpoint or failover mechanism, because state must still be coordinated across ranks. For the supported configuration, the feature is a practical building block for undo and saved interactive sessions, not a general guarantee of distributed recovery or portable migration.

Limits and uncertainty

Tencent-Hunyuan documents the endpoint behavior, validation checks, and current single-GPU restriction, but does not publish measurements for snapshot size, save time, restore latency, GPU-memory impact, or reliability across repeated interruptions. It does not claim multi-rank support, cross-worker portability, or compatibility between different worker versions. The same-worker requirement also limits how snapshots can be used in a fleet.

The commit’s safeguards are implementation-level protections, not an independent assessment of recovery quality under production failures. In particular, the documentation warns that torch.save snapshots contain tensors and RNG state and should be treated as trusted local files. Operators should therefore not assume that a snapshot is safe to ingest from a user-controlled location or that it is a secure interchange format.

Skill to build now

If you operate a stateful generation worker, define a small lifecycle API before adding autonomous clients: expose a session identifier, a read-only state endpoint, a rollback action, and a checkpoint action. Use atomic writes for checkpoints and validate the full checkpoint before replacing live state. Apply this pattern only where the state ownership is clear; for multi-worker or multi-rank execution, first define how every participant coordinates its state.

Reader takeaway

Hy-Nomas now makes undo and save/resume accessible through HTTP for its interactive generation worker. Builders can use the endpoints to preserve continuity on a single-GPU deployment, provided they keep snapshots local and trusted. Distributed recovery remains outside the documented support boundary.

Evidence / sources

  1. 1github.com/Tencent-Hunyuan/Hy-Nomas/commit/36e2bdb0f91455d97e4dbd8e64af0129707cecdf
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicGenerative MediaExplore the generative-media topic hub.
  2. 02topicApi DesignExplore the api-design topic hub.
  3. 03archiveField NotesOpen the latest editorial analysis.
  4. 04sourcesSourcesSee the original sources this archive cites.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract