Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate/ skip Aug_Strength variable when resuming from previous pkl #220

Open
wants to merge 134 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
df455bf
Created using Colaboratory
dvschultz Feb 1, 2021
6938748
Created using Colaboratory
dvschultz Feb 1, 2021
626357f
mirrory, jpg fakes
dvschultz Feb 1, 2021
f19bfe7
nkimg, initstrength
dvschultz Feb 1, 2021
adac746
Update README.md
dvschultz Feb 1, 2021
4cd2a0c
added lrate
dvschultz Feb 4, 2021
25bc2ce
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Feb 4, 2021
fe639ad
Created using Colaboratory
dvschultz Mar 1, 2021
0ae074b
Created using Colaboratory
dvschultz Mar 1, 2021
dc48e43
Created using Colaboratory
dvschultz Mar 1, 2021
66f60a1
basic interpolation
dvschultz Mar 6, 2021
206f7e0
Update README.md
dvschultz Mar 6, 2021
9e24874
w space interpolation
dvschultz Mar 6, 2021
cebf277
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Mar 6, 2021
03a1942
slerp in z
dvschultz Mar 6, 2021
4edb4db
noiseloop
dvschultz Mar 6, 2021
5cf0f36
Create FUNDING.yml
dvschultz Mar 7, 2021
7f7778f
Created using Colaboratory
dvschultz Mar 7, 2021
bc823c6
circularloop
dvschultz Mar 7, 2021
f08c60d
Created using Colaboratory
dvschultz Mar 7, 2021
9d95434
autogenerate video names
dvschultz Mar 7, 2021
0bd7122
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Mar 7, 2021
ba4023b
Created using Colaboratory
dvschultz Mar 7, 2021
6d16b0c
truncation traversal
dvschultz Mar 7, 2021
2cc20cf
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Mar 7, 2021
4a28ebb
Created using Colaboratory
dvschultz Mar 7, 2021
31abf0e
Created using Colaboratory
dvschultz Mar 7, 2021
4f88902
Created using Colaboratory
dvschultz Mar 9, 2021
471dca6
tweak to prjector order
dvschultz Mar 12, 2021
0ba224d
adding Philip Bizimis updates to cff
dvschultz Mar 17, 2021
2aa9d1e
Update README.md
dvschultz Mar 17, 2021
260cf01
Created using Colaboratory
dvschultz Mar 17, 2021
b61db91
Add index and seed feature to image and video generation.
pbizimis Mar 18, 2021
afc611d
Fix r{x} random sampling bug
pbizimis Mar 18, 2021
c9deee2
Merge pull request #2 from pbizimis/main
dvschultz Mar 19, 2021
f7dc3ca
Created using Colaboratory
dvschultz Mar 20, 2021
84c5def
combine npz script
dvschultz Mar 20, 2021
759c092
interpolation from projection
dvschultz Mar 20, 2021
af6d84d
added pbaylies projector
dvschultz Mar 20, 2021
6d1c984
Update README.md
dvschultz Mar 20, 2021
bf90d0c
flipping image video gen order for my sanity
dvschultz Mar 20, 2021
36820a4
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Mar 20, 2021
6e64aa0
some easing code, safer projector
dvschultz Mar 21, 2021
d24f806
Add weight layer to cff
pbizimis Mar 21, 2021
41cd9ad
Add script to convert to rosinality state dict
justinpinkney Mar 23, 2021
182a62c
Merge pull request #3 from pbizimis/main
dvschultz Mar 24, 2021
a58b679
Merge pull request #4 from justinpinkney/convert-weights
dvschultz Mar 24, 2021
c1bb539
minor fix to range of n_layers
dvschultz Mar 24, 2021
08e892e
Update README.md
dvschultz Mar 24, 2021
d56aab2
Update README.md
dvschultz Mar 24, 2021
e36e969
Created using Colaboratory
dvschultz Mar 24, 2021
a270284
inter-truc
dvschultz Mar 28, 2021
3ef25d3
idk
dvschultz Mar 28, 2021
5769876
more easings
dvschultz Apr 5, 2021
76104b2
Created using Colaboratory
dvschultz Apr 5, 2021
d718a50
Created using Colaboratory
dvschultz Apr 8, 2021
631ff97
Created using Colaboratory
dvschultz Apr 24, 2021
f9776ee
Created using Colaboratory
dvschultz Apr 28, 2021
c6f1d00
Add flesh_digressions script
grddavies May 18, 2021
535c42f
Set noise mode to const for frame generation
grddavies May 18, 2021
1b2dffb
Remove numpy.typing dep
grddavies May 18, 2021
d425d34
Merge pull request #10 from grddavies/flesh-digressions
dvschultz May 22, 2021
038b5bd
Update README.md
dvschultz May 22, 2021
28edfb4
Update README.md
dvschultz May 22, 2021
c7c591b
Created using Colaboratory
dvschultz May 22, 2021
7e603d1
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz May 23, 2021
925ed31
test size
dvschultz May 23, 2021
158d7da
progress
dvschultz May 24, 2021
81fdc8a
addd util folder
dvschultz May 24, 2021
1a6c981
updates to remove latmask
dvschultz May 24, 2021
c9d6c5e
fix for loading old models
dvschultz May 24, 2021
1156e0d
flip x-y, thank Vadim
dvschultz May 24, 2021
329f88b
Merge branch 'main' into eps
dvschultz May 24, 2021
88d8fc2
Merge pull request #11 from dvschultz/eps
dvschultz May 24, 2021
07a2639
fix for vertical mirroring
dvschultz May 25, 2021
3821a95
Update README.md
dvschultz May 25, 2021
2d37ca1
Created using Colaboratory
dvschultz May 25, 2021
b8bd38e
fixes for new custom pkl loader
dvschultz May 27, 2021
07f8340
Updated README.md with Colab Buttons
odomojuli May 30, 2021
ea1d9db
Updated to reflect mirror_y set to working.
odomojuli May 30, 2021
f3d7a4b
fixed update repo cell
dvschultz Jun 1, 2021
8d1da07
Merge pull request #13 from odomojuli/patch-2
dvschultz Jun 2, 2021
6d147be
Merge pull request #12 from odomojuli/patch-1
dvschultz Jun 2, 2021
5494725
Update README.md
dvschultz Jun 2, 2021
82087ef
factorization uses w space by default
dvschultz Jun 4, 2021
88d82a9
Update Factorization in W
dvschultz Jun 4, 2021
e38122f
Created using Colaboratory
dvschultz Jun 8, 2021
5583f56
Created using Colaboratory
dvschultz Jun 8, 2021
a558683
fix for < 1024 models in w space
dvschultz Jun 8, 2021
cc367b9
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Jun 8, 2021
43df74e
unknown kwargs are now warnings not errors
dvschultz Jun 15, 2021
d472f99
Update README.md
dvschultz Jun 15, 2021
b6f5dc4
unknown kwargs are now warnings not errors
dvschultz Jun 15, 2021
f5db63d
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Jun 15, 2021
faec52b
add blend models script
dvschultz Jun 15, 2021
a418534
Created using Colaboratory
dvschultz Jun 16, 2021
e73851d
Update README.md
dvschultz Jun 16, 2021
df9d1dc
fix slerp in w
dvschultz Jun 16, 2021
783c0b4
Merge branch 'main' of https://github.com/dvschultz/stylegan2-ada-pyt…
dvschultz Jun 16, 2021
6ac16b2
Created using Colaboratory
dvschultz Jun 16, 2021
0772e4d
Created using Colaboratory
dvschultz Jun 16, 2021
c375a92
Update README.md
dvschultz Jun 16, 2021
4c0fc10
Update README.md
dvschultz Jun 16, 2021
3d88de9
Save latent_avg in model export
dvschultz Jun 20, 2021
f04757d
Created using Colaboratory
dvschultz Jun 23, 2021
289f0b7
Created using Colaboratory
dvschultz Jun 23, 2021
af55ab4
flesh digressions now uses non-square
dvschultz Jun 26, 2021
cb2d297
testing epoch count
dvschultz Jun 30, 2021
8b8b321
move epochs to G
dvschultz Jun 30, 2021
aa41a17
init G epochs
dvschultz Jun 30, 2021
b82fde8
full topk function
dvschultz Jun 30, 2021
d9012a0
correctly formed topk functions
dvschultz Jun 30, 2021
123087a
Merge pull request #16 from dvschultz/topk
dvschultz Jun 30, 2021
d5f867e
Update README.md
dvschultz Jun 30, 2021
c8be56d
bad derrick
dvschultz Jun 30, 2021
707b404
bad derrick (remove prints)
dvschultz Jun 30, 2021
f6d1002
unsqueeze not expand
dvschultz Jun 30, 2021
bdd527c
seeded values for flesh disgressions
dvschultz Jul 13, 2021
1df51c2
3 seeds for circularloop
dvschultz Jul 15, 2021
464100c
lil cleanup
dvschultz Jul 15, 2021
27965f4
Created using Colaboratory
dvschultz Feb 23, 2022
e0ba7ed
fixed cuda version for google colab
manzke Feb 24, 2022
83a22ea
fix for latest osn module
dvschultz Mar 3, 2022
9b6750b
value_range -> range
dvschultz Mar 10, 2022
de22823
Merge pull request #31 from manzke/patch-1
dvschultz Jul 10, 2022
b4091b9
Created using Colaboratory
dvschultz Aug 5, 2022
59e05bb
added opensimplex
dvschultz Sep 3, 2022
8371d22
Adds 2.0 pytorch as possible version in grid_sample_gradfix.py
ada-ada-ada-art Aug 9, 2023
390b9bb
Changes conv2d_gradfix.py to include pytorch 2.0
ada-ada-ada-art Aug 9, 2023
0edaf24
Try to fix tuple object is not callable error
ada-ada-ada-art Aug 9, 2023
4bc299a
changes 2d to 3d in the prev fix
ada-ada-ada-art Aug 9, 2023
a2620bb
Adds a fix found on SG3 repo for pytorch 1.11
ada-ada-ada-art Aug 9, 2023
b7a25e0
Implements fix from SG3 repo code
ada-ada-ada-art Aug 9, 2023
0e2caab
Merge pull request #48 from ada-ada-ada-art/main
dvschultz May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: dvschultz
patreon: bustbright
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.youtube.com/channel/UCaZuPdmZ380SFUMKHVsv_AA/join']
302 changes: 302 additions & 0 deletions Network_Blending_ADA_PT.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Network-Blending-ADA-PT.ipynb",
"private_outputs": true,
"provenance": [],
"machine_shape": "hm",
"mount_file_id": "17KlZS6Ax5HEcJDhW0EVAsrOrXBeTVqxv",
"authorship_tag": "ABX9TyN0OSZzbXfWmS2HYwtpQSn3",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/dvschultz/stylegan2-ada-pytorch/blob/main/Network_Blending_ADA_PT.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "CdkWE1TKUWwB"
},
"source": [
"# Network Blending\n",
"This demo will show how to combine two separate StyleGAN2-ADA-PyTorch models into one by splitting their weights at a specified layer.\n",
"\n",
"This example was created by Derrick Schultz for his Advanced StyleGAN2 class. It’s a simpler version of [Justin Pinkney’s Tensorflow version](https://github.com/justinpinkney/stylegan2/blob/master/blend_models.py).\n",
"\n",
"---\n",
"\n",
"If you find this notebook useful, consider signing up for my [Patreon](https://www.patreon.com/bustbright) or [YouTube channel](https://www.youtube.com/channel/UCaZuPdmZ380SFUMKHVsv_AA/join). You can also send me a one-time payment on [Venmo](https://venmo.com/Derrick-Schultz).\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "aJFXX8WIBeqy"
},
"source": [
"!nvidia-smi -L"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "hvwu1LpCOJtz"
},
"source": [
"!git clone https://github.com/dvschultz/stylegan2-ada-pytorch\n",
"%cd stylegan2-ada-pytorch\n",
"!pip install ninja opensimplex"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "O09iXoAPQsHX"
},
"source": [
"## Download two models"
]
},
{
"cell_type": "code",
"metadata": {
"id": "p9dwvbtWp97y"
},
"source": [
"!wget http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-church-config-f.pkl\n",
"!wget http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-cat-config-f.pkl"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "kRQUzZK2HHSt"
},
"source": [
"!gdown --id 15GpzB-wTwGIZC_Wu0ruaEJi7-giRWOOo -O /content/bone-bone.pkl\n",
"!wget http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-ffhq-config-f.pkl"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "FnHs7WBuqXDo"
},
"source": [
"!python legacy.py --source=/content/stylegan2-ada-pytorch/stylegan2-ffhq-config-f.pkl --dest=/content/ffhq-pt.pkl\n",
"!python legacy.py --source=/content/bone-bone.pkl --dest=/content/bone-bone-pt.pkl"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "c_kFpXUAvcTP"
},
"source": [
"## Script Example\n",
"If you want to simply run the command as a script, you run the cell below."
]
},
{
"cell_type": "code",
"metadata": {
"id": "s_P9TtAsv_xW"
},
"source": [
"!python blend_models.py --help"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "A-S0KjY1vuzj"
},
"source": [
"!python blend_models.py --lower_res_pkl /content/ffhq-pt.pkl --split_res 64 --higher_res_pkl /content/bone-bone-pt.pkl --output_path /content/ffhq-bonebone-split64.pkl"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "4uDMVyB0UCiS"
},
"source": [
"## Code example\n",
"\n",
"If you want to see under the hood here’s how this works."
]
},
{
"cell_type": "code",
"metadata": {
"id": "ENNGfqvKS59e"
},
"source": [
"import os\n",
"import copy\n",
"import numpy as np\n",
"import torch\n",
"import pickle\n",
"import dnnlib\n",
"import legacy\n",
"\n",
"def extract_conv_names(model, model_res):\n",
" model_names = list(name for name,weight in model.named_parameters())\n",
"\n",
" return model_names\n",
"\n",
"def blend_models(low, high, model_res, resolution, level, blend_width=None):\n",
"\n",
" resolutions = [4*2**x for x in range(int(np.log2(resolution)-1))]\n",
" print(resolutions)\n",
" \n",
" low_names = extract_conv_names(low, model_res)\n",
" high_names = extract_conv_names(high, model_res)\n",
"\n",
" assert all((x == y for x, y in zip(low_names, high_names)))\n",
"\n",
" #start with lower model and add weights above\n",
" model_out = copy.deepcopy(low)\n",
" params_src = high.named_parameters()\n",
" dict_dest = model_out.state_dict()\n",
"\n",
" for name, param in params_src:\n",
" if not any(f'synthesis.b{res}' in name for res in resolutions) and not ('mapping' in name):\n",
" # print(name)\n",
" dict_dest[name].data.copy_(param.data)\n",
"\n",
" model_out_dict = model_out.state_dict()\n",
" model_out_dict.update(dict_dest) \n",
" model_out.load_state_dict(dict_dest)\n",
" \n",
" return model_out"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ovSNBUBxOeXt"
},
"source": [
"lo_res_pkl = '/content/freagan-pt.pkl'\n",
"hi_res_pkl = '/content/ladiescrop.pkl'\n",
"model_res = 1024\n",
"level = 0\n",
"blend_width=None\n",
"out = '/content/blend-frea-ladiestransfer-128.pkl'\n",
"\n",
"G_kwargs = dnnlib.EasyDict()\n",
"\n",
"with dnnlib.util.open_url(lo_res_pkl) as f:\n",
" # G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore\n",
" lo = legacy.load_network_pkl(f, custom=False, **G_kwargs) # type: ignore\n",
" lo_G, lo_D, lo_G_ema = lo['G'], lo['D'], lo['G_ema']\n",
"\n",
"with dnnlib.util.open_url(hi_res_pkl) as f:\n",
" # G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore\n",
" hi = legacy.load_network_pkl(f, custom=False, **G_kwargs)['G_ema'] # type: ignore\n",
" #hi_G, hi_D, hi_G_ema = hi['G'], lo['D'], lo['G_ema']\n",
"\n",
"rezes = [8,16,32,64,128]\n",
"for r in rezes: \n",
" model_out = blend_models(lo_G_ema, hi, model_res, r, level, blend_width=blend_width)\n",
"\n",
" # for n in model_out.named_parameters():\n",
" # print(n[0])\n",
"\n",
" #save new pkl file\n",
" out = f'/content/blend-frea-ladiestransfer-{r}.pkl'\n",
" data = dict([('G', None), ('D', None), ('G_ema', None)])\n",
" with open(out, 'wb') as f:\n",
" #misc.save_pkl((low_res_G, low_res_D, out), output_pkl)\n",
" data['G'] = lo_G\n",
" data['D'] = lo_D\n",
" data['G_ema'] = model_out\n",
" pickle.dump(data, f)\n",
"\n"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "M0XUCmyJUJ66"
},
"source": [
"## Test Generating Images With Your New Model"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "qEe21is5r1qV"
},
"source": [
"for r in rezes:\n",
" !python generate.py --outdir=/content/out/blended-frea-ladiestransfer2-{r}/ --trunc=0.6 --seeds=0-24 --network=/content/blend-frea-ladiestransfer-{r}.pkl"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "B8WmzAmLsL8I"
},
"source": [
"!zip -r transferred-blends_r2.zip /content/out"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "OF258_TAuFV1"
},
"source": [
""
],
"execution_count": null,
"outputs": []
}
]
}
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
## Add to Colab

