advcloud
commited on
Commit
·
b463076
1
Parent(s):
0d0de39
first commit
Browse files
model.py
CHANGED
@@ -48,11 +48,11 @@ class Model:
|
|
48 |
|
49 |
@staticmethod
|
50 |
def _create_dlib_landmark_model():
|
51 |
-
path = huggingface_hub.hf_hub_download(repo_id="
|
52 |
return dlib.shape_predictor(path)
|
53 |
|
54 |
def _load_e4e(self) -> nn.Module:
|
55 |
-
ckpt_path = huggingface_hub.hf_hub_download(repo_id="
|
56 |
ckpt = torch.load(ckpt_path, map_location='cpu')
|
57 |
opts = ckpt['opts']
|
58 |
opts['device'] = self.device.type
|
|
|
48 |
|
49 |
@staticmethod
|
50 |
def _create_dlib_landmark_model():
|
51 |
+
path = huggingface_hub.hf_hub_download(repo_id="aijack/jojogan", filename="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="aijack/e4e", filename="e4e.pt" )
|
56 |
ckpt = torch.load(ckpt_path, map_location='cpu')
|
57 |
opts = ckpt['opts']
|
58 |
opts['device'] = self.device.type
|