ComfyUI-Upscaler-Tensorrt icon indicating copy to clipboard operation
ComfyUI-Upscaler-Tensorrt copied to clipboard

Error when trying export_trt.py

Open oliverban opened this issue 1 year ago • 1 comments
trafficstars

Get the following error: C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Upscaler-Tensorrt>python export_trt.py Traceback (most recent call last): File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Upscaler-Tensorrt\export_trt.py", line 1, in import torch File "c:\python\Lib\site-packages\torch_init_.py", line 519, in raise ImportError(textwrap.dedent(''' ImportError: Failed to load PyTorch C extensions: It appears that PyTorch has loaded the torch/_C folder of the PyTorch repository rather than the C extensions which are expected in the torch._C namespace. This can occur when using the install workflow. e.g. $ python setup.py install && python -c "import torch"

This error can generally be solved using the `develop` workflow
    $ python setup.py develop && python -c "import torch"  # This should succeed
or by running Python from a different directory.

oliverban avatar Jul 23 '24 15:07 oliverban

Try running export_trt.py wihout using comfyui portable (create a new virtual environment somewhere else, clone this repository, install the dependencies, then export the engines)

not sure how/why comfyui portable causes this error

yuvraj108c avatar Aug 12 '24 09:08 yuvraj108c