Download SadTalker/src/utils/safetensor_helper.py from duyv/API_MC_AI: direct link, hf CLI and curl.
- Browser
- Download file 198 Bytes
-
https://huggingface.co/duyv/API_MC_AI/resolve/main/SadTalker/src/utils/safetensor_helper.py
- Command line
-
hf download hf://duyv/API_MC_AI/SadTalker/src/utils/safetensor_helper.py
-
curl -L -o safetensor_helper.py https://huggingface.co/duyv/API_MC_AI/resolve/main/SadTalker/src/utils/safetensor_helper.py
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 |