Imagen PyTorch is an open-source PyTorch implementation of Imagen, Google’s influential text-to-image diffusion model. It reproduces the paper’s cascaded diffusion architecture โ a base image generator followed by super-resolution stages, conditioned on a large frozen T5 text encoder โ in readable, hackable PyTorch code. The project has about 8,400 stars on GitHub, with its most recent updates in 2024.
Google’s Imagen paper showed that scaling the language model matters as much as the image model for photorealistic text-to-image results. This implementation by Phil Wang (lucidrains) makes that research reproducible for the community: it includes the noise-level-conditional U-Net cascade, classifier-free guidance, dynamic thresholding and support for training on your own image-text datasets. The repository also explores extensions toward text-to-video generation. As with most lucidrains projects, the code prioritizes clarity and faithfulness to the paper, making it a popular reference for learning how modern diffusion systems actually work. The implementation includes the training loop as well as sampling, with support for distributed training, checkpointing and both DDPM and faster DDIM-style samplers, so researchers can train smaller Imagen-style models on their own datasets and study how text conditioning, cascade stages and guidance scales affect the output. It is not an official Google release and does not ship with Google’s trained weights, but as an educational and experimental codebase it remains one of the most starred diffusion implementations on GitHub.
Imagen PyTorch is free and open source under the MIT license. Training and sampling run on your own GPU hardware.
Imagen PyTorch is for researchers, students and engineers who want to study, reproduce or build on a landmark text-to-image architecture with clean reference code.