Skip to content

Commit f3d6bbc

Browse files
committed
Add PR NVlabs#45 by Bob Burrough, fix name of pretrained model, add options in discriminator_synthesis.py
1 parent 799c4de commit f3d6bbc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

discriminator_synthesis.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def discriminator_dream(
389389
@click.option('--network', 'network_pkl', help='Network pickle filename', required=True)
390390
# Synthesis options
391391
@click.option('--seed', type=int, help='Random seed to use', default=0, show_default=True)
392-
@click.option('--random-image-noise', 'image_noise', type=click.Choice(['random', 'perlin']), default='random', show_default=True)
392+
@click.option('--random-image-noise', '-noise', 'image_noise', type=click.Choice(['random', 'perlin']), default='random', show_default=True)
393393
@click.option('--starting-image', type=str, help='Path to image to start from', default=None)
394394
@click.option('--class', 'class_idx', type=int, help='Class label (unconditional if not specified)', default=None)
395395
@click.option('--lr', 'learning_rate', type=float, help='Learning rate', default=5e-3, show_default=True)
@@ -403,7 +403,7 @@ def discriminator_dream(
403403
@click.option('--octave-scale', type=float, help='Image scale between octaves', default=1.4, show_default=True)
404404
@click.option('--unzoom-octave', type=bool, help='Set to True for the octaves to be unzoomed (this will be slower)', default=False, show_default=True)
405405
# Individual frame manipulation options
406-
@click.option('--pixel-zoom', type=int, help='How many pixels to zoom per step (positive for zoom in, negative for zoom out, padded with black)', default=2, show_default=True)
406+
@click.option('--pixel-zoom', '-zoom', type=int, help='How many pixels to zoom per step (positive for zoom in, negative for zoom out, padded with black)', default=2, show_default=True)
407407
@click.option('--rotation-deg', '-rot', type=float, help='Rotate image counter-clockwise per frame (padded with black)', default=0.0, show_default=True)
408408
@click.option('--translate-x', '-tx', type=float, help='Translate the image in the horizontal axis per frame (from left to right, padded with black)', default=0.0, show_default=True)
409409
@click.option('--translate-y', '-ty', type=float, help='Translate the image in the vertical axis per frame (from top to bottom, padded with black)', default=0.0, show_default=True)

torch_utils/ops/filtered_lrelu.py

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def _init():
2929
headers=['filtered_lrelu.h', 'filtered_lrelu.cu'],
3030
source_dir=os.path.dirname(__file__),
3131
extra_cuda_cflags=['--use_fast_math'],
32+
# Bob Burrough's PR (#45) so that the plugins work in Windows: https://github.com/NVlabs/stylegan3/pull/45
33+
# No issues found in Ubuntu 20.04, so I add it here as well.
34+
extra_cflags=['/std:c++17'],
3235
)
3336
return True
3437

train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def main(**kwargs):
318318
'afhq512': 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl',
319319
'ffhq1024': 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-ffhq-1024x1024.pkl',
320320
'ffhqu1024': 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-ffhqu-1024x1024.pkl',
321-
'ffhq256': 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-ffhqu-256x256.pkl',
321+
'ffhqu256': 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-ffhqu-256x256.pkl',
322322
'metfaces': 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-metfaces-1024x1024.pkl',
323323
'metfacesu': 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-metfacesu-1024x1024.pkl',
324324
},

0 commit comments

Comments
 (0)