can specify a subfolder in the SaveImage node

This commit is contained in:
m957ymj75urz
2023-03-12 19:51:39 +01:00
parent 6d6758e9e4
commit 195d7aec9f
3 changed files with 19 additions and 10 deletions

View File

@@ -110,7 +110,9 @@ class ComfyApp {
const img = new Image();
img.onload = () => r(img);
img.onerror = () => r(null);
img.src = "/view/" + src;
var filename = src.replace(/^.*[\\\/]/, '');
var subfolder = src.replace(filename, '');
img.src = "/view?file=" + filename + "&subfolder=" + subfolder;
});
})
).then((imgs) => {