Principle:Deepseek ai Janus Image Post Processing
| Knowledge Sources | |
|---|---|
| Domains | Computer_Vision, Image_Generation |
| Last Updated | 2026-02-10 09:30 GMT |
Overview
A procedure for converting decoded image tensors from normalized float values to displayable uint8 images and saving them to disk.
Description
After the VQ-VAE decoder produces pixel tensors in the range [-1, 1], post-processing converts them to standard image format:
- Convert from NCHW to NHWC layout
- Rescale from [-1, 1] to [0, 255]
- Clip values and cast to uint8
- Create PIL Image objects and optionally save to disk
This is a straightforward numerical transformation that bridges the gap between the model's output representation and standard image file formats.
Usage
Use this principle as the final step in the autoregressive image generation pipeline, after VQ-VAE decoding.
Theoretical Basis
The rescaling formula:
This maps the model's output range [-1, 1] to the standard image range [0, 255].