Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,15 +106,21 @@ async function runDemo() {
|
|
| 106 |
})
|
| 107 |
.catch(error => {
|
| 108 |
console.error("Error initializing LlmInference:", error);
|
| 109 |
-
errorMessageDiv.
|
| 110 |
`**Troubleshooting Steps:**<br>` +
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
submit.disabled = true;
|
| 119 |
submit.value = 'Failed to load model';
|
| 120 |
});
|
|
|
|
| 106 |
})
|
| 107 |
.catch(error => {
|
| 108 |
console.error("Error initializing LlmInference:", error);
|
| 109 |
+
errorMessageDiv.innerHTML = `Failed to initialize the task due to WebGPU limitations. Details: ${error} <br><br>` +
|
| 110 |
`**Troubleshooting Steps:**<br>` +
|
| 111 |
+
`1. **Verify WebGPU Support:**<br>` +
|
| 112 |
+
` - **Browser:** Use **Google Chrome** or **Microsoft Edge (latest versions).**<br>` +
|
| 113 |
+
` - **Check chrome://gpu (or edge://gpu):** In your browser address bar, type \`chrome://gpu\` (or \`edge://gpu\`) and press Enter. Look for "WebGPU" section. <br>` +
|
| 114 |
+
` - **Status:** Should say "Hardware accelerated". If disabled or "Software only", WebGPU is not working correctly.<br>` +
|
| 115 |
+
` - **maxStorageBufferBindingSize:** Verify the reported value. If it's very low, your GPU/browser might be too limited.<br>` +
|
| 116 |
+
` - **Enable WebGPU Flags (if needed):** In chrome://flags (or edge://flags), search for "WebGPU" and try enabling flags like \`#enable-unsafe-webgpu\` and restart browser.<br><br>` +
|
| 117 |
+
`2. **Update Browser and GPU Drivers:**<br>` +
|
| 118 |
+
` - **Browser:** Update Chrome/Edge to the latest version.<br>` +
|
| 119 |
+
` - **GPU Drivers:** Download and install the latest drivers from NVIDIA, AMD, or Intel websites for your specific GPU and operating system. **Restart your computer after driver install.**<br><br>` +
|
| 120 |
+
`3. **Restart Your Computer:** A simple restart can resolve temporary issues.<br><br>` +
|
| 121 |
+
`4. **Try a Different Browser/Computer:** Test with a different WebGPU-compatible browser (Chrome/Edge) or on a different computer with a more capable GPU if possible.<br><br>` +
|
| 122 |
+
`5. **Check GPU Compatibility:** Older or very low-end GPUs might have limited WebGPU support.<br><br>` +
|
| 123 |
+
`If the issue persists after these steps, your GPU or browser may have inherent limitations for running this LLM demo in WebGPU.`;
|
| 124 |
submit.disabled = true;
|
| 125 |
submit.value = 'Failed to load model';
|
| 126 |
});
|