lspci detects VGA for main/integrated videocards and Display
for external videocards.
This commit should apply workarounds on computers with more than
one GPU. Useful for most laptops using weak iGPU and good dGPU.
Signed-off-by: Pablo Cholaky <waltercool@slash.cl>
- /usr/sbin (where ldconfig is usually located) is not typically on users' PATHs by default, so we set that variable before trying to run ldconfig.
- The libtcmalloc library is called libtcmalloc_minimal on Debian/Ubuntu systems. We now check whether libtcmalloc_minimal exists when running prepare_tcmalloc.
When the user's home directory and username are inconsistent, an error message stating that the directory cannot be found will appear. Directly default the installation directory to the user's home directory
Installation should not be assumed to be located within ~/home directory. User should be expected to install project anywhere and run the startup scripts while in stable-diffusion-webui directory.
See issue #8534
Installation should not be assumed to be located within ~/home directory. User should be expected to install project anywhere and run the startup scripts while in stable-diffusion-webui directory.
See issue #8534
This may be helpful for
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7028,
because we won't change working directory to the repo now, instead,
we will use any working directory. If we set working directory to
a path contains repo and the custom --data-dir, the problem in this
issue should be solved.
Howewer, this may be treated as an incompatible change if some code
assume the working directory is always the repo.
Also, there may be another solution that always let --data-dir be the
subdirectory of the repo, but personally I think this may not be what
we actually need.
As this issue mainly influent on Docker and I am not familiar with
.bat files, updating webui.bat is skipped.
webui.sh: source env from repo instead $PWD
This adds the GFX version 9.0.0 in order to use Renoir GPUs with at least 4 GB of VRAM (it's possible to increase the virtual VRAM from the BIOS settings of some vendors). This will only work if the remaining ram is at least 12 GB to avoid the system to become unresponsive on launch.).
This change also changes the GPU check to a case statement to be able to add more GPUs efficiently.
The problem: Some Linux distrubutions, like NixOS, use a
non-standard filesystem. This causes the bash program to not
be at /bin/bash (though /usr/bin/env is always there).
Even though -f enables running webui.sh as root, the -f flag will also be passed to launch.py, causing it to exit with a usage message. This adds a line to launch.py to remove the -f flag if present.
In addition to the above, all the letters in the command line arguments after each '-' were being processed for 'f' and "illegal option" was displayed for each letter that didn't match. Instead, this commit silences those errors and stops processing if the first flag doesn't start with '-f'.