[Fix] Controller: Handle VRAM overflow errors during translation and transcription processes.

This commit is contained in:
misyaguziya
2025-06-02 15:07:33 +09:00
parent 7b42387a19
commit dfc90508d1
4 changed files with 240 additions and 54 deletions

View File

@@ -509,6 +509,15 @@ class Model:
if isinstance(self.mic_audio_recorder, SelectedMicEnergyAndAudioRecorder):
self.mic_audio_recorder.pause()
# VRAM 不足エラーを検出するメソッドを追加
def detectVRAMError(self, error):
error_str = str(error)
if isinstance(error, ValueError) and len(error.args) > 0 and error.args[0] == "VRAM_OUT_OF_MEMORY":
return True, error.args[1] if len(error.args) > 1 else "VRAM out of memory"
if "CUDA out of memory" in error_str or "CUBLAS_STATUS_ALLOC_FAILED" in error_str:
return True, error_str
return False, None
def changeMicTranscriptStatus(self):
if config.VRC_MIC_MUTE_SYNC is True:
match self.mic_mute_status: