Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Deepseek ai Janus Image Post Processing Flow

From Leeroopedia


Knowledge Sources
Domains Computer_Vision, Image_Generation
Last Updated 2026-02-10 09:30 GMT

Overview

A procedure for converting VAE-decoded image tensors to displayable images with optional upscaling for the rectified flow generation pipeline.

Description

Post-processing for JanusFlow-generated images follows a similar pattern to autoregressive post-processing but includes an additional upscaling step. The 384×384 output from the SDXL VAE is upscaled to 1024×1024 using Lanczos interpolation for higher visual quality.

The steps are:

  1. Clamp values to [-1, 1]
  2. Convert NCHW → NHWC and move to CPU numpy
  3. Rescale [-1, 1] → [0, 255] and cast to uint8
  4. Create PIL Images and resize to 1024×1024 with Lanczos

Usage

Use this principle as the final step in the JanusFlow rectified flow generation pipeline.

Theoretical Basis

Same rescaling as autoregressive post-processing:

pixeluint8=(pixelfloat+12×255)

Plus Lanczos upscaling from 384×384 to 1024×1024 for improved visual quality.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment