mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
resolve conflict with the new PreviewImage node
This commit is contained in:
parent
3d2f60b315
commit
629272c0ca
7
nodes.py
7
nodes.py
@ -804,10 +804,9 @@ class SaveImage:
|
|||||||
|
|
||||||
subfolder = os.path.dirname(filename_prefix)
|
subfolder = os.path.dirname(filename_prefix)
|
||||||
filename = os.path.basename(filename_prefix)
|
filename = os.path.basename(filename_prefix)
|
||||||
comfy_output_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)), "output")
|
full_output_folder = os.path.join(self.output_dir, subfolder)
|
||||||
full_output_folder = os.path.join(comfy_output_folder, subfolder)
|
|
||||||
|
|
||||||
if os.path.commonpath((comfy_output_folder, os.path.realpath(full_output_folder))) != comfy_output_folder:
|
if os.path.commonpath((self.output_dir, os.path.realpath(full_output_folder))) != self.output_dir:
|
||||||
print("Saving image outside the output folder is not allowed.")
|
print("Saving image outside the output folder is not allowed.")
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -842,7 +841,7 @@ class SaveImage:
|
|||||||
class PreviewImage(SaveImage):
|
class PreviewImage(SaveImage):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.output_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "temp")
|
self.output_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "temp")
|
||||||
self.url_suffix = "?type=temp"
|
self.url_suffix = "&type=temp"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
|
Loading…
Reference in New Issue
Block a user