K00B404 commited on
Commit
5a11623
·
verified ·
1 Parent(s): 4139f93

Update src/gradio_pipeline.py

Browse files
Files changed (1) hide show
  1. src/gradio_pipeline.py +2 -2
src/gradio_pipeline.py CHANGED
@@ -66,8 +66,8 @@ class GradioPipeline(LiveCPUPortraitPipeline):
66
  if input_eye_ratio is None or input_lip_ratio is None:
67
  raise gr.Error("Invalid ratio input 💥!", duration=5)
68
  else:
69
- x_s_user = x_s_user.to("cuda")
70
- f_s_user = f_s_user.to("cuda")
71
  # ∆_eyes,i = R_eyes(x_s; c_s,eyes, c_d,eyes,i)
72
  combined_eye_ratio_tensor = self.live_portrait_wrapper.calc_combined_eye_ratio([[input_eye_ratio]], source_lmk_user)
73
  eyes_delta = self.live_portrait_wrapper.retarget_eye(x_s_user, combined_eye_ratio_tensor)
 
66
  if input_eye_ratio is None or input_lip_ratio is None:
67
  raise gr.Error("Invalid ratio input 💥!", duration=5)
68
  else:
69
+ x_s_user = x_s_user.to("cpu")
70
+ f_s_user = f_s_user.to("cpu")
71
  # ∆_eyes,i = R_eyes(x_s; c_s,eyes, c_d,eyes,i)
72
  combined_eye_ratio_tensor = self.live_portrait_wrapper.calc_combined_eye_ratio([[input_eye_ratio]], source_lmk_user)
73
  eyes_delta = self.live_portrait_wrapper.retarget_eye(x_s_user, combined_eye_ratio_tensor)