KwaiVGI / LivePortrait

Bring portraits to life!
https://liveportrait.github.io
Other
11.41k stars 1.16k forks source link

Running into error when executing. #164

Open kwang0429 opened 1 month ago

kwang0429 commented 1 month ago

When I run the command line I get the following error, can anyone please help me ? thanks

C:\Users\djfre\LivePortrait>python inference.py -s assets/examples/source/s9.jpg -d assets/examples/driving/d0.mp4 Traceback (most recent call last): File "C:\Users\djfre\LivePortrait\inference.py", line 7, in from src.config.inference_config import InferenceConfig File "C:\Users\djfre\LivePortrait\src\config\inference_config.py", line 15, in @dataclass(repr=False) # use repr from PrintableConfig ^^^^^^^^^^^^^^^^^^^^^ File "C:\Python312\Lib\dataclasses.py", line 1258, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python312\Lib\dataclasses.py", line 994, in _process_class cls_fields.append(_get_field(cls, name, type, kw_only)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python312\Lib\dataclasses.py", line 852, in _get_field raise ValueError(f'mutable default {type(f.default)} for field ' ValueError: mutable default <class 'numpy.ndarray'> for field mask_crop is not allowed: use default_factory

FurkanGozukara commented 1 month ago

using python 3.12 is your error. use python 3.10 > https://youtu.be/-NjNy7afOQ0

you can follow my tutorial for LivePortrait : https://youtu.be/FPtpNrmuwXk