From 102f458f27d69669c4e76a052223367d7e1cd282 Mon Sep 17 00:00:00 2001 From: guojianzhu Date: Mon, 19 Aug 2024 22:36:52 +0800 Subject: [PATCH] doc: update readme --- readme.md | 3 +++ src/utils/helper.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 2c17496..b78de8e 100644 --- a/readme.md +++ b/readme.md @@ -248,6 +248,9 @@ And many more amazing contributions from our community! ## Acknowledgements πŸ’ We would like to thank the contributors of [FOMM](https://github.com/AliaksandrSiarohin/first-order-model), [Open Facevid2vid](https://github.com/zhanglonghao1992/One-Shot_Free-View_Neural_Talking_Head_Synthesis), [SPADE](https://github.com/NVlabs/SPADE), [InsightFace](https://github.com/deepinsight/insightface) and [X-Pose](https://github.com/IDEA-Research/X-Pose) repositories, for their open research and contributions. +## Ethics Considerations πŸ›‘οΈ +Portrait animation technologies come with social risks, particularly the potential for misuse in creating deepfakes. To mitigate these risks, it’s crucial to follow ethical guidelines and adopt responsible usage practices. At present, the synthesized results contain visual artifacts that may help in detecting deepfakes. Please note that we do not assume any legal responsibility for the use of the results generated by this project. + ## Citation πŸ’– If you find LivePortrait useful for your research, welcome to 🌟 this repo and cite our work using the following BibTeX: ```bibtex diff --git a/src/utils/helper.py b/src/utils/helper.py index 98bcdf8..dda9a69 100644 --- a/src/utils/helper.py +++ b/src/utils/helper.py @@ -100,7 +100,10 @@ def squeeze_tensor_to_numpy(tensor): def dct2device(dct: dict, device): for key in dct: - dct[key] = torch.tensor(dct[key]).to(device) + if isinstance(dct[key], torch.Tensor): + dct[key] = dct[key].to(device) + else: + dct[key] = torch.tensor(dct[key]).to(device) return dct