mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
fix(preset): update filePath retrieval method in removePreset function
This commit is contained in:
@@ -48,10 +48,7 @@ function formatPresetKey(key) {
|
|||||||
* @param {string} key - Preset key name to remove
|
* @param {string} key - Preset key name to remove
|
||||||
*/
|
*/
|
||||||
window.removePreset = async function(key) {
|
window.removePreset = async function(key) {
|
||||||
const filePath = document.querySelector('#modelModal .modal-content')
|
const filePath = document.querySelector('#modelModal .modal-content .file-path').dataset.filepath;
|
||||||
.querySelector('.file-path').textContent +
|
|
||||||
document.querySelector('#modelModal .modal-content')
|
|
||||||
.querySelector('#file-name').textContent + '.safetensors';
|
|
||||||
const loraCard = document.querySelector(`.model-card[data-filepath="${filePath}"]`);
|
const loraCard = document.querySelector(`.model-card[data-filepath="${filePath}"]`);
|
||||||
const currentPresets = parsePresets(loraCard.dataset.usage_tips);
|
const currentPresets = parsePresets(loraCard.dataset.usage_tips);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user