Spanicin commited on
Commit
232ebf8
·
verified ·
1 Parent(s): ec8c311

Update app_celery.py

Browse files
Files changed (1) hide show
  1. app_celery.py +3 -2
app_celery.py CHANGED
@@ -30,6 +30,8 @@ from celery import Celery
30
  # from gevent import monkey
31
  # monkey.patch_all()
32
  import torch.multiprocessing as t
 
 
33
 
34
  class AnimationConfig:
35
  def __init__(self, driven_audio_path, source_image_path, result_folder,pose_style,expression_scale,enhancer,still,preprocess,ref_pose_video_path, image_hardcoded):
@@ -63,7 +65,7 @@ class AnimationConfig:
63
  self.camera_d = 10.
64
  self.z_near = 5.
65
  self.z_far = 15.
66
- self.device = 'cuda'
67
  self.image_hardcoded = image_hardcoded
68
 
69
 
@@ -564,5 +566,4 @@ def health_status():
564
  response = {"online": "true"}
565
  return jsonify(response)
566
  if __name__ == '__main__':
567
- t.set_start_method('spawn', force=True)
568
  app.run(debug=True)
 
30
  # from gevent import monkey
31
  # monkey.patch_all()
32
  import torch.multiprocessing as t
33
+ import multiprocessing
34
+ multiprocessing.set_start_method('spawn', force=True)
35
 
36
  class AnimationConfig:
37
  def __init__(self, driven_audio_path, source_image_path, result_folder,pose_style,expression_scale,enhancer,still,preprocess,ref_pose_video_path, image_hardcoded):
 
65
  self.camera_d = 10.
66
  self.z_near = 5.
67
  self.z_far = 15.
68
+ self.device = 'cpu'
69
  self.image_hardcoded = image_hardcoded
70
 
71
 
 
566
  response = {"online": "true"}
567
  return jsonify(response)
568
  if __name__ == '__main__':
 
569
  app.run(debug=True)