stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Minor fix
This PR tries to close https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/10331
Changing --extra-index-url
to --index-url
makes the install fail for the first time user when it tries to find packages required by torch and fails because we only have nvidia-torch url available.
As for the question mark in image names, I'd rather remove the question mark than downgrade gradio for it.
In the previous pr, there was an example where extra-index-url did not work but index-url worked. But this is just consistent with the official one.
Well, I tried --index-url
on an empty install and it failed for me.
Not sure what PyTorch does, both look like they only index pytorch.org
.
As for the question mark in image names, I'd rather remove the question mark than downgrade gradio for it.
I checked it and it has nothing to do with Gradio and WebUI, it's an environment related issue.
All right. There is a problem. Tests here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/6b51cc7530dd70037681c108a65c55d52ed918ef/.github/workflows/run_tests.yaml#LL26C11-L26C64 install CPU torch using the same command. So if the command is changed in the way this PR is suggesting, test will fail. We can edit edit tests to explicitly specify the command there, but then we'd have to keep torch version updated in two places: in launch and in tests. So the question is, is this fix really useful?
Changes from: torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118")
to
torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118")
It does not work? Still has problem of "RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.7 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install."
It does not work? Still has problem of "RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.7 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install."
Try using the --reinstall-torch
parameter, or remove venv.
It does not work? Still has problem of "RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.7 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install."
Try using the
--reinstall-torch
parameter, or remove venv.
I moved old venv to "venvback" , and re-run .webui.sh (with modified launch.py as above suggested) , it will re-install venv, just got same result of "RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.7 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install."
What are your startup parameters?
What are your startup parameters?
Launching Web UI with arguments: --xformers --share --enable-insecure-extension-access --listen
Try removing --xformers
and remove venv, does it work?
Try removing
--xformers
and remove venv, does it work?
Try removing
--xformers
and remove venv, does it work?
yeah, it can work . will it work for later launch adding --xformers back?
yeah, it can work . will it work for later launch adding --xformers back?
This is caused by the incompatibility of xformers with the current PyTorch.
To fix this, xformers needs to be upgraded to 0.0.20.dev539.
To fix this, xformers needs to be upgraded to 0.0.20.dev539.
I see, thanks lot for explains!
To fix this, xformers needs to be upgraded to 0.0.20.dev539.
I have xformers 0.0.17 as specified by repo and it works out of the box with no problems. Is this linux specific?
xformers did not update CI to PyTorch 2.0.1 until today. https://github.com/facebookresearch/xformers/commit/a721581f01812eae2f184238b072969b0e04110a
At present, only dev539 should be effective, not sure if they update the old version.
I noticed that Linux uses a different installation command, so the problem should only occur in Linux, and the solution is to modify the command. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/9a9557ecfc824c4a005dc79466dba8f5884dbfb1/launch.py#L285-L295
hi, I use the latest stable-diffusion-webui, and now I also encounter this error. how can i solve it
Whenever I encounter this error, I need to perform some steps to access the stable diffusion webui normally
- rm -rf venv/
- ./webui.sh I don't know what to do, please help me. Thanks @Sakura-Luna @AUTOMATIC1111
hi, I use the latest stable-diffusion-webui, and now I also encounter this error. how can i solve it
master
branch does not contain this fix, switch to dev
or rc branch.
I checked the launch.py under stable diffusion and found that the command you modified is normally in this file. Even then, switch to dev or rc branch?
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/96cba45d71cf25ab2f3bb7d7085347c8b6ef6d7d/launch.py#L296
You can clearly see that they are inconsistent, of course, you can also directly modify them to be the same, and then delete venv
.