mirror of
https://github.com/foxhui/WebAI2API.git
synced 2026-06-16 21:03:59 +08:00
feat: 优化无GPU模式浏览器启动参数提升性能
This commit is contained in:
+6
-3
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user