Fannovel16 / comfyui_controlnet_aux

ComfyUI's ControlNet Auxiliary Preprocessors
Apache License 2.0
2.13k stars 202 forks source link

Error occurred when executing MeshGraphormer-DepthMapPreprocessor #214

Open GothWave opened 8 months ago

GothWave commented 8 months ago

"Could not run 'aten::empty.memory_format' with arguments from the 'SparsePrivateUse1' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build)"

" 'aten::empty.memory_format' is only available for these backends: [CPU, Meta, PrivateUse1, QuantizedCPU, QuantizedMeta, MkldnnCPU, SparseCPU, SparseMeta, SparseCsrCPU, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradHIP, AutogradXLA, AutogradMPS, AutogradIPU, AutogradXPU, AutogradHPU, AutogradVE, AutogradLazy, AutogradMeta, AutogradMTIA, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, AutogradNestedTensor, Tracer, AutocastCPU, AutocastCUDA, FuncTorchBatched, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PythonDispatcher]."

already tried updating and reinstalling. My env variables are --directml and --auto-launch. (Changing --directml to --cpu still gives me the same error) (AMD, Rx6600 and Windows)

GothWave commented 8 months ago

So, what is a backend, how do i change it and how do i find this 'SparcePrivateUse1' backend?

gkiryaziev commented 8 months ago

I have the same error.

I tried specifying ["DirectMLExecutionProvider","CPUExecutionProvider"] and only ["CPUExecutionProvider"] in the config.yaml, but nothing helped.

Windows 21H2 AMD RX6600 CMD: python main.py --directml --use-quad-cross-attention --normalvram --fp16-text-enc --fp16-unet --fp16-vae

My log: comfyui.log

gkiryaziev commented 8 months ago

I found that my video card has type privateuseone and not dml.

Here https://github.com/Fannovel16/comfyui_controlnet_aux/commit/88d92236f66ffad9b36a56cbfc62e3dbdbd6b273 in src/wrapper_for_mps/__init__.py I found a list of types to which .to_dense() should be applied, and I added my type to this list:

if device.type in ['privateuseone', 'dml', 'mps', 'xpu']:

and that fixes the error,

but I got a new one RuntimeError: new(): expected key in DispatchKeySet(CPU, CUDA, HIP, XLA, MPS, IPU, XPU, HPU, Lazy, Meta) but got: PrivateUse1, described already here https://github.com/Fannovel16/comfyui_controlnet_aux/issues/213

My Log: comfyui.log.