candle
candle copied to clipboard
How to select which GPU to use
We are working with the stable diffusion example. How do we select which GPU device on our system to use for the rendering? thanks.
When you create the cuda device, you could should be able to choose the device id to use, e.g. Device::new_cuda(0)?.
Lookup CUDA_VISIBLE_DEVICES environment variable on how to restrict devices visible to your cuda code. Should not require any code changes.
thanks. environment var works.