Towards controllable image and video generation