#memory efficient image generation