Spaces:
Running
Running
Upload 3 files
Browse files- app.py +1 -1
- musepose_inference.py +3 -3
- pose_align.py +3 -3
app.py
CHANGED
@@ -127,7 +127,7 @@ class App:
|
|
127 |
def launch(self):
|
128 |
demo = self.musepose_demo()
|
129 |
demo.queue().launch(
|
130 |
-
share=
|
131 |
)
|
132 |
|
133 |
|
|
|
127 |
def launch(self):
|
128 |
demo = self.musepose_demo()
|
129 |
demo.queue().launch(
|
130 |
+
share=True
|
131 |
)
|
132 |
|
133 |
|
musepose_inference.py
CHANGED
@@ -21,7 +21,7 @@ from musepose.utils.util import get_fps, read_frames, save_videos_grid
|
|
21 |
from downloading_weights import download_models
|
22 |
|
23 |
# ZeroGPU
|
24 |
-
import spaces
|
25 |
|
26 |
|
27 |
class MusePoseInference:
|
@@ -51,7 +51,7 @@ class MusePoseInference:
|
|
51 |
if not os.path.exists(self.output_dir):
|
52 |
os.makedirs(self.output_dir)
|
53 |
|
54 |
-
|
55 |
def infer_musepose(
|
56 |
self,
|
57 |
ref_image_path: str,
|
@@ -191,7 +191,7 @@ class MusePoseInference:
|
|
191 |
)
|
192 |
return output_path, output_path_demo
|
193 |
|
194 |
-
|
195 |
def init_model(self,
|
196 |
weight_dtype: torch.dtype,
|
197 |
infer_config: DictConfig
|
|
|
21 |
from downloading_weights import download_models
|
22 |
|
23 |
# ZeroGPU
|
24 |
+
#import spaces
|
25 |
|
26 |
|
27 |
class MusePoseInference:
|
|
|
51 |
if not os.path.exists(self.output_dir):
|
52 |
os.makedirs(self.output_dir)
|
53 |
|
54 |
+
#@spaces.GPU(duration=180)
|
55 |
def infer_musepose(
|
56 |
self,
|
57 |
ref_image_path: str,
|
|
|
191 |
)
|
192 |
return output_path, output_path_demo
|
193 |
|
194 |
+
#@spaces.GPU(duration=120)
|
195 |
def init_model(self,
|
196 |
weight_dtype: torch.dtype,
|
197 |
infer_config: DictConfig
|
pose_align.py
CHANGED
@@ -13,7 +13,7 @@ from pose.script.util import size_calculate, warpAffine_kps
|
|
13 |
from downloading_weights import download_models
|
14 |
|
15 |
# ZeroGPU
|
16 |
-
import spaces
|
17 |
|
18 |
|
19 |
'''
|
@@ -40,7 +40,7 @@ class PoseAlignmentInference:
|
|
40 |
if not os.path.exists(self.output_dir):
|
41 |
os.makedirs(self.output_dir)
|
42 |
|
43 |
-
|
44 |
def align_pose(
|
45 |
self,
|
46 |
vidfn: str,
|
@@ -312,7 +312,7 @@ class PoseAlignmentInference:
|
|
312 |
print('pose align done')
|
313 |
return outfn_align_pose_video, outfn
|
314 |
|
315 |
-
|
316 |
def init_model(self):
|
317 |
if self.detector is None:
|
318 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
13 |
from downloading_weights import download_models
|
14 |
|
15 |
# ZeroGPU
|
16 |
+
#import spaces
|
17 |
|
18 |
|
19 |
'''
|
|
|
40 |
if not os.path.exists(self.output_dir):
|
41 |
os.makedirs(self.output_dir)
|
42 |
|
43 |
+
#@spaces.GPU(duration=120)
|
44 |
def align_pose(
|
45 |
self,
|
46 |
vidfn: str,
|
|
|
312 |
print('pose align done')
|
313 |
return outfn_align_pose_video, outfn
|
314 |
|
315 |
+
#@spaces.GPU(duration=120)
|
316 |
def init_model(self):
|
317 |
if self.detector is None:
|
318 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|