space-engineers-ai-spaceship-generator
space-engineers-ai-spaceship-generator copied to clipboard
Speeding up the process in lots of times
Issue type: feature request
Severity: medium
Describe the feature
So, it seems that you are using pytorch library for this project (based on a single viewed file, i am sorry if i am just dumb and didnt read something), which is fine. But, I have a question, why it doesnt use cuda? CPU is slow for such computation kind (lots of same easy computations), but a GPU is designed in my mind for such use cases.
Switching the device to cuda, can make a big (or significant) perfomance uplift. I was doing some stuff with pytorch (my projects were dumb tho) and trasnfering the model to another device is very easy, one method and one check:
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
model = torch.load("model name").to(DEVICE)
(google it or search in pytorch docs, i am not sure about the method name for transfering models in another device)
btw, it would be better if used libs (such as pytorch) was installed on a pc in a created venv (you can create venvs via scripts, i guess). this will allow to bring quick pop up on a start, with a question "Do you have an NVidia GPU?", if yes it will install pytorch with cuda support, else pytorch without cuda. (yes, i am aware pytorch is about 2 gigs, at least with cuda support)
PC:
- OS: Windows
- Browser: Chrome
- .exe file name: Spaceship.Generator.v1.0.3.exe
Additional context
how i came to such consern? my cuda is not used, when use stable diffusion or my own projects, they use cuda device
...also it would be useful to provide quick guide to know what gpu does user use, cuz sometimes i see people didnt knowing what gpu they are using.