I am working on getting a local server set up that can serve pages that will have access to tensorflow.js and the webGPU backend.
I have run into an issue where if I serve my files on localhost (127.0.0.1) I am able to load the webGPU backend and everything runs as expected.
However, when I try serving the exact same files at my local IP address like 192.168.x.x (so I can access the host from other devices), I get a “Error: Backend name ‘webgpu’ not found in registry” error when trying to set the backend to webGPU.
I tried serving it using purely node with the http module, http-server, and express and am running into the same error.
Anyone have any ideas of what could cause this to happen? Are there specific headers that need to be set in order to support the webGPU backend? What could cause this to break when all I have done is change the IP address where the file is served
await import(`https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js`);
await import(`https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgpu/dist/tf-backend-webgpu.js`);
await tf.ready();
await tf.setBackend("webgpu"); // <--Error: Backend name 'webgpu' not found in registry
console.log(tf.getBackend());