feng2022 commited on
Commit
e7d7286
1 Parent(s): 5c7b316

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -84,7 +84,7 @@ def main():
84
  # ini = "False1"
85
  #result = subprocess.check_output(['nvidia-smi'])
86
  #load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",device)
87
- args = ProjectorArguments().parse(
88
  args=[str(input_path)],
89
  namespace=Namespace(
90
  # spectral_sensitivity=spectral_sensitivity,
@@ -94,11 +94,11 @@ def main():
94
  log_visual_freq=1000,
95
  input='text',
96
  ))
97
- #device = th.device()
98
- #generator = create_generator("stylegan2-ffhq-config-f.pt","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",args, device)
99
- #latent = torch.randn((1, 512), device=device)
100
- #img_out, _, _ = generator([latent])
101
- #imgs_arr = make_image(img_out)
102
  #iface = gr.Interface(
103
  #fn=predict,
104
  #inputs='text',
 
84
  # ini = "False1"
85
  #result = subprocess.check_output(['nvidia-smi'])
86
  #load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",device)
87
+ """args = ProjectorArguments().parse(
88
  args=[str(input_path)],
89
  namespace=Namespace(
90
  # spectral_sensitivity=spectral_sensitivity,
 
94
  log_visual_freq=1000,
95
  input='text',
96
  ))
97
+ device = th.device()
98
+ generator = create_generator("stylegan2-ffhq-config-f.pt","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",args, device)
99
+ latent = torch.randn((1, 512), device=device)
100
+ img_out, _, _ = generator([latent])
101
+ imgs_arr = make_image(img_out)"""
102
  #iface = gr.Interface(
103
  #fn=predict,
104
  #inputs='text',