Unverified Commit 8581d9bc authored by gzguevara's avatar gzguevara Committed by GitHub
Browse files

changed to posix unet (#6719)



changed to posix
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent c1010662
...@@ -16,6 +16,7 @@ import os ...@@ -16,6 +16,7 @@ import os
from collections import defaultdict from collections import defaultdict
from contextlib import nullcontext from contextlib import nullcontext
from functools import partial from functools import partial
from pathlib import Path
from typing import Callable, Dict, List, Optional, Union from typing import Callable, Dict, List, Optional, Union
import safetensors import safetensors
...@@ -503,8 +504,9 @@ class UNet2DConditionLoadersMixin: ...@@ -503,8 +504,9 @@ class UNet2DConditionLoadersMixin:
weight_name = CUSTOM_DIFFUSION_WEIGHT_NAME if is_custom_diffusion else LORA_WEIGHT_NAME weight_name = CUSTOM_DIFFUSION_WEIGHT_NAME if is_custom_diffusion else LORA_WEIGHT_NAME
# Save the model # Save the model
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 fuse_lora(self, lora_scale=1.0, safe_fusing=False, adapter_names=None): def fuse_lora(self, lora_scale=1.0, safe_fusing=False, adapter_names=None):
self.lora_scale = lora_scale self.lora_scale = lora_scale
......
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