1. Quick start
Follow the SGLang Diffusion installation guide on Linux with NVIDIA CUDA. Onesglang serve process answers both HTTP video jobs and realtime WebSocket sessions. On first load, SGLang downloads the official checkpoints and assembles a local pipeline; see Weights.
2. Model capabilities
HY-Nomas is Tencent Hunyuan’s video world model. A video is described as a sequence of events: each event is a structured JSON caption with a frame count and optional camera poses. The model generates one event at a time while attending to the cached state of earlier events, so a scene can be extended or redirected without regenerating what came before. Choose it for long, steerable scene continuation, either as one offline request with all events planned up front or as a live session that receives events one by one. It generates from noise: there is no image-to-video input. Captions must follow the official event JSON schema, which the official prompt enhancer (Nomas-PE) produces from free text; SGLang does not host that enhancer. The code and weights are released under Apache-2.0. See the GitHub repository for the event schema and training details.3. Deployment
Command
Command
--tp-size 2) also runs, but its trained-weight output differs from one GPU, so prefer SP. tp_size * sp_degree must divide the 16 attention heads, and TP and SP can be combined. Ring attention, CFG parallelism and data parallelism are rejected. Both layouts shard only the DiT computation; the text encoder and decoder are not placed on a separate GPU.
To reduce DiT memory, stream its blocks from host memory:
Command
Weights
tencent/Hy-Nomas is resolved through a pinned model overlay. It downloads the official distilled, non-quantized DiT, the PixelUMM decoder and the Qwen2.5-VL text encoder. It then caches a Diffusers-style pipeline under SGLANG_DIFFUSION_CACHE_ROOT. Weights keep their original values and dtypes. Later starts reuse the cache, and a local directory with the same layout can be passed to --model-path instead. The first load needs extra disk space for the decoder export.
The overlay does not include Nomas-PE, LoRA adapters, or FP8/INT8 variants. To use the official quantized checkpoints, override the component weights as shown below.
INT8 DiT and FP8 VAE
On Linux with NVIDIA CUDA, you can use the official INT8 DiT and FP8 VAE checkpoints from tencent/Hy-Nomas. The FP8 VAE requires an SM89 or newer GPU, such as an RTX 4090, and BF16 compute precision. Download the two files with the Hugging Face CLI:Command
Command
4. Offline and HTTP generation
A request lists its events insegments. Each caption is a JSON string in the official event schema; later events usually describe only what changes. This two-event request makes 240 frames at 352×640 and saves it as request.json:
Python
GET /v1/videos/{id} and download from GET /v1/videos/{id}/content:
Command
Python
Event frame counts do not need to be multiples of four; the decoded video is cropped to each requested count. Sampling noise is always drawn on the CPU, so a fixed seed gives the same video through the Python API and HTTP.
5. Realtime session
Openws://HOST:PORT/v1/realtime_video/generate and exchange MessagePack maps.
Each event is generated as soon as it arrives, against the session’s cached history. The decoder streams in overlapping windows and sends a frame only when no later window can change it, so frames are never revised. Output therefore lags generation, and
end releases the tail: a 120 + 120 frame session sends 84, 120 and then 36 frames.
The server keeps one session at a time and rejects a second connection. Disconnecting ends the session and frees its state; there is no resume. Because a session draws noise from a persistent bank, compare its frames with another session using the same seed, not with an offline request.
A minimal client sends the first event in init, the rest as segment events, then end, and collects raw RGB frames until the server closes the socket:
Python
caption.
KV cache budget
The session cache starts at 65,536 tokens and grows by 1.5× up to 32 GiB, or to free GPU memory minus 8 GiB, whichever is smaller. At that limit, the oldest event is evicted first, as in the official code. Settingmax_cache_segments also limits the number of cached events. Positions keep counting across evictions. If a cache write fails after an eviction, the session must be restarted.
These limits are NomasPipelineConfig fields (interactive_kv_cache_initial_tokens, interactive_kv_cache_growth_factor, max_cache_gib, cache_free_memory_reserve_gib, max_cache_segments). At 1280×704, one 10-latent event uses about 4.5 GB of K/V on one GPU; TP and SP divide this across ranks.
6. Limitations
- No image-to-video, classifier-free guidance, or raw camera-pose normalization.
- Nomas-PE is not served by SGLang.
- One realtime session per server; Ring attention, KV CPU swap, INT8 KV and sliding-window history are not implemented.
- TP output is not yet equivalent to single-GPU output with trained weights.
- Validation was on H200 only.
