MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / load_safetensors

Function load_safetensors

models/transformer/utils.py:102–108  ·  view source on GitHub ↗
(in_path: str)

Source from the content-addressed store, hash-verified

100
101
102def load_safetensors(in_path: str):
103 if os.path.isdir(in_path):
104 return load_safetensors_from_dir(in_path)
105 elif os.path.isfile(in_path):
106 return load_safetensors_from_path(in_path)
107 else:
108 raise ValueError(f'{in_path} does not exist')
109
110
111def load_safetensors_from_path(in_path: str):

Callers 1

get_transformer3dFunction · 0.70

Calls 2

Tested by

no test coverage detected