NLD-Uni packed image-token bridge
Community extraction of encoder.packed_image_codec.* from NVIDIA NLD-Uni at revision 5db755a2eb0ab84654e3dcf80c7d0245bfe36a50. The original PackedLinearImageCodec packs four neighboring 4096-dimensional visual token embeddings into one parent embedding and expands parent embeddings back into four child embeddings. This learned bridge belongs to the image-generation path; it is not a VAE, a DiT, or a complete image generator. The VQ tokenizer, token embedding and prediction layers, positional encoding, scaling, and language/diffusion backbone are separate and are not included.
The original bridge.py implementation and all four BF16 tensors retain their source names and values. See tensor_mapping.json, extraction.json and validation.json for provenance and the CPU synthetic-input smoke test. The learned compression and expansion are not lossless inverses; lossless integer pack/unpack testing covers only spatial ordering.
Loading
Install PyTorch and safetensors. component.load_model(directory) strictly loads the original module. For example, call model.compress_fixed_grid(embeddings, (height, width)) and model.expand_fixed_grid(parents, (height, width)); both grid dimensions must be even. Inputs should have the same dtype as model parameters. Consult the upstream implementation for the required generation scales and position embeddings.
License
Distributed under the bundled NVIDIA License. Section 3.3 limits use to non-commercial research or evaluation (subject to the stated NVIDIA exception). Retain all source notices.
Model tree for gatilin/nld-uni-packed-image-codec
Base model
nvidia/NLD-Uni