uhdessai commited on
Commit
cc3f44f
·
verified ·
1 Parent(s): 76be887

Update gen_images.py

Browse files
Files changed (1) hide show
  1. gen_images.py +2 -2
gen_images.py CHANGED
@@ -19,7 +19,7 @@ import PIL.Image
19
  import torch
20
 
21
  import legacy
22
- os.environ["CUDA_VISIBLE_DEVICES"] = "" # Disables CUDA completely
23
 
24
 
25
  #----------------------------------------------------------------------------
@@ -105,7 +105,7 @@ def generate_images(
105
  """
106
 
107
  print('Loading networks from "%s"...' % network_pkl)
108
- device = torch.device('cpu')
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