Grounded-Segment-Anything
Grounded-Segment-Anything copied to clipboard
Why do I run on cpu and not GPU?
torch 1.9.0+cu111 torchvision 0.10.0+cu111 It's very slow,cpu usage is up to 2000%+ Does anyone know how to solve this problem? thanks!
to execute the models in GPU add .to(device = 'cuda')
at the end of GroundingDINO and SAM model.
If the execution consumes a lot of ram try to use a light version of the model of the weight. Else, you can use google colab
I have loaded the model into the gpu and I can see with nvidia-smi that the memory is increased, but it is still running on the cpu
What's the minimum GPU RAM for this project?
to execute the models in GPU add
.to(device = 'cuda')
at the end of GroundingDINO and SAM model.If the execution consumes a lot of ram try to use a light version of the model of the weight. Else, you can use google colab
I tried to change all the devices to cuda
, but everytime I am running using cuda
as a device my jupyter kernel crashes.
But when I use cpu
it works perfectly .
@guchuntao Do you solve this problem? I also find that the CPU usage is very high but I ensure that all models are loaded in GPUs.