Comments (5)
multi-GPU scenario
well do you have multiple gpu? can a specific gpu to the load the model to even be set anywhere?
from sygil-webui.
CUDA_VISIBLE_DEVICES=1 python .../webui.py will run the script on the second GPU and while nvidia-smi will correctly report 6061MiB / 12196MiB usage on that GPU, the memory monitor from the script will report: Peak memory usage: 19 MiB / 12195 MiB / 0.155% which is from the first GPU.
from sygil-webui.
i can add --gpu option to set the device index, i think you will still need to do the CUDA_VISIBLE_DEVICES=1 part though
from sygil-webui.
At the start of the script if you also did an os.environ["CUDA_VISIBLE_DEVICES"] = "{gpu}", then the CUDA_VISIBLE_DEVICES won't be needed.
This is tested and working (I just hardcoded the second GPU for the test):
-- stable-diffusion-webui/webui.py 2022-08-25 23:09:29.752912794 +0300
+++ stable-diffusion-webui/webui-gpu1.py 2022-08-26 19:38:20.803732102 +0300
@@ -1,4 +1,5 @@
import argparse, os, sys, glob
+os.environ["CUDA_VISIBLE_DEVICES"] = "1"
import gradio as gr
import k_diffusion as K
import math
@@ -177,7 +178,7 @@
def run(self):
print(f"[{self.name}] Recording max memory usage...\n")
pynvml.nvmlInit()
- handle = pynvml.nvmlDeviceGetHandleByIndex(0)
+ handle = pynvml.nvmlDeviceGetHandleByIndex(1)
self.total = pynvml.nvmlDeviceGetMemoryInfo(handle).total
while not self.stop_flag:
m = pynvml.nvmlDeviceGetMemoryInfo(handle)
from sygil-webui.
Hi, I'm having a similar issue. My first GPU numbered "0" acording to nvidia-smi doesn't get used when I launch webui.py, only the second one numbered "1" gets used which has half the vram of the first one and gives me green images unless I use --full precision and low resolution.
I'm completely noob in all of this, but how can I force it to use the GPU with the most vram?
Thanks in advance.
from sygil-webui.
Related Issues (20)
- [Bug]: docs mention .env_docker.example but it no longer exists in repo HOT 4
- [Bug]: anaconda3/miniconda3 not found HOT 1
- hlky/sd-webui docker is outdated HOT 20
- [Bug]: The process always kills itself when running webui.sh
- [Bug]: ModuleNotFoundError: No module named 'cv2' HOT 2
- [Bug]: TypeError: CacheDataAPI.__call__() got an unexpected keyword argument 'suppress_st_warning' HOT 5
- [Bug]: Settings broken without GPU
- [Bug]: ERROR: Command errored out with exit status 128: git clone -q https://github.com/hlky/facexlib /content/stable-diffusion/src/facexlib Check the logs for full command output.failed
- win11 install error No module named 'altair.vegalite.v4' HOT 1
- [Bug]: When i run webui.cmd HOT 3
- [Bug]: Outputs are only gray textured images when adding a textual inversion prompt HOT 3
- Are there plans to implement an API to call image generation from outside of the browser? HOT 2
- [Bug]: Dependencies in `requirements.txt` have module conflicts.
- [Bug]: Default install gives error of modules not found (validators.between and hydralit)
- [Bug]: All was well until it auto updated (cannot import name 'hc' from 'sd_utils') HOT 5
- [Bug]: Unable to pull down docker. HOT 4
- [Bug]: raise JSONDecodeError("Expecting value", s, err.value) from None
- [Bug]: Stable Diff - Jsonmerge not found HOT 1
- [Bug]: OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. HOT 1
- [Bug]: Unable to open WebUI on browser with Docker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sygil-webui.