Stylique commited on
Commit
cec4e29
·
verified ·
1 Parent(s): 8d1511f

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +5 -7
server.js CHANGED
@@ -210,18 +210,16 @@ app.post('/render', async (req, res) => {
210
  inputProps: { scenes: batchScenes, settings },
211
  chromiumOptions: {
212
  executablePath: process.env.CHROME_BIN || '/usr/bin/google-chrome-stable',
213
- enableMultiProcessRendering: false, // STABILITY: Single process saves RAM
214
  args: [
215
  '--no-sandbox',
216
  '--disable-dev-shm-usage',
217
- '--enable-gpu',
218
- '--use-gl=egl',
219
- '--enable-zero-copy',
220
- '--ignore-gpu-blocklist',
221
  ]
222
  },
223
- concurrency: 1, // STABILITY: Render one frame at a time
224
- disallowParallelEncoding: true, // STABILITY: Reduce encoding memory pressure
225
  onProgress: ({ progress }) => {
226
  const percent = Math.round(progress * 100);
227
  if (percent !== lastLoggedPercent && percent % 10 === 0) {
 
210
  inputProps: { scenes: batchScenes, settings },
211
  chromiumOptions: {
212
  executablePath: process.env.CHROME_BIN || '/usr/bin/google-chrome-stable',
213
+ enableMultiProcessRendering: true, // SPEED: Enable since we have 32GB RAM
214
  args: [
215
  '--no-sandbox',
216
  '--disable-dev-shm-usage',
217
+ '--disable-gpu', // CPU Mode
218
+ '--mute-audio',
 
 
219
  ]
220
  },
221
+ concurrency: 2, // SPEED: 2x Parallel Frames
222
+ disallowParallelEncoding: false, // SPEED: Allow parallel encoding
223
  onProgress: ({ progress }) => {
224
  const percent = Math.round(progress * 100);
225
  if (percent !== lastLoggedPercent && percent % 10 === 0) {