I just open-sourced an introductory-friendly PyTorch implementation for controlling image generation in diffusion models. It’s built on CASteer, which lets us apply pre-computed steering vectors to guide models toward generating images with specific attributes—like “anime”, “happiness”, or even a mix of both!
The code also shows how to use PyTorch hooks to easily extract activations from diffusion models, and then reapply transformations to those activations during inference.
The project is fully open-source—I’d love to hear your feedback and thoughts!
