feng2022 commited on
Commit
fe030b4
1 Parent(s): 8afe5ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -25,6 +25,7 @@ from projector import (
25
  )
26
  sys.path.insert(0, 'StyleGAN-Human')
27
 
 
28
  TITLE = 'Time-TravelRephotography'
29
  DESCRIPTION = '''This is an unofficial demo for https://github.com/Time-Travel-Rephotography.
30
  '''
@@ -73,7 +74,15 @@ def main():
73
  # ini = "False1"
74
  #result = subprocess.check_output(['nvidia-smi'])
75
 
76
- #args = parse_args()
 
 
 
 
 
 
 
 
77
  #device = torch.device(args.device)
78
  #load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",device)
79
 
 
25
  )
26
  sys.path.insert(0, 'StyleGAN-Human')
27
 
28
+ spectral_sensitivity = 'b'
29
  TITLE = 'Time-TravelRephotography'
30
  DESCRIPTION = '''This is an unofficial demo for https://github.com/Time-Travel-Rephotography.
31
  '''
 
74
  # ini = "False1"
75
  #result = subprocess.check_output(['nvidia-smi'])
76
 
77
+ args = ProjectorArguments().parse(
78
+ args=[str(input_path)],
79
+ namespace=Namespace(
80
+ # spectral_sensitivity=spectral_sensitivity,
81
+ encoder_ckpt=f"checkpoint/encoder/checkpoint_{spectral_sensitivity}.pt",
82
+ # encoder_name=spectral_sensitivity,
83
+ # gaussian=gaussian_radius,
84
+ log_visual_freq=1000,
85
+ ))
86
  #device = torch.device(args.device)
87
  #load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",device)
88