mirror of
https://github.com/gpt-omni/mini-omni
synced 2025-01-22 02:25:49 +00:00
feat:增加device 参数
fix: set_kv_cache使用默认device问题
This commit is contained in:
parent
ae04f97733
commit
a97e7cd41a
@ -399,7 +399,7 @@ class OmniInference:
|
||||
model = self.model
|
||||
|
||||
with self.fabric.init_tensor():
|
||||
model.set_kv_cache(batch_size=2)
|
||||
model.set_kv_cache(batch_size=2,device=self.device)
|
||||
|
||||
mel, leng = load_audio(audio_path)
|
||||
audio_feature, input_ids = get_input_ids_whisper_ATBatch(mel, leng, self.whispermodel, self.device)
|
||||
|
Loading…
Reference in New Issue
Block a user