From f1c934b765c7396e22ad422a956a493eb4fcee8a Mon Sep 17 00:00:00 2001 From: cou Date: Wed, 6 Mar 2024 22:43:25 +0900 Subject: [PATCH] fix for normal webui --- javascript/civitai_helper.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/javascript/civitai_helper.js b/javascript/civitai_helper.js index bb45540..c51fb91 100644 --- a/javascript/civitai_helper.js +++ b/javascript/civitai_helper.js @@ -31,7 +31,13 @@ export function ch_sd_version() { } function extract_version(text) { - const matches = text.match(/v[0-9]\.[0-9]\.[0-9]/); + let matches; + // for forge + if (text[0] == 'f') + matches = text.match(/v[0-9]\.[0-9]\.[0-9]/); + else + matches = text.match(/[0-9]\.[0-9]\.[0-9]/); + if (matches === null || matches.length == 0) { return null; }