xinntao / ESRGAN

ECCV18 Workshops - Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution. The training codes are in BasicSR.
https://github.com/xinntao/BasicSR
Apache License 2.0
6.04k stars 1.07k forks source link

Inference ESRGAN with Multiple GPUs #119

Open maksimay opened 3 years ago

maksimay commented 3 years ago

Is there a way to run / infer ESRGAN using multiple GPUS for faster image processing?

I tried using:

model = arch.RRDBNet(3, 3, 64, 23, gc=32)
model.load_state_dict(torch.load(model_path), strict=True)
model.eval()
model= nn.DataParallel(model,device_ids = [0, 1])
model = model.to(device)

but somehow it only uses one of my Titans when running the test.py instead of both cards... I also get no errors printed when running this

Any suggestions on this?

Thx in advance