akhaliq HF Staff commited on
Commit
644b6c1
·
verified ·
1 Parent(s): 181e63a

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -18,7 +18,7 @@ const errorMsg = document.getElementById('error-msg');
18
 
19
  // State
20
  let ttsPipeline = null;
21
- let currentDevice = 'cpu';
22
 
23
  // Helper: Check WebGPU support
24
  async function checkWebGPU() {
@@ -35,7 +35,7 @@ checkWebGPU();
35
  // UI Event Listeners
36
  gpuToggle.addEventListener('change', (e) => {
37
  const useGPU = e.target.checked;
38
- currentDevice = useGPU ? 'webgpu' : 'cpu';
39
  deviceLabel.innerText = useGPU ? 'Run on WebGPU' : 'Run on CPU';
40
 
41
  // Reset pipeline to force reload with new device setting next time
 
18
 
19
  // State
20
  let ttsPipeline = null;
21
+ let currentDevice = 'wasm';
22
 
23
  // Helper: Check WebGPU support
24
  async function checkWebGPU() {
 
35
  // UI Event Listeners
36
  gpuToggle.addEventListener('change', (e) => {
37
  const useGPU = e.target.checked;
38
+ currentDevice = useGPU ? 'webgpu' : 'wasm';
39
  deviceLabel.innerText = useGPU ? 'Run on WebGPU' : 'Run on CPU';
40
 
41
  // Reset pipeline to force reload with new device setting next time