StyleGAN2 Pytorch - Typed, Commented, Installable :)
MIT License
A simple, typed, commented Pytorch implementation of StyleGAN2.
This implementation is adapted from here. This implementation seems more stable and editable than the over-engineered official implementation.
The focus of this repository is simplicity and readability. If there are any bugs / issues, please kindly let me know or submit a pull request!
Refer to my blog post for an explanation on the custom CUDA kernels. The profiling code to optimize the custom operations is here.
pip install stylegan2-torch
Pytorch is known to cause random reboots when using non-deterministic algorithms. Set torch.use_deterministic_algorithms(True)
if you encounter that.
conv2d_gradfix.py
and fused_act.py
. These were just copied over from the original repo so they are still ugly and untidy.