From bd1f3be8f21c68abbf6fe7ff98d1d98d660cd927 Mon Sep 17 00:00:00 2001 From: Norman Koch Date: Fri, 27 Oct 2023 19:29:42 +0200 Subject: [PATCH] fix --- model.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/model.js b/model.js index 2da53a28a6..84da5d9e52 100644 --- a/model.js +++ b/model.js @@ -1450,6 +1450,15 @@ async function set_weights_from_string (string, no_warning, no_error, m) { } err("" + e); + + if(("" + e).includes("JSON.parse:")) { + Swal.fire({ + icon: 'error', + title: 'Oops...', + text: 'The weights.json file you uploaded did not contain valid JSON. Do not use the .bin-file. Use the .json-file.' + }) + err("" + e); + } } }