AUTOMATIC1111 / stable-diffusion-webui-rembg

Removes backgrounds from pictures. Extension for webui.
MIT License
1.17k stars 173 forks source link

onxxruntime error - TensorRT does not natively support INT64 #41

Closed mykeehu closed 3 months ago

mykeehu commented 3 months ago

There is one bug I can't solve. I put the image in the Extras page, tick the Remove background option at the bottom, and when I launch it, I get this error:

2024-05-09 11:49:43.9136844 [W:onnxruntime:Default, tensorrt_execution_provider.h:83 onnxruntime::TensorrtLogger::log] [2024-05-09 09:49:43 WARNING] onnx2trt_utils.cpp:369: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
2024-05-09 11:50:18.0986453 [W:onnxruntime:Default, tensorrt_execution_provider.h:83 onnxruntime::TensorrtLogger::log] [2024-05-09 09:50:18 WARNING] The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
2024-05-09 11:50:18.1983962 [W:onnxruntime:Default, tensorrt_execution_provider.h:83 onnxruntime::TensorrtLogger::log] [2024-05-09 09:50:18 WARNING] The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.

How do I fix this, because even though I deleted the onxxruntime and tensorrt folders, the error still persists.

mykeehu commented 3 months ago

Ok, I found a solution, it seems!

stanleyshek commented 2 months ago

pip install rembg[gpu,cli]

I got a similar problem. Tried follow your steps but still get error with these messages. Any hint?

Screenshot 2024-06-18 004713