mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
fixes for specific paths
This commit is contained in:
parent
629272c0ca
commit
16001e9429
5
nodes.py
5
nodes.py
@ -802,8 +802,9 @@ class SaveImage:
|
|||||||
digits = 0
|
digits = 0
|
||||||
return (digits, prefix)
|
return (digits, prefix)
|
||||||
|
|
||||||
subfolder = os.path.dirname(filename_prefix)
|
subfolder = os.path.dirname(os.path.normpath(filename_prefix))
|
||||||
filename = os.path.basename(filename_prefix)
|
filename = os.path.basename(os.path.normpath(filename_prefix))
|
||||||
|
|
||||||
full_output_folder = os.path.join(self.output_dir, subfolder)
|
full_output_folder = os.path.join(self.output_dir, subfolder)
|
||||||
|
|
||||||
if os.path.commonpath((self.output_dir, os.path.realpath(full_output_folder))) != self.output_dir:
|
if os.path.commonpath((self.output_dir, os.path.realpath(full_output_folder))) != self.output_dir:
|
||||||
|
@ -110,9 +110,11 @@ class ComfyApp {
|
|||||||
const img = new Image();
|
const img = new Image();
|
||||||
img.onload = () => r(img);
|
img.onload = () => r(img);
|
||||||
img.onerror = () => r(null);
|
img.onerror = () => r(null);
|
||||||
|
|
||||||
var filename = src.replace(/^.*[\\\/]/, '');
|
var filename = src.replace(/^.*[\\\/]/, '');
|
||||||
var subfolder = src.replace(filename, '');
|
var subfolder = src.replace(filename, '');
|
||||||
img.src = "/view?file=" + filename + "&subfolder=" + subfolder;
|
var params = new URLSearchParams({file: filename, subfolder});
|
||||||
|
img.src = "/view?" + params.toString();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
).then((imgs) => {
|
).then((imgs) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user