diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 3c662bf0..1a931ea0 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,3 @@ # These are supported funding model platforms -ko_fi: cmdr2_stablediffusion_ui +ko_fi: easydiffusion diff --git a/README.md b/README.md index a31edfc1..2efebf1d 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,21 @@ Does not require technical knowledge, does not require pre-installed software. 1 Click the download button for your operating system:

- - - + + +

**Hardware requirements:** -- **Windows:** NVIDIA graphics card (minimum 2 GB RAM), or run on your CPU. -- **Linux:** NVIDIA or AMD graphics card (minimum 2 GB RAM), or run on your CPU. +- **Windows:** NVIDIA graphics card¹ (minimum 2 GB RAM), or run on your CPU. +- **Linux:** NVIDIA¹ or AMD² graphics card (minimum 2 GB RAM), or run on your CPU. - **Mac:** M1 or M2, or run on your CPU. - Minimum 8 GB of system RAM. - Atleast 25 GB of space on the hard disk. +¹) [CUDA Compute capability](https://en.wikipedia.org/wiki/CUDA#GPUs_supported) level of 3.7 or higher required. + +²) ROCm 5.2 support required. The installer will take care of whatever is needed. If you face any problems, you can join the friendly [Discord community](https://discord.com/invite/u9yhsFmEkB) and ask for assistance. diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 909ee668..12ad5a0c 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -678,6 +678,29 @@ function getAllModelNames(type) { return f(modelsOptions[type]) } +// gets a flattened list of all models of a certain type. e.g. "path/subpath/modelname" +// use the filter to search for all models having a certain name. +function getAllModelPathes(type,filter="") { + function f(tree, prefix) { + if (tree == undefined) { + return [] + } + let result = [] + tree.forEach((e) => { + if (typeof e == "object") { + result = result.concat(f(e[1], prefix + e[0] + "/")) + } else { + if (filter=="" || e==filter) { + result.push(prefix + e) + } + } + }) + return result + } + return f(modelsOptions[type], "") +} + + function onUseAsThumbnailClick(req, img) { let scale = 1 let targetWidth = img.naturalWidth diff --git a/ui/plugins/ui/lora-prompt-parser.plugin.js b/ui/plugins/ui/lora-prompt-parser.plugin.js index c1cbcac7..0510b47f 100644 --- a/ui/plugins/ui/lora-prompt-parser.plugin.js +++ b/ui/plugins/ui/lora-prompt-parser.plugin.js @@ -29,22 +29,13 @@ let modelWeights = LoRA.map(e => e.lora_alpha_0) loraModelField.value = {modelNames: modelNames, modelWeights: modelWeights} - showToast("Prompt successfully processed", LoRA[0].lora_model_0); + showToast("Prompt successfully processed") } //promptField.dispatchEvent(new Event('change')); }); - function isModelAvailable(array, searchString) { - const foundItem = array.find(function(item) { - item = item.toString().toLowerCase(); - return item === searchString.toLowerCase() - }); - - return foundItem || ""; - } - // extract LoRA tags from strings function extractLoraTags(prompt) { // Define the regular expression for the tags @@ -55,11 +46,13 @@ // Iterate over the string, finding matches for (const match of prompt.matchAll(regex)) { - const modelFileName = isModelAvailable(modelsCache.options.lora, match[1].trim()) - if (modelFileName !== "") { + const modelFileName = match[1].trim() + const loraPathes = getAllModelPathes("lora", modelFileName) + if (loraPathes.length > 0) { + const loraPath = loraPathes[0] // Initialize an object to hold a match let loraTag = { - lora_model_0: modelFileName, + lora_model_0: loraPath, } //console.log("Model:" + modelFileName);