Skip to content

Commit

Permalink
Merge pull request #142 from anhkhoatranle30/main
Browse files Browse the repository at this point in the history
Add filepaths as outputs
  • Loading branch information
ltdrdata authored Aug 18, 2024
2 parents 56f4f01 + 17716dd commit 452d8cf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions inspire/image_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ def INPUT_TYPES(s):
}
}

RETURN_TYPES = ("IMAGE", "MASK")
OUTPUT_IS_LIST = (True, True)
RETURN_TYPES = ("IMAGE", "MASK", "STRING")
RETURN_NAMES = ("IMAGE","MASK", "FILE PATH")
OUTPUT_IS_LIST = (True, True, True)

FUNCTION = "load_images"

Expand Down Expand Up @@ -159,6 +160,7 @@ def load_images(self, directory: str, image_load_cap: int = 0, start_index: int

images = []
masks = []
file_paths = []

limit_images = False
if image_load_cap > 0:
Expand All @@ -184,9 +186,10 @@ def load_images(self, directory: str, image_load_cap: int = 0, start_index: int

images.append(image)
masks.append(mask)
file_paths.append(str(image_path))
image_count += 1

return images, masks
return (images, masks, file_paths)


class LoadImageInspire:
Expand Down

0 comments on commit 452d8cf

Please sign in to comment.