From 0925efd369417649e6892e40337f8b2b24b60487 Mon Sep 17 00:00:00 2001 From: foxhui Date: Wed, 26 Nov 2025 23:24:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=97=A0GPU=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=B5=8F=E8=A7=88=E5=99=A8=E5=90=AF=E5=8A=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8F=90=E5=8D=87=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- lib/lmarena.js | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index acb9ee5..4c240f9 100644 --- a/README.md +++ b/README.md @@ -459,12 +459,12 @@ chrome: 1. **启动虚拟显示器并运行程序** (屏幕号 99 可按需修改): ```bash - xvfb-run --server-num=99 --server-args="-ac -screen 0 1280x720x16" npm start + xvfb-run --server-num=99 --server-args="-ac -screen 0 1280x720x24" npm start ``` 2. **将虚拟显示器映射至 VNC**: ```bash - x11vnc -display :99 -localhost -nopw -once -noxdamage -ncache 10 + x11vnc -display :99 -localhost -nopw -once -noxdamage -ncache 10 -forever ``` 3. **建立 SSH 隧道连接 VNC** (安全推荐): diff --git a/lib/lmarena.js b/lib/lmarena.js index 1083f43..247eabb 100644 --- a/lib/lmarena.js +++ b/lib/lmarena.js @@ -228,9 +228,12 @@ async function initBrowser(config) { args.push( '--disable-gpu', '--use-gl=swiftshader', - '--disable-accelerated-2d-canvas' + '--disable-accelerated-2d-canvas', + '--animation-duration-scale=0', + '--disable-smooth-scrolling', + '--animation-duration-scale=0' ); - console.log('>>> [Browser] GPU 加速: 禁用 (优化兼容性)'); + console.log('>>> [Browser] GPU 加速: 禁用'); } else { console.log('>>> [Browser] GPU 加速: 启用'); } @@ -436,7 +439,7 @@ async function generateImage(context, prompt, imgPaths, modelId) { return; } } catch (e) { - console.error('[CDP] 拦截处理出错:', e); + console.error('>>> [CDP] 拦截处理出错:', e); } }