From 3000e53cc01c6bf639f45126bb175d7d8690782d Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 28 Apr 2023 15:38:52 +0530 Subject: [PATCH] Show suggestions for handling system RAM exhaustion --- ui/media/js/main.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 2f63650b..4f2eef50 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -876,6 +876,17 @@ function onTaskCompleted(task, reqBody, instance, outputContainer, stepUpdate) { 1. If you have set an initial image, please try reducing its dimension to ${MAX_INIT_IMAGE_DIMENSION}x${MAX_INIT_IMAGE_DIMENSION} or smaller.
2. Try picking a lower level in the 'GPU Memory Usage' setting (in the 'Settings' tab).
3. Try generating a smaller image.
` + } else if (msg.toLowerCase().includes('DefaultCPUAllocator: not enough memory')) { + msg += `

+ Reason: Your computer is running out of system RAM! +
+ Suggestions: +
+ 1. Try closing unnecessary programs and browser tabs.
+ 2. If that doesn't help, please increase your computer's virtual memory by following these steps for + Windows, or + Linux.
+ 3. Try restarting your computer.
` } } else { msg = `Unexpected Read Error:
StepUpdate: ${JSON.stringify(stepUpdate, undefined, 4)}
`