mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-03-13 14:21:20 +00:00
Latent files saved under Input/Latent but require manual move to Input for loading
This commit is contained in:
parent
6ee066a14f
commit
cadadc89cc
2
main.py
2
main.py
@ -230,6 +230,8 @@ if __name__ == "__main__":
|
||||
folder_paths.add_model_folder_path("vae", os.path.join(folder_paths.get_output_directory(), "vae"))
|
||||
folder_paths.add_model_folder_path("diffusion_models", os.path.join(folder_paths.get_output_directory(), "diffusion_models"))
|
||||
folder_paths.add_model_folder_path("loras", os.path.join(folder_paths.get_output_directory(), "loras"))
|
||||
folder_paths.add_model_folder_path("latents", os.path.join(folder_paths.get_output_directory(), "latents"))
|
||||
|
||||
|
||||
if args.input_directory:
|
||||
input_dir = os.path.abspath(args.input_directory)
|
||||
|
7
nodes.py
7
nodes.py
@ -478,9 +478,12 @@ class SaveLatent:
|
||||
class LoadLatent:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
input_dir = folder_paths.get_input_directory()
|
||||
input_dir = os.path.join(folder_paths.get_output_directory(), "latents") # Adjusts to "Input/Latent"
|
||||
if not os.path.exists(input_dir):
|
||||
os.makedirs(input_dir, exist_ok=True)
|
||||
files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f)) and f.endswith(".latent")]
|
||||
return {"required": {"latent": [sorted(files), ]}, }
|
||||
return {"required": {"latent": (folder_paths.get_filename_list("latents"), {"tooltip": "The name of the latent from output/latents to load."})}}
|
||||
|
||||
|
||||
CATEGORY = "_for_testing"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user