sd-forge-layerdiffuse icon indicating copy to clipboard operation
sd-forge-layerdiffuse copied to clipboard

Command "set COMMANDLINE_ARGS="--device-id=1" does not work

Open naxo556x opened this issue 1 year ago • 0 comments

I have gpu 0 rtx 4090, the rest are 3090.

Launching Web UI with arguments: --device-id=1 Total VRAM 24564 MB, total RAM 130950 MB pytorch version: 2.1.2+cu121 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4090 : native

Despite the command, it still uses my GPU 0 - 4090. I want to run stable diffusion forge on my second GPU. How to achieve this? Automatic1111 I used previously did so.

I use \stable-diffusion-webui-forge run.bat windows batch file to run it. I edit \stable-diffusion-webui-forge\webui webui-user.bat to set which GPU to use.

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS="--device-id=1"

@REM Uncomment following code to reference an existing A1111 checkout.
@REM set A1111_HOME=Your A1111 checkout dir
@REM
@REM set VENV_DIR=%A1111_HOME%/venv
@REM set COMMANDLINE_ARGS=%COMMANDLINE_ARGS% ^
@REM  --ckpt-dir %A1111_HOME%/models/Stable-diffusion ^
@REM  --hypernetwork-dir %A1111_HOME%/models/hypernetworks ^
@REM  --embeddings-dir %A1111_HOME%/embeddings ^
@REM  --lora-dir %A1111_HOME%/models/Lora

call webui.bat

naxo556x avatar Aug 06 '24 14:08 naxo556x