Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
Duplicated from
abreza/SadTalker
Han-123
/
SadTalker
like
1
Running
on
Zero
App
Files
Files
Community
1
main
SadTalker
/
src
/
utils
/
safetensor_helper.py
abreza
init
8f6558d
5 months ago
raw
Copy download link
history
blame
contribute
delete
No virus
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