### StyleGAN2-ADA PyTorch (Start Here)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/dvschultz/stylegan2-ada-pytorch/blob/main/SG2_ADA_PyTorch.ipynb)

### StyleGAN2-ADA-PyTorch to Rosinality Convertor
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/dvschultz/stylegan2-ada-pytorch/blob/main/SG2_ADA_PT_to_Rosinality.ipynb)

### StyleGAN2-ADA PyTorch Reactive Audio
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/dvschultz/stylegan2-ada-pytorch/blob/main/SG2-ADA-PT_AudioReactive%2BPitch.ipynb)

### Blending Network Demo/Explainer
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/dvschultz/stylegan2-ada-pytorch/blob/main/Network_Blending_ADA_PT.ipynb)

## Need Help?
* If you’re new to StyleGAN2-ADA and looking to get started, please check out [this video series](https://www.youtube.com/playlist?list=PLWuCzxqIpJs8ViuBIUtAk-dsAtdrApYoy) from a course Lia Coleman and I taught in October 2020.
* Interested in contributing? Please submit PRs or discuss changes in the [Artificial Images Slack](https://join.slack.com/t/ml-images/shared_invite/zt-9mxoe7va-eBZ9xzAWpx8VRL~Km_PzUQ) channel

## Edits made to this repo

* **Fakes .jpg**: save yourself a ton of space with fakes during training saved as .jpg instead of .png
* **Multiple interpolation options**: use `--process="interpolation"`, see `--help` for more options
* **Easing options for interpolations**: see `--help` for more (this would be a great place for new coders to build additional feautures/options)
* **Vertical Mirroring**: use `--mirrory=True` to flip training set top to bottom (fixed, thanks [Diego](https://github.com/PDillis/stylegan2-ada-pytorch))
* **Set Initial Augmentation Strength**: use `--initstrength={float value}` to set the initialized strength of augmentations (really helpful when restarting training)
* **Set Initial Kimg count**: use `--nkimg={int value}` to set the initial kimg count (helpful with restarts)
* **Closed Form Factorization:** converted from Rosinality repo by [Philip Bizimis](https://github.com/pbizimis); additional video creation features
* **Additional Projector Techniques** Thanks to Peter Baylies for his projector code that optionally uses pixel-based loss or CLIP
* **Interpolate from Projector .npz Files** Use the `combine_npz.py` script to combine multiple .npz files
* **Convert to Rosinality model structure** Thanks to [Justin Pinkney](https://github.com/justinpinkney) for making this! Converting to Rosinality opens up numerous additional tools for manipulatinng StyleGAN models
* **Custom data in Tensorflow models will no longer error out when converting to Official PyTorch format** Allows for conversion from many of the custom models on the [Awesome Pretrained SG2 repo](https://github.com/justinpinkney/awesome-pretrained-stylegan2) (This has the potential for problems but I’ve yet to find one.)
* **Output size modification** Thank you to [Vadim Epstein](https://github.com/eps696/stylegan2ada) for allowing me to port his code for modifying output size for image and video generation. See `--size` and `--scale-type` in the generation script for more details.
* **Flesh digressions script** based on Aydao script (ported by [grddavies](https://github.com/grddavies), thanks!)
* **Blend Two Models at specific resolution layer** Based on [Justin Pinkney’s Tensorflow version](https://github.com/justinpinkney/stylegan2/blob/master/blend_models.py)
* **Experimental Top-K training function** Improve generator training by only propagating gradients from images the discriminator was most unsure of: [Sinha & Zhao](https://arxiv.org/abs/2002.06224). Use `--topk={float value}` to define the decay rate. Ported from code written by [Hans Brouwer](https://github.com/JCBrouwer) from [SG2-ADA Tensorflow version](https://github.com/dvschultz/stylegan2-ada/issues?q=is%3Apr+author%3AJCBrouwer).

## StyleGAN2-ADA &mdash; Official PyTorch implementation

![Teaser image](./docs/stylegan2-ada-teaser-1024x252.png)
Expand Down
Loading