mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
sd35 all-in-one safetensors support
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -75,16 +75,6 @@ def read_state_dict(checkpoint_file, map_location=None, what:str='model'): # pyl
|
||||
return sd
|
||||
|
||||
|
||||
def get_safetensor_keys(filename):
|
||||
keys = []
|
||||
try:
|
||||
with safetensors.torch.safe_open(filename, framework="pt", device="cpu") as f:
|
||||
keys = f.keys()
|
||||
except Exception as e:
|
||||
shared.log.error(f'Load dict: path="{filename}" {e}')
|
||||
return keys
|
||||
|
||||
|
||||
def get_state_dict_from_checkpoint(pl_sd):
|
||||
checkpoint_dict_replacements = {
|
||||
'cond_stage_model.transformer.embeddings.': 'cond_stage_model.transformer.text_model.embeddings.',
|
||||
|
||||
Reference in New Issue
Block a user