H-Liu1997 commited on
Commit
b68c121
1 Parent(s): 320051c

Update create_graph.py

Browse files
Files changed (1) hide show
  1. create_graph.py +14 -11
create_graph.py CHANGED
@@ -71,19 +71,22 @@ def get_motion_reps_tensor(motion_tensor, smplx_model, pose_fps=30, device='cuda
71
  "rep15d": rep15d,
72
  }
73
 
74
- device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
75
- smplx_model = smplx.create(
76
- "./emage/smplx_models/",
77
- model_type='smplx',
78
- gender='NEUTRAL_2020',
79
- use_face_contour=False,
80
- num_betas=300,
81
- num_expression_coeffs=100,
82
- ext='npz',
83
- use_pca=False,
84
- ).to(device).eval()
85
 
86
  def get_motion_reps(motion, smplx_model=smplx_model, pose_fps=30):
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  gt_motion_tensor = motion["poses"]
88
  n = gt_motion_tensor.shape[0]
89
  bs = 1
 
71
  "rep15d": rep15d,
72
  }
73
 
74
+
 
 
 
 
 
 
 
 
 
 
75
 
76
  def get_motion_reps(motion, smplx_model=smplx_model, pose_fps=30):
77
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
78
+ smplx_model = smplx.create(
79
+ "./emage/smplx_models/",
80
+ model_type='smplx',
81
+ gender='NEUTRAL_2020',
82
+ use_face_contour=False,
83
+ num_betas=300,
84
+ num_expression_coeffs=100,
85
+ ext='npz',
86
+ use_pca=False,
87
+ ).to(device).eval()
88
+ print("warning, smplx model is created inside fn for gradio")
89
+
90
  gt_motion_tensor = motion["poses"]
91
  n = gt_motion_tensor.shape[0]
92
  bs = 1