Condition-Aware Neural Network for Controlled Image Generation
Han Cai, Muyang Li, Zhuoyang Zhang, Qinsheng Zhang, Ming-Yu Liu, Song Han
TL;DR
This work tackles the challenge of controlling image generation by enabling conditional weight manipulation in neural networks. It introduces Condition-Aware Neural Network (CAN), which generates a conditional weight $W_c$ from a condition embedding and fuses it with the static weight $W$ to steer generation, applying this to diffusion transformers like DiT and UViT. The authors provide practical design guidelines, ablations showing the critical role of selecting a subset of condition-aware layers, and demonstrate substantial improvements in FID and CLIP controllability, while also achieving major efficiency gains by forming CaT with EfficientViT. These findings show that weight-space conditioning can outperform traditional conditioning methods and enable strong performance on large-scale image synthesis tasks with far lower computational costs, enabling practical deployment on edge devices. CAN thus offers a flexible, efficient approach to controlled image generation with clear applicability to real-world diffusion-based systems.
Abstract
We present Condition-Aware Neural Network (CAN), a new method for adding control to image generative models. In parallel to prior conditional control methods, CAN controls the image generation process by dynamically manipulating the weight of the neural network. This is achieved by introducing a condition-aware weight generation module that generates conditional weight for convolution/linear layers based on the input condition. We test CAN on class-conditional image generation on ImageNet and text-to-image generation on COCO. CAN consistently delivers significant improvements for diffusion transformer models, including DiT and UViT. In particular, CAN combined with EfficientViT (CaT) achieves 2.78 FID on ImageNet 512x512, surpassing DiT-XL/2 while requiring 52x fewer MACs per sampling step.
