You may need to move the execution onto a WebWorker to ensure the main GUI process is not blocked for the page itself whilst your model inference is performed. Assuming you have no way to make the model more optimal so that it takes less time to perform the inference then your other option would be WebWorkers. I have in the past managed to run TFJS models via a WebWorker and stream the results back via the API to the GUI thread to display results or such as you can see from this demo I made to emulate a webcam stream in Google Meet:
Using TensorFlow.js in Chrome Extension in ZOOM / Google Meet

If you want to learn the basics check out these links as a start but there are probably others out there too for good tutorials:

  
      

      HTML5 Rocks - A resource for open web HTML5 developers
  

  
    

The Basics of Web Workers - HTML5 Rocks 1

  Web Workers are a means of spawning background scripts in your application, giving thread-like message passing for handling computationally intensive tasks.


  

  
    
    
  

  



  
      

      developer.mozilla.org
  

  
    

Using Web Workers - Web APIs | MDN 3

  Web Workers are a simple means for web content to run scripts in background threads. The worker thread can perform tasks without interfering with the user interface. In addition, they can perform I/O using XMLHttpRequest (although the responseXML and...


  

  
    
    
  

  


The main thing here though is that to get any WebGL acceleration in WebWorker the browser needs to support OffscreenCanvas and you should use that as visual elements like regular canvas are not supported in WebWorker code as there is no visual output at that layer.  Current state of OffscreenCanvas is shown here: OffscreenCanvas | Can I use... Support tables for HTML5, CSS3, etc
You can then send the results back to be shown in the GUI (regular web page code) however you wish with regular canvas etc as normal as you saw in my demo above.
Jason