You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello , i noticed that the model doesn't automatically utilize CUDA for GPU even when there is a CUDA device , im not an expert but i made some modifications in owlv2_model.py , I added .to(DEVICE) to move the model and its inputs to the GPU
after the model instantiation (around line 37)
hello , i noticed that the model doesn't automatically utilize CUDA for GPU even when there is a CUDA device , im not an expert but i made some modifications in
owlv2_model.py
, I added.to(DEVICE)
to move the model and its inputs to the GPUafter the model instantiation (around line 37)
self.model = Owlv2ForObjectDetection.from_pretrained(
"google/owlv2-base-patch16-ensemble"
).to(DEVICE)
inputs in the predict method (around line 44)
inputs = self.processor(text=texts, images=image, return_tensors="pt").to(DEVICE)
i don't know if is the correct or the most elegant way but it works
The text was updated successfully, but these errors were encountered: