Closed ttyksi closed 10 months ago
It will automatically use gpu if available. Please verify your pytorch installation first.
Python 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
>>>
I installed Python 3.11.5 and pytorch 1.7.1, but the situation did not change. I don't know what it is, but I am sure it is due to an inherent problem in my environmentπ I am using drag and drop images into a bat with the description "transparent-background --source %1 --type white", is there a problem with this usage?
Can you check your terminal output?
β transparent-background -s images/test.jpg
Settings -> Mode=base, Device=cuda:0, Torchscript=disabled
test.jpg: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββ| 1/1 [00:02<00:00, 2.72s/it]
Done. Results are saved in /home/user/downloads
If Device=cuda:0
is shown, then it means GPU is used. If Device=cpu
is shown, then there is a problem with using GPU.
E:\edit>transparent-background --source E:\edit\00216-3043992728.png --type white Settings -> Mode=base, Device=cpu, Torchscript=disabled 00216-3043992728.png: 0%| | 0/1 [00:00<?, ?it/s]
I rechecked and it still seems to be processed in cpu.
Did you verify your pytorch installation with below script?
import torch
torch.cuda.is_available()
If the result is False
, then you need to check if your GPU driver is correctly installed, and PyTorch is correctly installed with GPU acceleration.
Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import torch torch.cuda.is_available() True
I ran the script and it seems to be true. I don't want to take up any more of your time, so I would like to reinstall the OS and rebuild the environment. Thanks for your help! And thanks for developing this great software! I will continue to use it.
Closing due to inactivity. Please open another issue if problem persists.
As the title says, is there an option somewhere to use gpu instead of cpu? I am using an RTX3070 and would be happy to see it run faster, am I missing something?