PiD-EfficientGen: Fast 4K image decoding in 4 steps
2 min readupdated
The project introduces optimized decoder weights based on the NVIDIA PiD and PiD-QDM-Halo2 architecture, transforming a compact latent representation into a detailed RGB image with a 4x resolution increase up to 4K. It features a hybrid approach: standard attention in 14 PixelDiT patch blocks is replaced with sliding-window attention and QDM (quadrant delta memory to reduce compute overhead). The release includes two weight packages—VDN and a distilled DMD2—along with ready-to-use configurations for integration with Z-Image-Turbo. The tool is designed for researchers and developers who need fast generation of ultra-high-resolution images.
Key features
- Replaces heavy attention in PixelDiT blocks with a combination of sliding-window attention and QDM while preserving PiT pixel blocks.
- Distilled DMD2 student (initialized from step 7,629 of the VDN model) generates results in just 4 steps using the DMD2 SDE sampler.
- Sparse configuration writing to every second patch column for additional resource savings.
- Fourfold upscaling from low-resolution latent to a full RGB image (with support for 1024x1024 verification).
What you can do
- Run ultra-fast 4K generation in 4 steps via the
pid-hybrid-dmd2.yamlconfig paired with Z-Image-Turbo. - Compare the quality of the baseline 25-step VDN decoder (Flow DPMS multistep) and the distilled 4-step DMD2 version.
- Test the sparse mode
pid-hybrid-dmd2-sparse.yamlto speed up inference on accessible hardware.
Example
git clone [https://github.com/gcy-hub/PiD-EfficientGen.git](https://github.com/gcy-hub/PiD-EfficientGen.git)
cd PiD-EfficientGen
conda env create -f environment.yml && conda activate pid-efficientgen
python -m pip install -e .
hf auth login
python scripts/download.py models pid gemma zimage --dest assets
scripts/infer.sh assets/packages/configs/pid-hybrid-dmd2.yamlRead more
DetailsConfigs: pid-hybrid (25 steps, CFG 5), pid-hybrid-dmd2, and sparse (4 steps, CFG 1).
Hardware: CUDA GPU with BF16 support and sufficient VRAM for 4K decoding required.
Limitations: NVIDIA NSCLv1 license — strictly for non-commercial research and evaluation; VDN requires the PiD v1.5 FLUX undistilled checkpoint.










Comments