xyfcc commited on
Commit
54d573f
Β·
verified Β·
1 Parent(s): e83cc8c

Update web_demo.py

Browse files
Files changed (1) hide show
  1. web_demo.py +2 -2
web_demo.py CHANGED
@@ -46,7 +46,7 @@ if __name__ == "__main__":
46
  flow_checkpoint = os.path.join(args.flow_path, 'flow.pt')
47
  hift_checkpoint = os.path.join(args.flow_path, 'hift.pt')
48
  glm_tokenizer = None
49
- device = "cuda"
50
  audio_decoder: AudioDecoder = None
51
  whisper_model, feature_extractor = None, None
52
  worker = None
@@ -72,7 +72,7 @@ if __name__ == "__main__":
72
  if use_local_interface :
73
  model_path0 = 'THUDM/glm-4-voice-9b '
74
  # dtype = 'bfloat16'
75
- device0 = 'cuda:0'
76
  worker = ModelWorker(model_path0,device0)
77
 
78
  def clear_fn():
 
46
  flow_checkpoint = os.path.join(args.flow_path, 'flow.pt')
47
  hift_checkpoint = os.path.join(args.flow_path, 'hift.pt')
48
  glm_tokenizer = None
49
+ device = "cpu"
50
  audio_decoder: AudioDecoder = None
51
  whisper_model, feature_extractor = None, None
52
  worker = None
 
72
  if use_local_interface :
73
  model_path0 = 'THUDM/glm-4-voice-9b '
74
  # dtype = 'bfloat16'
75
+ device0 = 'cpu'
76
  worker = ModelWorker(model_path0,device0)
77
 
78
  def clear_fn():