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

error when building Tensorrt engine

Open ModzhaHead opened this issue 1 year ago • 4 comments
trafficstars

building tensorrt error

ModzhaHead avatar May 23 '24 07:05 ModzhaHead

Hi, it might be a conflict with other modules, not really sure

try renaming the file to trt_utilities.py and replace the imports in export_trt.py -> from trt_utilities import Engine

and what python version are you using?

yuvraj108c avatar May 23 '24 08:05 yuvraj108c

I did as you advised, but nothing changed building tensorrt error 2

python 3.10.11

ModzhaHead avatar May 23 '24 09:05 ModzhaHead

Unfortunately, I have no idea what's causing this issue /:

Last resort, add this to the top of export_trt.py

import sys
sys.path.append("C:\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\ComfyUI-Upscaler-Tensorrt")

yuvraj108c avatar May 24 '24 17:05 yuvraj108c

building tensorrt error

Go into comfyiui manager > install custom nodes > ctrl+f > type Conflicted and then press f3 to scroll through anything it found and see if anything conflicts with tensorrt.

image

KewkLW avatar May 26 '24 07:05 KewkLW

Go into comfyiui manager > install custom nodes > ctrl+f > type Conflicted and then press f3 to scroll through anything it found and see if anything conflicts with tensorrt.

In fact, we can do it simpler and write “tensorrt” instead of “conflicting”, if only in order to immediately find everything that relates to it. As a result, very few were found, and there were no conflicting nodes among them iFBoql8pjY

ModzhaHead avatar May 27 '24 09:05 ModzhaHead

Last resort, add this to the top of export_trt.py

import sys
sys.path.append("C:\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\ComfyUI-Upscaler-Tensorrt")

And it worked! Thank you very much for the help fToF9QkwI6

ModzhaHead avatar May 27 '24 13:05 ModzhaHead

By the way, in order for the nodes to be initialized in ComfyUI, you should make the same edit to the init.py file, please note. After that, everything started, the node is present, only now the error appears during operation: 85wouBFS1K

my GPU is rtx4070 12Gb

ModzhaHead avatar May 27 '24 14:05 ModzhaHead

nice looks like you're out of gpu memory /:

yuvraj108c avatar May 27 '24 19:05 yuvraj108c

Unfortunately, I have no idea what's causing this issue /:

Last resort, add this to the top of export_trt.py

import sys
sys.path.append("C:\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\ComfyUI-Upscaler-Tensorrt")

Add this to the readme somewhere under the name FaQ, as this is a common issue.

Thanks!

Shyryp avatar Aug 24 '24 19:08 Shyryp