From 424d5fc68bd3b82fe3c491f27b0c37bb3de1d123 Mon Sep 17 00:00:00 2001 From: chibiace Date: Wed, 19 Mar 2025 00:12:47 +1300 Subject: [PATCH] windows path fix --- VERSION | 2 +- nodes/LoadImageExtended.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 359a5b9..10bf840 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.0.1 \ No newline at end of file diff --git a/nodes/LoadImageExtended.py b/nodes/LoadImageExtended.py index da50f21..e8fd681 100644 --- a/nodes/LoadImageExtended.py +++ b/nodes/LoadImageExtended.py @@ -56,7 +56,12 @@ class LoadImageExtended: def load_image(self, image, vae=None): image_path = folder_paths.get_annotated_filepath(image) - filename = image_path.rsplit("/", 1)[-1] + + # Check if os is windows for backwards paths. + if os.name == "nt": + filename = image_path.rsplit("\\", 1)[-1] + else: + filename = image_path.rsplit("/", 1)[-1] im = Image.open(image_path)