OpenTalker / SadTalker

[CVPR 2023] SadTalker:Learning Realistic 3D Motion Coefficients for Stylized Audio-Driven Single Image Talking Face Animation
https://sadtalker.github.io/
Other
11.96k stars 2.23k forks source link

Error with directml version #140

Open SolarAux opened 1 year ago

SolarAux commented 1 year ago

load Sadtalker Checkpoints from .\extensions\SadTalker\checkpoints Error executing callback ui_tabs_callback for E:\autmatic1111\stable-diffusion-webui-directml\extensions\SadTalker\scripts\extension.py Traceback (most recent call last): File "E:\autmatic1111\stable-diffusion-webui-directml\modules\script_callbacks.py", line 125, in ui_tabs_callback res += c.callback() or [] File "E:\autmatic1111\stable-diffusion-webui-directml\extensions\SadTalker\scripts\extension.py", line 78, in on_ui_tabs from src.gradio_demo import SadTalker File "E:\autmatic1111\stable-diffusion-webui-directml/extensions/SadTalker\src\gradio_demo.py", line 3, in from src.utils.preprocess import CropAndExtract File "E:\autmatic1111\stable-diffusion-webui-directml/extensions/SadTalker\src\utils\preprocess.py", line 9, in from src.face3d.models import networks File "E:\autmatic1111\stable-diffusion-webui-directml/extensions/SadTalker\src\face3d\models__init.py", line 22, in from src.face3d.models.base_model import BaseModel File "E:\autmatic1111\stable-diffusion-webui-directml/extensions/SadTalker\src\face3d\models\base_model.py", line 9, in from . import networks File "E:\autmatic1111\stable-diffusion-webui-directml/extensions/SadTalker\src\face3d\models\networks.py", line 19, in from kornia.geometry import warp_affine File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia__init.py", line 11, in from . import augmentation, color, contrib, core, enhance, feature, io, losses, metrics, morphology, tracking, utils, x File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia\augmentation__init.py", line 1, in from kornia.augmentation._2d import ( File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia\augmentation_2d\init__.py", line 3, in from kornia.augmentation._2d.mix import * File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia\augmentation_2d\mix\init__.py", line 1, in from kornia.augmentation._2d.mix.cutmix import RandomCutMix, RandomCutMixV2 File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia\augmentation_2d\mix\cutmix.py", line 7, in from kornia.augmentation._2d.mix.base import MixAugmentationBase, MixAugmentationBaseV2 File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia\augmentation_2d\mix\base.py", line 10, in from kornia.geometry.boxes import Boxes File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia\geometry\boxes.py", line 582, in class Boxes3D: File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit_script.py", line 1323, in script _compile_and_register_class(obj, _rcb, qualified_name) File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit_recursive.py", line 47, in _compile_and_register_class script_class = torch._C._jit_script_class_compile(qualified_name, ast, defaults, rcb) File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit_recursive.py", line 863, in try_compile_fn return torch.jit.script(fn, _rcb=rcb) File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit_script.py", line 1343, in script fn = torch._C._jit_script_compile( File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit_recursive.py", line 863, in try_compile_fn return torch.jit.script(fn, _rcb=rcb) File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit_script.py", line 1340, in script ast = get_jit_def(obj, obj.name__) File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit\frontend.py", line 293, in get_jit_def return build_def(parsed_def.ctx, fn_def, type_line, def_name, self_name=self_name, pdt_arg_types=pdt_arg_types) File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit\frontend.py", line 331, in build_def param_list = build_param_list(ctx, py_def.args, self_name, pdt_arg_types) File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\jit\frontend.py", line 355, in build_param_list raise NotSupportedError(ctx_range, _vararg_kwarg_err) torch.jit.frontend.NotSupportedError: Compiled functions can't take variable number of arguments or use keyword-only arguments with defaults: File "E:\autmatic1111\stable-diffusion-webui-directml\modules\devices.py", line 260 def cat(tensors, *args, **kwargs):


    _tensors = []
    for i in range(len(tensors)):
'_boxes3d_to_polygons3d' is being compiled since it was called from 'Boxes3D.from_tensor'
  File "E:\autmatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\kornia\geometry\boxes.py", line 714
                raise ValueError("Some boxes have negative depths or 0.")

        hexahedrons = _boxes3d_to_polygons3d(xmin, ymin, zmin, width, height, depth)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
        hexahedrons = hexahedrons if batched else hexahedrons.squeeze(0)
        # Due to some torch.jit.script bug (at least <= 1.9), you need to pass all arguments to __init__ when
vinthony commented 1 year ago

which version of the pytorch, kornia are you use?

SolarAux commented 1 year ago

did you change something? if you did't change anything than starting with --no-half --precision full did fix the start problem.

now it starts but as always working only with cuda :-( could you please develop a cpu oder directml option?

vinthony commented 1 year ago

did you change something? if you did't change anything than starting with --no-half --precision full did fix the start problem.

now it starts but as always working only with cuda :-( could you please develop a cpu oder directml option?

for CPU: https://github.com/Winfredy/SadTalker/issues/151#issuecomment-1507906895