An unofficial version of Alias-Free Generative Adversarial Networks (https://arxiv.org/abs/2106.12423). This repository was heavily based on Kim Seonghyeon's (rosinality) implementation. The goal of this version is to be maintainable, easy to use, and expand the features of existing implementations. This is built using pytorch and pytorch lightning (a framework that abstracts away much of the hardware specific code).
See open issues unsupported features, planned features, and current bugs.
This project is officially licensed as an MIT project. However, it's requested that you use this repository with the intention of actively elevating historically marginalized communities. Avoid using this project for creating anything that inflicts physical or psychological violence on individuals, groups, or animals.
If you have the financial means please consider contributing to this project or creators of pretrained models.
This project takes money to run because while many continuos integration (ci) tools are free to open source projects, they do not offer the necessary hardware to run tests on GPUs or TPUs. Because of this the ci testing needs to be run using Google Cloud Platform which charges for GPU and TPU instances. Any financial contributions to this project will first go to covering those costs first.
Licenses and contributions for pretrained models is designed to be flexible so please review the information for a particular model before using it.
Buy me a coffee: https://www.buymeacoffee.com/duskvirkus
Tezos Wallet Address: tz1PeE5NQyyjyJdnyqyKdtFN27TvN9j3ZcUe - Only send tezos to this wallet.
devel
is the default branch and it includes the latest features but may have breaking changes.
stable
branch is the latest stable release of the repository the only updates it receives between versions are to the available pretrained models, additional notebooks, and any bug fixes.
Branch | All CI | GPU pytest | TPUs pytest |
---|---|---|---|
devel |
|||
stable |
Training Process
Example of animation made from samples generated in training process.
Linear Interpolations
Example of linear interpolation between two random seeds.
Circular Interpolation
Example of circular loop interpolation
Open Simplex Noise Loop
Example of open simplex noise loop interpolation.
Rosinality Translate
Example output from converted rosinality translate script.
Below is a list of supported model architecture. The hope is to support NVlabs code when it comes out.
model-architecture |
Base Repository | Repository Version Limit [start,end) | Description |
---|---|---|---|
alias-free-rosinality-v1 |
https://github.com/rosinality/alias-free-gan-pytorch | [fixed model commit on July 7th 2021, _) |
Based on rosinality implementation after some model fixes. |
Notes:
- _ means to present unless something breaks and this table is not broken.
- If bracket syntax is confusing you see: https://en.wikipedia.org/wiki/Bracket_(mathematics)#Intervals
aka generate images and walks
Coming at some point in the future.
Use model_name
as --resume_from
argument for trainer.py.
Pretrained models will automatically download using wget but here's link's if that isn't working for some reason. Place them under a pretrained
directory in project root directory.
Description: A 256 model trained by rosinality on ffhq dataset for 800k steps at a batch size of 16.
- Main: https://aliasfreegan.sfo3.cdn.digitaloceanspaces.com/rosinality-ffhq-800k.pt
- Google Drive: https://drive.google.com/file/d/15B_Pz-38eIiUBCiVbgPOcv-TIoT7nc5e
Contributing your trained models for others to transfer learn off of or use in their projects. This helps reduce the training time and resources required to use.
You can do so by creating a pull request to the stable
branch. Add information about your model to the to pretrained_models.json
using the template below.
{
"model_name": "model-name-no-spaces-no-file-extension",
"creator": "github username",
"model_architecture": "see model architecture section",
"description": "Describe your model. What was it trained on? How long was it trained for? Feel free to include links to make donations and suggested donation amounts. Also include licence information such as creative commons or other licencees.",
"model_size": 512,
"wget_url": "Please include a link to download your model in you're pull request and I will update this",
"sha1": "If you know how to make a sha1 hash then you can fill this out if not leave this blank."
}
If you make a notebook and want to share it that is welcome. If it's just a notebook you can just make a pull request to stable
. If it requires changes to the code base please open an issue to discuss which branch it should go on.
Other contributions are welcome but open an issue to discuss what you want to change/add. Unless it's a small non breaking bug fix pull requests may or may not be accepted without discussion beforehand.