MaskUnet
MaskUnet is an official PyTorch implementation of the CVPR 2025 paper Not All Parameters Matter: Masking Diffusion Models for Enhancing Generation Ability. It introduces a novel method that improves diffusion model generation quality by masking specific U-Net parameters, challenging the assumption that all parameters are necessary throughout the denoising process. The approach leverages the finding that certain parameters, including those with large magnitudes, can be selectively disabled to enhance performance. MaskUnet dynamically identifies timestep- and sample-dependent effective parameters to optimize the generation process. The framework supports two operational modes: a training-based optimization setting and a training-free setting that requires no additional parameter updates. Designed to be lightweight, it achieves significant performance gains on benchmarks like COCO and demonstrates strong generalization to downstream tasks while introducing negligible computational overhead. The tool is applicabl