-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU not used,CPU running full #682
Comments
I have same issues. |
me too. |
from rembg import remove
import cv2
import onnxruntime as ort
print(ort.get_available_providers())
exit() python 3.12 GPU is not avaliable.However,cuda is ok.
|
try thanks |
In my case, reinstalling solved the issue. pip uninstall rembg
pip uninstall onnxruntime
pip install rembg[gpu] env: Also note that onnxruntime-gpu >= 19 supports only cuda 12.x. https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html |
wen running u2netp GPU not used,CPU running full
import torch
from PIL import Image
from config.conf import PROJECT_ROOT
from server.rembg.rembg import new_session, remove
rembg_module = Rembg().load_image_net()
image = url_to_PIL_array(image_url)
new_img = rembg_module.process(image)
class Rembg:
model = {
"U2NET": "u2net",
"U2NETP": "u2netp",
"U2NET_HUMAN_SEG": "u2net_human_seg",
"U2NET_CLOTH_SEG": "u2net_cloth_seg",
"SILUETA": "silueta",
"ISNET-GENERAL-USE": "isnet-general-use",
"ISNET-ANIME": "isnet-anime",
"SAM": "sam",
}
GPU
The text was updated successfully, but these errors were encountered: