Skip to content

Commit 62cd7ea

Browse files
committed
fix: create_dynamic_module infinite recursion when setting HF_HOME using relative path
1 parent 83bc6c9 commit 62cd7ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/utils/dynamic_modules_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def create_dynamic_module(name: Union[str, os.PathLike]):
6565
Creates a dynamic module in the cache directory for modules.
6666
"""
6767
init_hf_modules()
68-
dynamic_module_path = Path(HF_MODULES_CACHE) / name
68+
dynamic_module_path = Path(HF_MODULES_CACHE).absolute() / name
6969
# If the parent module does not exist yet, recursively create it.
7070
if not dynamic_module_path.parent.exists():
7171
create_dynamic_module(dynamic_module_path.parent)

0 commit comments

Comments
 (0)