Spaces:
Sleeping
Sleeping
Update gen_images.py
Browse files- gen_images.py +2 -2
gen_images.py
CHANGED
|
@@ -19,7 +19,7 @@ import PIL.Image
|
|
| 19 |
import torch
|
| 20 |
|
| 21 |
import legacy
|
| 22 |
-
|
| 23 |
|
| 24 |
|
| 25 |
#----------------------------------------------------------------------------
|
|
@@ -105,7 +105,7 @@ def generate_images(
|
|
| 105 |
"""
|
| 106 |
|
| 107 |
print('Loading networks from "%s"...' % network_pkl)
|
| 108 |
-
device = torch.device('
|
| 109 |
with dnnlib.util.open_url(network_pkl) as f:
|
| 110 |
G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore
|
| 111 |
|
|
|
|
| 19 |
import torch
|
| 20 |
|
| 21 |
import legacy
|
| 22 |
+
|
| 23 |
|
| 24 |
|
| 25 |
#----------------------------------------------------------------------------
|
|
|
|
| 105 |
"""
|
| 106 |
|
| 107 |
print('Loading networks from "%s"...' % network_pkl)
|
| 108 |
+
device = torch.device('cuda')
|
| 109 |
with dnnlib.util.open_url(network_pkl) as f:
|
| 110 |
G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore
|
| 111 |
|