hysts HF staff commited on
Commit
bd312c9
1 Parent(s): 58dfe83
Files changed (1) hide show
  1. dualstylegan.py +2 -2
dualstylegan.py CHANGED
@@ -5,7 +5,7 @@ import os
5
  import pathlib
6
  import subprocess
7
  import sys
8
- from typing import Callable, Union
9
 
10
  import dlib
11
  import huggingface_hub
@@ -31,7 +31,7 @@ MODEL_REPO = 'CVPR/DualStyleGAN'
31
 
32
 
33
  class Model:
34
- def __init__(self, device: Union[torch.device, str]):
35
  self.device = torch.device(device)
36
  self.landmark_model = self._create_dlib_landmark_model()
37
  self.encoder = self._load_encoder()
 
5
  import pathlib
6
  import subprocess
7
  import sys
8
+ from typing import Callable
9
 
10
  import dlib
11
  import huggingface_hub
 
31
 
32
 
33
  class Model:
34
+ def __init__(self, device: torch.device | str):
35
  self.device = torch.device(device)
36
  self.landmark_model = self._create_dlib_landmark_model()
37
  self.encoder = self._load_encoder()