mini-omni commited on
Commit
3c59666
Β·
2 Parent(s): 461784a 9daef80

Merge branch 'main' of github.com:gpt-omni/mini-omni

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. inference.py +1 -1
  3. server.py +2 -2
README.md CHANGED
@@ -24,7 +24,7 @@ Mini-Omni is an open-source multimodal large language model that can **hear, tal
24
 
25
  βœ… **Talking while thinking**, with the ability to generate text and audio at the same time.
26
 
27
- βœ… **Streaming audio outupt** capabilities.
28
 
29
  βœ… With "Audio-to-Text" and "Audio-to-Audio" **batch inference** to further boost the performance.
30
 
 
24
 
25
  βœ… **Talking while thinking**, with the ability to generate text and audio at the same time.
26
 
27
+ βœ… **Streaming audio output** capabilities.
28
 
29
  βœ… With "Audio-to-Text" and "Audio-to-Audio" **batch inference** to further boost the performance.
30
 
inference.py CHANGED
@@ -399,7 +399,7 @@ class OmniInference:
399
  model = self.model
400
 
401
  with self.fabric.init_tensor():
402
- model.set_kv_cache(batch_size=2)
403
 
404
  mel, leng = load_audio(audio_path)
405
  audio_feature, input_ids = get_input_ids_whisper_ATBatch(mel, leng, self.whispermodel, self.device)
 
399
  model = self.model
400
 
401
  with self.fabric.init_tensor():
402
+ model.set_kv_cache(batch_size=2,device=self.device)
403
 
404
  mel, leng = load_audio(audio_path)
405
  audio_feature, input_ids = get_input_ids_whisper_ATBatch(mel, leng, self.whispermodel, self.device)
server.py CHANGED
@@ -46,9 +46,9 @@ def create_app():
46
  return server.server
47
 
48
 
49
- def serve(ip='0.0.0.0', port=60808):
50
 
51
- OmniChatServer(ip, port=port, run_app=True)
52
 
53
 
54
  if __name__ == "__main__":
 
46
  return server.server
47
 
48
 
49
+ def serve(ip='0.0.0.0', port=60808, device='cuda:0'):
50
 
51
+ OmniChatServer(ip, port=port,run_app=True, device=device)
52
 
53
 
54
  if __name__ == "__main__":