tsurumeso / waifu2x-chainer

Chainer implementation of waifu2x
MIT License
165 stars 54 forks source link

How can it run on GPU? #9

Closed Jiajia0319 closed 5 years ago

Jiajia0319 commented 5 years ago

When I use the pretrained model, the result is really good. But it costs 45 min to make a image (3450x2230) to 2x. So should I try it with GPU? Because it runs on CPU default. Thanks a lot!

tsurumeso commented 5 years ago

You can use GPU specifying a GPU ID with --gpu or -g option. Sorry for not explaining enough on README.

# Run on CPU
python waifu2x.py -m scale -i path/to/image/or/directory -a 0

# Run on GPU
python waifu2x.py -m scale -i path/to/image/or/directory -a 0 -g 0
Jiajia0319 commented 5 years ago

You can use GPU specifying a GPU ID with --gpu or -g option. Sorry for not explaining enough on README.

# Run on CPU
python waifu2x.py -m scale -i path/to/image/or/directory -a 0

# Run on GPU
python waifu2x.py -m scale -i path/to/image/or/directory -a 0 -g 0

Thanks a lot! I have resolved that.