advcloud
commited on
Commit
·
d855d82
1
Parent(s):
d205773
first commit
Browse files
model.py
CHANGED
@@ -48,16 +48,11 @@ class Model:
|
|
48 |
|
49 |
@staticmethod
|
50 |
def _create_dlib_landmark_model():
|
51 |
-
path = huggingface_hub.hf_hub_download(
|
52 |
-
'PKUWilliamYang/VToonify',
|
53 |
-
'models/shape_predictor_68_face_landmarks.dat'
|
54 |
-
)
|
55 |
return dlib.shape_predictor(path)
|
56 |
|
57 |
def _load_e4e(self) -> nn.Module:
|
58 |
-
ckpt_path = huggingface_hub.hf_hub_download(
|
59 |
-
'e4e.pt'
|
60 |
-
)
|
61 |
ckpt = torch.load(ckpt_path, map_location='cpu')
|
62 |
opts = ckpt['opts']
|
63 |
opts['device'] = self.device.type
|
|
|
48 |
|
49 |
@staticmethod
|
50 |
def _create_dlib_landmark_model():
|
51 |
+
path = huggingface_hub.hf_hub_download(repo_id="akhaliq/jojogan_dlib", filename="shape_predictor_68_face_landmarks.dat" )
|
|
|
|
|
|
|
52 |
return dlib.shape_predictor(path)
|
53 |
|
54 |
def _load_e4e(self) -> nn.Module:
|
55 |
+
ckpt_path = huggingface_hub.hf_hub_download(repo_id="akhaliq/JoJoGAN_e4e_ffhq_encode", filename="e4e_ffhq_encode.pt" )
|
|
|
|
|
56 |
ckpt = torch.load(ckpt_path, map_location='cpu')
|
57 |
opts = ckpt['opts']
|
58 |
opts['device'] = self.device.type
|