mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-25 05:40:15 +08:00
Merge 4da6562a67 into 519c941165
This commit is contained in:
commit
25d68095d0
@ -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] = {""}
|
||||||
|
|
||||||
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
||||||
|
|
||||||
@ -57,6 +58,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:
|
||||||
|
|||||||
21
nodes.py
21
nodes.py
@ -510,9 +510,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"
|
||||||
|
|
||||||
@ -1643,11 +1644,10 @@ class PreviewImage(SaveImage):
|
|||||||
class LoadImage:
|
class LoadImage:
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
input_dir = folder_paths.get_input_directory()
|
files = folder_paths.get_filename_list("input")
|
||||||
files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))]
|
|
||||||
files = folder_paths.filter_files_content_types(files, ["image"])
|
files = folder_paths.filter_files_content_types(files, ["image"])
|
||||||
return {"required":
|
return {"required":
|
||||||
{"image": (sorted(files), {"image_upload": True})},
|
{"image": (files, {"image_upload": True})},
|
||||||
}
|
}
|
||||||
|
|
||||||
CATEGORY = "image"
|
CATEGORY = "image"
|
||||||
@ -1720,11 +1720,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