robinwitch commited on
Commit
8dd4264
·
1 Parent(s): bd336d0
Files changed (1) hide show
  1. app.py +2 -14
app.py CHANGED
@@ -118,24 +118,12 @@ class BaseTrainer(object):
118
  logger.info(f"Init test dataloader success")
119
 
120
  from models.denoiser import MDM
121
- self.model = MDM(args).cuda()
122
 
123
  if self.rank == 0:
124
  logger.info(self.model)
125
  logger.info(f"init {args.g_name} success")
126
 
127
- self.smplx = smplx.create(
128
- self.args.data_path_1+"smplx_models/",
129
- model_type='smplx',
130
- gender='NEUTRAL_2020',
131
- use_face_contour=False,
132
- num_betas=300,
133
- num_expression_coeffs=100,
134
- ext='npz',
135
- use_pca=False,
136
- ).to(self.rank).eval()
137
-
138
-
139
 
140
 
141
 
@@ -646,8 +634,8 @@ class BaseTrainer(object):
646
  latent_ori = []
647
  l2_all = 0
648
  lvel = 0
 
649
  self.model.eval()
650
- self.smplx.eval()
651
  # self.eval_copy.eval()
652
  with torch.no_grad():
653
  for its, batch_data in enumerate(self.test_loader):
 
118
  logger.info(f"Init test dataloader success")
119
 
120
  from models.denoiser import MDM
121
+ self.model = MDM(args)
122
 
123
  if self.rank == 0:
124
  logger.info(self.model)
125
  logger.info(f"init {args.g_name} success")
126
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
 
129
 
 
634
  latent_ori = []
635
  l2_all = 0
636
  lvel = 0
637
+ self.model = self.model.cuda()
638
  self.model.eval()
 
639
  # self.eval_copy.eval()
640
  with torch.no_grad():
641
  for its, batch_data in enumerate(self.test_loader):