Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2025-12-02 12:25:04 +01:00
parent b97aae687c
commit 0ad40d2b8b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,10 +1,11 @@
from enum import Enum
import sys
import time
import copy
import inspect
import logging
import os
import os.path
from enum import Enum
import diffusers
import diffusers.loaders.single_file_utils
import torch
@@ -65,7 +66,6 @@ def set_huggingface_options():
else:
sd_hijack_accelerate.restore_accelerate()
if (shared.opts.runai_streamer_diffusers or shared.opts.runai_streamer_transformers) and (sys.platform == 'linux'):
import os
log.debug(f'Loader: runai enabled chunk={os.environ["RUNAI_STREAMER_CHUNK_BYTESIZE"]} limit={os.environ["RUNAI_STREAMER_MEMORY_LIMIT"]}')
sd_hijack_safetensors.hijack_safetensors(shared.opts.runai_streamer_diffusers, shared.opts.runai_streamer_transformers)
else:
+1 -1
View File
@@ -120,7 +120,7 @@ def load_sdnq_model(model_path: str, model_cls: ModelMixin = None, file_name: st
state_dict = load_files(files, key_mapping=key_mapping, device=device, method=load_method)
if isinstance(getattr(model, "_tied_weights_keys", None), dict):
for key, value in model._tied_weights_keys.items():
for key, value in model._tied_weights_keys.items(): # pylint: disable=protected-access
if value in state_dict.keys() and key not in state_dict.keys():
state_dict[key] = state_dict[value]
else: