From c70daefea28942ec384847c4dfc355c38893527c Mon Sep 17 00:00:00 2001 From: Lion-Wu <130235128+Lion-Wu@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:42:35 +0800 Subject: [PATCH] =?UTF-8?q?CPU=20=E4=BD=BF=E7=94=A8=E6=9B=B4=E4=BD=8E=20ba?= =?UTF-8?q?tch=20size=20(#2067)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update webui.py lower batch size on cpu * Update webui.py Improvements --- webui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webui.py b/webui.py index 93bda1f..e8262ea 100644 --- a/webui.py +++ b/webui.py @@ -103,7 +103,7 @@ def set_default(): gpu_info = ("%s\t%s" % ("0", "CPU")) gpu_infos.append("%s\t%s" % ("0", "CPU")) set_gpu_numbers.add(0) - default_batch_size = default_batch_size_s1=int(psutil.virtual_memory().total/ 1024 / 1024 / 1024 / 2) + default_batch_size = default_batch_size_s1 = int(psutil.virtual_memory().total/ 1024 / 1024 / 1024 / 4) if version!="v3": default_sovits_epoch=8 default_sovits_save_every_epoch=4 @@ -114,6 +114,9 @@ def set_default(): default_sovits_save_every_epoch=1 max_sovits_epoch=3 max_sovits_save_every_epoch=3 + + default_batch_size = max(1, default_batch_size) + default_batch_size_s1 = max(1, default_batch_size_s1) default_max_batch_size=default_batch_size*3 set_default()