Unverified Commit 99086091 authored by Charchit Sharma's avatar Charchit Sharma Committed by GitHub
Browse files

change to posix for better Windows support for lora loaders (#6590)

* posix lora

* changes and style fix
parent 23eed397
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
import inspect import inspect
import os import os
from contextlib import nullcontext from contextlib import nullcontext
from pathlib import Path
from typing import Callable, Dict, List, Optional, Union from typing import Callable, Dict, List, Optional, Union
import safetensors import safetensors
...@@ -960,8 +961,9 @@ class LoraLoaderMixin: ...@@ -960,8 +961,9 @@ class LoraLoaderMixin:
else: else:
weight_name = LORA_WEIGHT_NAME weight_name = LORA_WEIGHT_NAME
save_function(state_dict, os.path.join(save_directory, weight_name)) save_path = Path(save_directory, weight_name).as_posix()
logger.info(f"Model weights saved in {os.path.join(save_directory, weight_name)}") save_function(state_dict, save_path)
logger.info(f"Model weights saved in {save_path}")
def unload_lora_weights(self): def unload_lora_weights(self):
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment