From d83eb610d6401c1a441b302a30c94c83394d2014 Mon Sep 17 00:00:00 2001 From: matt3o Date: Wed, 11 Oct 2023 11:04:16 +0200 Subject: [PATCH] fix #28 --- IPAdapterPlus.py | 14 +++++++------- .../IPAdapter_prepped.json | 0 2 files changed, 7 insertions(+), 7 deletions(-) rename IPAdapter_prepped.json => examples/IPAdapter_prepped.json (100%) diff --git a/IPAdapterPlus.py b/IPAdapterPlus.py index 0dca84e..71a510f 100644 --- a/IPAdapterPlus.py +++ b/IPAdapterPlus.py @@ -399,8 +399,8 @@ class PrepImageForClipVision: "crop_position": (["top", "bottom", "left", "right", "center"],), "sharpening": ("FLOAT", {"default": 0.0, "min": 0, "max": 1, "step": 0.05}), "add_weight": ("BOOLEAN", {"default": False}), - }, - } + }, + } RETURN_TYPES = ("IMAGE",) FUNCTION = "prep_image" @@ -455,8 +455,8 @@ class IPAdapterEncoder: "image": ("IMAGE",), "plus": ("BOOLEAN", { "default": False }), "noise": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.01 }), - }, - } + }, + } RETURN_TYPES = ("EMBEDS",) FUNCTION = "preprocess" @@ -504,8 +504,8 @@ class IPAdapterSaveEmbeds: return {"required": { "embeds": ("EMBEDS",), "filename_prefix": ("STRING", {"default": "embeds/IPAdapter"}) - }, - } + }, + } RETURN_TYPES = () FUNCTION = "save" @@ -525,7 +525,7 @@ class IPAdapterLoadEmbeds: @classmethod def INPUT_TYPES(s): input_dir = folder_paths.get_input_directory() - files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f)) and f.endswith(".ipadpt")] + files = [os.path.relpath(os.path.join(root, file), input_dir) for root, dirs, files in os.walk(input_dir) for file in files if file.endswith('.ipadpt')] return {"required": {"embeds": [sorted(files), ]}, } RETURN_TYPES = ("EMBEDS", ) diff --git a/IPAdapter_prepped.json b/examples/IPAdapter_prepped.json similarity index 100% rename from IPAdapter_prepped.json rename to examples/IPAdapter_prepped.json