Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
nightfury
/
LipSyncer
like
8
Running
App
Files
Files
Community
4
650ee9e
LipSyncer
/
src
/
utils
/
safetensor_helper.py
nightfury
upload chkpt
95d308c
9 months ago
raw
Copy download link
history
blame
Safe
198 Bytes
def
load_x_from_safetensor
(
checkpoint, key
):
x_generator = {}
for
k,v
in
checkpoint.items():
if
key
in
k:
x_generator[k.replace(key+
'.'
,
''
)] = v
return
x_generator