FastSAM icon indicating copy to clipboard operation
FastSAM copied to clipboard

Probleming with GPU setting

Open lovelylightningbug opened this issue 2 years ago • 3 comments
trafficstars

Can only run inference code on Cuda:0, cannot set the device to other gpus via the "device" parameter. My code is as follows:

results = model(input,
                device="cuda:1",
                retina_masks=True,
                iou=iou_threshold,
                conf=conf_threshold,
                imgsz=input_size,)

lovelylightningbug avatar Aug 15 '23 18:08 lovelylightningbug

Hi, you can set 'device="1",' or 'device="0,1,2,3",'

berry-ding avatar Aug 16 '23 03:08 berry-ding

Yeah, it works! Thank you!

lovelylightningbug avatar Aug 16 '23 23:08 lovelylightningbug

I'm having the same problem, and the solution exposed here doesn't work for me. How should I specify the device?

ivanprado avatar Mar 22 '24 16:03 ivanprado