GeneFace icon indicating copy to clipboard operation
GeneFace copied to clipboard

Does infer_once function use GPU when loading in sample into get_pose_from_ds()

Open JieLuChen opened this issue 2 years ago • 0 comments

@yerfor

This function here (in base_nerf_infer.py) `

def infer_once(self, inp):

    self.inp = inp
    print('this is the infer once')
    self.use_pred_pose = True if self.inp.get('c2w_name','') != '' else False
    print('this is the infer second')
    samples = self.get_cond_from_input(inp)
    print('this is the infer third samples')
    batches = self.get_pose_from_ds(samples)
    print('this is the batches')
    image_dir = self.forward_system(batches)
    if self.proc_rank == 0:
        out_name = self.postprocess_output(image_dir)
        print(f"The synthesized video is saved at {out_name}")          

`
Does batches = self.get_pose_from_ds(samples) use GPU? During this time I see CPU Usage go up to 100% Running on A100 80gb CUDA 11.3

I do see GPU Usage go up for other stuff but for this bit the function takes a long time over 10-15 minutes and this just for 30 second wav file.

JieLuChen avatar Oct 26 '23 17:10 JieLuChen