chrisxx commited on
Commit
e92b993
·
1 Parent(s): 6bf5433

Update default FPS to 16 for better GPU

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. static/index.html +3 -3
README.md CHANGED
@@ -17,7 +17,7 @@ A real-time Pong game where frames are generated by a diffusion model trained wi
17
  - **Real-time frame generation**: Uses a frame-autoregressive transformer with diffusion sampling
18
  - **Interactive gameplay**: Control the paddle with keyboard inputs
19
  - **Configurable parameters**: Adjust FPS and diffusion steps
20
- - **Low-latency streaming**: Achieves ~12 FPS with 4 diffusion steps
21
 
22
  ## How to Play
23
 
@@ -31,7 +31,7 @@ A real-time Pong game where frames are generated by a diffusion model trained wi
31
 
32
  ## Technical Details
33
 
34
- This demo uses a small transformer model trained with rectified flow matching to simulate Pong game frames conditioned on user inputs. The model generates 24×24 pixel frames in real-time using diffusion sampling with configurable steps. Performance targets ~12 FPS with 4 diffusion steps on GPU hardware.
35
 
36
  ## Model Architecture
37
 
 
17
  - **Real-time frame generation**: Uses a frame-autoregressive transformer with diffusion sampling
18
  - **Interactive gameplay**: Control the paddle with keyboard inputs
19
  - **Configurable parameters**: Adjust FPS and diffusion steps
20
+ - **Low-latency streaming**: Achieves ~16 FPS with 4 diffusion steps
21
 
22
  ## How to Play
23
 
 
31
 
32
  ## Technical Details
33
 
34
+ This demo uses a small transformer model trained with rectified flow matching to simulate Pong game frames conditioned on user inputs. The model generates 24×24 pixel frames in real-time using diffusion sampling with configurable steps. Performance targets ~16 FPS with 4 diffusion steps on GPU hardware.
35
 
36
  ## Model Architecture
37
 
static/index.html CHANGED
@@ -37,7 +37,7 @@
37
  <h1>Pong</h1>
38
  <div style="margin-bottom: 12px;">
39
  <label style="display: block; margin-bottom: 8px;">
40
- FPS: <input type="number" id="fpsInput" value="12" min="1" max="30" step="1" style="width: 60px; padding: 4px; margin-left: 8px;" />
41
  <span style="color: #aaa; font-size: 12px; margin-left: 8px;">frames per second</span>
42
  </label>
43
  <label style="display: block; margin-bottom: 8px;">
@@ -60,7 +60,7 @@
60
  ⏳ Another player is currently using the stream. Please wait for them to finish.
61
  </div>
62
  <div style="margin-top: 12px; font-size: 14px; color: #aaa; line-height: 1.5;">
63
- This demo uses a small transformer model trained with rectified flow matching to simulate Pong game frames conditioned on user inputs. The model generates 24×24 pixel frames in real-time using diffusion sampling with configurable steps. Performance targets ~12 FPS with 4 diffusion steps on GPU hardware.
64
  </div>
65
  </div>
66
 
@@ -107,7 +107,7 @@
107
 
108
  // Start/stop controls
109
  startBtn.addEventListener('click', () => {
110
- const fps = parseInt(document.getElementById('fpsInput').value) || 12;
111
  const n_steps = parseInt(document.getElementById('stepsInput').value) || 1;
112
  socket.emit('start_stream', { n_steps: n_steps, cfg: 0.0, fps: fps, clamp: true });
113
  });
 
37
  <h1>Pong</h1>
38
  <div style="margin-bottom: 12px;">
39
  <label style="display: block; margin-bottom: 8px;">
40
+ FPS: <input type="number" id="fpsInput" value="16" min="1" max="30" step="1" style="width: 60px; padding: 4px; margin-left: 8px;" />
41
  <span style="color: #aaa; font-size: 12px; margin-left: 8px;">frames per second</span>
42
  </label>
43
  <label style="display: block; margin-bottom: 8px;">
 
60
  ⏳ Another player is currently using the stream. Please wait for them to finish.
61
  </div>
62
  <div style="margin-top: 12px; font-size: 14px; color: #aaa; line-height: 1.5;">
63
+ This demo uses a small transformer model trained with rectified flow matching to simulate Pong game frames conditioned on user inputs. The model generates 24×24 pixel frames in real-time using diffusion sampling with configurable steps. Performance targets ~16 FPS with 4 diffusion steps on GPU hardware.
64
  </div>
65
  </div>
66
 
 
107
 
108
  // Start/stop controls
109
  startBtn.addEventListener('click', () => {
110
+ const fps = parseInt(document.getElementById('fpsInput').value) || 16;
111
  const n_steps = parseInt(document.getElementById('stepsInput').value) || 1;
112
  socket.emit('start_stream', { n_steps: n_steps, cfg: 0.0, fps: fps, clamp: true });
113
  });