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; }