Skip to content

How to use the second video card for training? #315

Answered by Lukium
NaughtDZ asked this question in Q&A
Discussion options

You must be logged in to vote

edit the webui-user.bat as follows:

after @echo off add:

set CUDA_DEVICE_ORDER=PCI_BUS_ID
set CUDA_VISIBLE_DEVICES=1

in COMMAND_LINE_ARGS= use --device-id 0

This will result in GPU 1 (your second GPU) being the only GPU seen by the UI, which means that it becomes --device-id 0 as far as it's concerned.

If you're on Linux, basically same thing just slightly different language (webui-user.sh):

export CUDA_DEVICE_ORDER=PCI_BUS_ID
export CUDA_VISIBLE_DEVICES=1

somewhere in the beginning I usually put it near the venv section

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@NaughtDZ
Comment options

Answer selected by NaughtDZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants