mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-16 08:33:29 +00:00
Merge f52e089d86
into 22ad513c72
This commit is contained in:
commit
d9f69f71c0
@ -10,6 +10,7 @@ from collections.abc import Collection
|
|||||||
from comfy.cli_args import args
|
from comfy.cli_args import args
|
||||||
|
|
||||||
supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.pt2', '.bin', '.pth', '.safetensors', '.pkl', '.sft'}
|
supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.pt2', '.bin', '.pth', '.safetensors', '.pkl', '.sft'}
|
||||||
|
supported_input_extensions: set[str] = {""} # {".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".webp", ".webm", ".mp4", ".mkv"}
|
||||||
|
|
||||||
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
||||||
|
|
||||||
@ -51,6 +52,9 @@ temp_directory = os.path.join(base_path, "temp")
|
|||||||
input_directory = os.path.join(base_path, "input")
|
input_directory = os.path.join(base_path, "input")
|
||||||
user_directory = os.path.join(base_path, "user")
|
user_directory = os.path.join(base_path, "user")
|
||||||
|
|
||||||
|
folder_names_and_paths["input"] = ([input_directory], supported_input_extensions)
|
||||||
|
folder_names_and_paths["latent"] = ([input_directory], {".latent"})
|
||||||
|
|
||||||
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
|
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
|
||||||
|
|
||||||
class CacheHelper:
|
class CacheHelper:
|
||||||
|
23
nodes.py
23
nodes.py
@ -499,9 +499,10 @@ class SaveLatent:
|
|||||||
class LoadLatent:
|
class LoadLatent:
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
input_dir = folder_paths.get_input_directory()
|
return {"required":
|
||||||
files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f)) and f.endswith(".latent")]
|
{"latent": (folder_paths.get_filename_list("latent"), )
|
||||||
return {"required": {"latent": [sorted(files), ]}, }
|
},
|
||||||
|
}
|
||||||
|
|
||||||
CATEGORY = "_for_testing"
|
CATEGORY = "_for_testing"
|
||||||
|
|
||||||
@ -1652,10 +1653,9 @@ class PreviewImage(SaveImage):
|
|||||||
class LoadImage:
|
class LoadImage:
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
input_dir = folder_paths.get_input_directory()
|
return {"required":
|
||||||
files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))]
|
{"image": (folder_paths.get_filename_list("input"), {"image_upload": True})
|
||||||
return {"required":
|
},
|
||||||
{"image": (sorted(files), {"image_upload": True})},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CATEGORY = "image"
|
CATEGORY = "image"
|
||||||
@ -1728,11 +1728,10 @@ class LoadImageMask:
|
|||||||
_color_channels = ["alpha", "red", "green", "blue"]
|
_color_channels = ["alpha", "red", "green", "blue"]
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
input_dir = folder_paths.get_input_directory()
|
return {"required":
|
||||||
files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))]
|
{"image": (folder_paths.get_filename_list("input"), {"image_upload": True}),
|
||||||
return {"required":
|
"channel": (s._color_channels, ),
|
||||||
{"image": (sorted(files), {"image_upload": True}),
|
},
|
||||||
"channel": (s._color_channels, ), }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CATEGORY = "mask"
|
CATEGORY = "mask"
|
||||||
|
Loading…
Reference in New Issue
Block a user