Spaces:
Runtime error
Runtime error
adasd
Browse files- __pycache__/blocks.cpython-38.pyc +0 -0
- __pycache__/image_generator.cpython-38.pyc +0 -0
- __pycache__/networks_fastgan.cpython-38.pyc +0 -0
- image_generator.py +2 -4
- out/seed0010.png +0 -0
- out/seed0011.png +0 -0
- out/seed0012.png +0 -0
- out/seed0013.png +0 -0
- out/seed0014.png +0 -0
- out/seed0015.png +0 -0
__pycache__/blocks.cpython-38.pyc
ADDED
Binary file (10.5 kB). View file
|
|
__pycache__/image_generator.cpython-38.pyc
ADDED
Binary file (4.54 kB). View file
|
|
__pycache__/networks_fastgan.cpython-38.pyc
ADDED
Binary file (5.26 kB). View file
|
|
image_generator.py
CHANGED
@@ -66,14 +66,13 @@ def make_transform(translate: Tuple[float,float], angle: float):
|
|
66 |
#----------------------------------------------------------------------------
|
67 |
|
68 |
@click.command()
|
69 |
-
@click.option('--
|
70 |
-
@click.option('--seeds', type=parse_range, help='List of random seeds (e.g., \'0,1,4-6\')', default=10-15, required=True)
|
71 |
@click.option('--trunc', 'truncation_psi', type=float, help='Truncation psi', default=1, show_default=True)
|
72 |
@click.option('--class', 'class_idx', type=int, help='Class label (unconditional if not specified)')
|
73 |
@click.option('--noise-mode', help='Noise mode', type=click.Choice(['const', 'random', 'none']), default='const', show_default=True)
|
74 |
@click.option('--translate', help='Translate XY-coordinate (e.g. \'0.3,1\')', type=parse_vec2, default='0,0', show_default=True, metavar='VEC2')
|
75 |
@click.option('--rotate', help='Rotation angle in degrees', type=float, default=0, show_default=True, metavar='ANGLE')
|
76 |
-
@click.option('--outdir', help='Where to save the output images', type=str, required=True, metavar='DIR')
|
77 |
def generate_images(
|
78 |
seeds: List[int],
|
79 |
truncation_psi: float,
|
@@ -98,7 +97,6 @@ def generate_images(
|
|
98 |
--network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-t-metfacesu-1024x1024.pkl
|
99 |
"""
|
100 |
|
101 |
-
print('Loading networks from "%s"...' % network_pkl)
|
102 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
103 |
G = MyGenerator.from_pretrained("Cropinky/projected_gan_impressionism")
|
104 |
os.makedirs(outdir, exist_ok=True)
|
|
|
66 |
#----------------------------------------------------------------------------
|
67 |
|
68 |
@click.command()
|
69 |
+
@click.option('--seeds', type=parse_range, help='List of random seeds (e.g., \'0,1,4-6\')', default="10-11", required=True)
|
|
|
70 |
@click.option('--trunc', 'truncation_psi', type=float, help='Truncation psi', default=1, show_default=True)
|
71 |
@click.option('--class', 'class_idx', type=int, help='Class label (unconditional if not specified)')
|
72 |
@click.option('--noise-mode', help='Noise mode', type=click.Choice(['const', 'random', 'none']), default='const', show_default=True)
|
73 |
@click.option('--translate', help='Translate XY-coordinate (e.g. \'0.3,1\')', type=parse_vec2, default='0,0', show_default=True, metavar='VEC2')
|
74 |
@click.option('--rotate', help='Rotation angle in degrees', type=float, default=0, show_default=True, metavar='ANGLE')
|
75 |
+
@click.option('--outdir', help='Where to save the output images', type=str, default="out", required=True, metavar='DIR')
|
76 |
def generate_images(
|
77 |
seeds: List[int],
|
78 |
truncation_psi: float,
|
|
|
97 |
--network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-t-metfacesu-1024x1024.pkl
|
98 |
"""
|
99 |
|
|
|
100 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
101 |
G = MyGenerator.from_pretrained("Cropinky/projected_gan_impressionism")
|
102 |
os.makedirs(outdir, exist_ok=True)
|
out/seed0010.png
ADDED
![]() |
out/seed0011.png
ADDED
![]() |
out/seed0012.png
ADDED
![]() |
out/seed0013.png
ADDED
![]() |
out/seed0014.png
ADDED
![]() |
out/seed0015.png
ADDED
![]() |