Skip to content

Commit cc75db3

Browse files
committed
check path corectly
1 parent 8358ef6 commit cc75db3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/diffusers/configuration_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,11 @@ def load_config(
361361
)
362362
# Custom path for now
363363
if dduf_entries:
364+
# paths inside a DDUF file must always be "/"
364365
if subfolder is not None:
365-
config_file = os.path.join(pretrained_model_name_or_path, subfolder, cls.config_name)
366+
config_file = "/".join([pretrained_model_name_or_path, subfolder, cls.config_name])
366367
else:
367-
config_file = os.path.join(pretrained_model_name_or_path, cls.config_name)
368+
config_file = "/".join([pretrained_model_name_or_path, cls.config_name])
368369
if config_file not in dduf_entries:
369370
raise ValueError(
370371
f"We did not manage to find the file {config_file} in the dduf file. We only have the following files {dduf_entries.keys()}"

0 commit comments

Comments
 (0)