Spaces:
Runtime error
Runtime error
Commit
·
5f7ee3e
1
Parent(s):
32a888f
Update annotator/openpose/__init__.py
Browse files
annotator/openpose/__init__.py
CHANGED
|
@@ -7,10 +7,10 @@ from . import util
|
|
| 7 |
from .body import Body
|
| 8 |
from .hand import Hand
|
| 9 |
|
| 10 |
-
from huggingface_hub import hf_hub_url,
|
| 11 |
REPO_ID = "lllyasviel/ControlNet"
|
| 12 |
-
body_estimation = Body(
|
| 13 |
-
hand_estimation = Hand(
|
| 14 |
|
| 15 |
|
| 16 |
def apply_openpose(oriImg, hand=False):
|
|
|
|
| 7 |
from .body import Body
|
| 8 |
from .hand import Hand
|
| 9 |
|
| 10 |
+
from huggingface_hub import hf_hub_url, cached_download
|
| 11 |
REPO_ID = "lllyasviel/ControlNet"
|
| 12 |
+
body_estimation = Body(cached_download(hf_hub_url(REPO_ID, 'annotator/ckpts/body_pose_model.pth')))
|
| 13 |
+
hand_estimation = Hand(cached_download(hf_hub_url(REPO_ID,'annotator/ckpts/hand_pose_model.pth')))
|
| 14 |
|
| 15 |
|
| 16 |
def apply_openpose(oriImg, hand=False):
|