Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,9 +41,9 @@ def image_create(seed: int, truncation_psi: float):
|
|
| 41 |
#gaussian=gaussian_radius,
|
| 42 |
log_visual_freq=1000
|
| 43 |
))
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
device = th.device()
|
| 48 |
generator = create_generator("stylegan2-ffhq-config-f.pt","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",args,device)
|
| 49 |
#generator = create_generator("checkpoint_b.pt.pth","feng2022/Time_TravelRephotography_checkpoint_b",args,device)
|
|
|
|
| 41 |
#gaussian=gaussian_radius,
|
| 42 |
log_visual_freq=1000
|
| 43 |
))
|
| 44 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 45 |
+
model.to(device)
|
| 46 |
+
data = data.to(device)
|
| 47 |
device = th.device()
|
| 48 |
generator = create_generator("stylegan2-ffhq-config-f.pt","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",args,device)
|
| 49 |
#generator = create_generator("checkpoint_b.pt.pth","feng2022/Time_TravelRephotography_checkpoint_b",args,device)
|