Open Aleh2 opened 8 months ago
Attempted to install again (in a new/third directory) via the zip. Ran update.bat. Ran run.bat. Got roughly the same error message:
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: f0.0.17v1.8.0rc-latest-276-g29be1da7 Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7 Traceback (most recent call last): File "C:\SD\webui_forge_cu121_torch21\webui\launch.py", line 51, in
main() File "C:\SD\webui_forge_cu121_torch21\webui\launch.py", line 39, in main prepare_environment() File "C:\SD\webui_forge_cu121_torch21\webui\modules\launch_utils.py", line 431, in prepare_environment raise RuntimeError( RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
C:\SD\stable-diffusion-webui-forge\venv\Scripts\python.exe -m pip list
to check the torch version
when you scroll in the list you should have something like torch 2.1.2+cu121
torch is listed as 2.2.1+cu121 in said list.
that's strange.. you have cuda installed.. it should work
in lauch_utils there is this part:
if not args.skip_torch_cuda_test and not check_run_python("import torch; assert torch.cuda.is_available()"): raise RuntimeError( 'Torch is not able to use GPU; ' 'add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check' )
try to check yourself
C:\SD\stable-diffusion-webui-forge\venv\Scripts\python.exe import torch print(torch.cuda.is_available())
make sure no env is activated otherwise the python installation triggered will be the one of that env and not this one C:\SD\stable-diffusion-webui-forge\venv\Scripts\python.exe
an example: with env activated
(base) PS C:\Users\Charl\Desktop\python_charlie\A1111\webui_forge_cu121_torch21\system\python
without:
PS C:\Users\Charl\Desktop\python_charlie\A1111\webui_forge_cu121_torch21\system\python
just noticed our installations structures are different.. i used the one-click method.. is it possible that each method use a different struture ?? 🤔🤔
I tried the one-click method as well. Also seem to have found the issue.
PS C:\SD\stable-diffusion-webui-forge\venv\Scripts> python.exe Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import torch print(torch.cuda.is.available()) File "
", line 1 print(torch.cuda.is.available()) ^^ SyntaxError: invalid syntax print(torch.cuda.is_available()) C:\Users[me]\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\cuda__init__.py:141: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 11070). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:108.) return torch._C._cuda_getDeviceCount() > 0 False
I find it interesting that it's trying to call CUDA from my general environment rather than the local one, but this certainly explains why Forge won't load. Also shows me that I need to manually update my drivers ('cause my updating software clearly isn't doing it for me).
let's see if the update will solve it
by the way you can do venv\Scripts\activate
to activate this environment to check torch.cuda.is_available()
too
Just went to NVidia's site. Updated my drivers. It immediately started installing requirements... so it looks like it might have just been a driver issue manifesting in a weird way.
venv "C:\SD\stable-diffusion-webui-forge\venv\Scripts\Python.exe" Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] Version: f0.0.17v1.8.0rc-latest-276-g29be1da7 Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7 Installing clip Installing open_clip Cloning assets into C:\SD\stable-diffusion-webui-forge\repositories\stable-diffusion-webui-assets... Cloning into 'C:\SD\stable-diffusion-webui-forge\repositories\stable-diffusion-webui-assets'... remote: Enumerating objects: 20, done. remote: Counting objects: 100% (20/20), done. remote: Compressing objects: 100% (18/18), done. Receiving objects: 100% (20/20), 132.70 KiB | 1.52 MiB/s, done
Cloning Stable Diffusion into C:\SD\stable-diffusion-webui-forge\repositories\stable-diffusion-stability-ai... Cloning into 'C:\SD\stable-diffusion-webui-forge\repositories\stable-diffusion-stability-ai'... remote: Enumerating objects: 580, done. remote: Counting objects: 100% (357/357), done. remote: Compressing objects: 100% (128/128), done. Receiving objects: 32% (186/580), 50.45 MiB | 33.56 MiB/sremote: Total 580 (delta 260), reused 229 (delta 229), pack-reReceivin (580/580), 73.44 MiB | 33.57 MiB/s, done. Resolving deltas: 0% (0/279) Resolving deltas: 100% (279/279), done. Cloning Stable Diffusion XL into C:\SD\stable-diffusion-webui-forge\repositories\generative-models... Cloning into 'C:\SD\stable-diffusion-webui-forge\repositories\generative-models'... remote: Enumerating objects: 882, done. remote: Counting objects: 100% (511/511), done. remote: Compressing objects: 100% (234/234), done. remote: Total 882 (delta 382), reused 283 (delta 276), pack-reused 371 Receiving objects: 100% (882/882), 42.68 MiB | 25.35 MiB/s, done. Resolving deltas: 100% (459/459), done. Cloning K-diffusion into C:\SD\stable-diffusion-webui-forge\repositories\k-diffusion... Cloning into 'C:\SD\stable-diffusion-webui-forge\repositories\k-diffusion'... remote: Enumerating objects: 1340, done. remote: Counting objects: 100% (622/622), done. remote: Compressing objects: 100% (86/86), done. remote: Total 1340 (delta 576), reused 547 (delta 536), pack-reused 718 Receiving objects: 100% (1340/1340), 242.04 KiB | 3.36 MiB/s, done. Resolving deltas: 100% (939/939), done. Cloning BLIP into C:\SD\stable-diffusion-webui-forge\repositories\BLIP... Cloning into 'C:\SD\stable-diffusion-webui-forge\repositories\BLIP'... remote: Enumerating objects: 277, done. remote: Counting objects: 100% (165/165), done. remote: Compressing objects: 100% (30/30), done. remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112Receiving objects: 99% (275/277), 6.88 MiB | 13.4
Resolving deltas: 100% (152/152), done. Installing requirements Installing forge_legacy_preprocessor requirement: fvcore Installing forge_legacy_preprocessor requirement: mediapipe Installing forge_legacy_preprocessor requirement: onnxruntime Installing forge_legacy_preprocessor requirement: svglib Installing forge_legacy_preprocessor requirement: insightface Installing forge_legacy_preprocessor requirement: handrefinerportable Installing forge_legacy_preprocessor requirement: depth_anything Launching Web UI with arguments: Total VRAM 16384 MB, total RAM 32451 MB Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 3080 Ti Laptop GPU : native Hint: your device supports --pin-shared-memory for potential speed improvements. Hint: your device supports --cuda-malloc for potential speed improvements. Hint: your device supports --cuda-stream for potential speed improvements. VAE dtype: torch.bfloat16 CUDA Stream Activated: False Using pytorch cross attention Downloading: "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/realisticVisionV51_v51VAE.safetensors" to C:\SD\stable-diffusion-webui-forge\models\Stable-diffusion\realisticVisionV51_v51VAE.safetensors
100%|█████████████████████████████████████████████████████████████████████████████| 1.99G/1.99G [00:53<00:00, 39.6MB/s] ControlNet preprocessor location: C:\SD\stable-diffusion-webui-forge\models\ControlNetPreprocessor Calculating sha256 for C:\SD\stable-diffusion-webui-forge\models\Stable-diffusion\realisticVisionV51_v51VAE.safetensors: 2024-03-10 08:21:41,759 - ControlNet - INFO - ControlNet UI callback registered. Running on local URL: http://127.0.0.1:7860
To create a public link, set
share=True
inlaunch()
. Startup time: 353.9s (prepare environment: 282.2s, import torch: 7.0s, import gradio: 1.7s, setup paths: 2.4s, initialize shared: 0.4s, other imports: 2.4s, list SD models: 54.2s, load scripts: 2.4s, create ui: 0.6s, gradio launch: 0.3s). 15012c538f503ce2ebfc2c8547b268c75ccdaff7a281db55399940ff1d70e21d Loading weights [15012c538f] from C:\SD\stable-diffusion-webui-forge\models\Stable-diffusion\realisticVisionV51_v51VAE.safetensors model_type EPS UNet ADM Dimension 0 Using pytorch attention in VAE Working with z of shape (1, 4, 32, 32) = 4096 dimensions. Using pytorch attention in VAE extra {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'} To load target model SD1ClipModel Begin to load 1 model [Memory Management] Current Free GPU Memory (MB) = 15222.9990234375 [Memory Management] Model Memory (MB) = 454.2076225280762 [Memory Management] Minimal Inference Memory (MB) = 1024.0 [Memory Management] Estimated Remaining GPU Memory (MB) = 13744.791400909424 Moving model(s) has taken 0.30 seconds Model loaded in 7.3s (calculate hash: 3.6s, forge load real models: 3.1s, calculate empty prompt: 0.6s).
Wondering why RealisticVision, though. Moved my models back into place, and...
venv "C:\SD\stable-diffusion-webui-forge\venv\Scripts\Python.exe" Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] Version: f0.0.17v1.8.0rc-latest-276-g29be1da7 Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7 Launching Web UI with arguments: Total VRAM 16384 MB, total RAM 32451 MB Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 3080 Ti Laptop GPU : native Hint: your device supports --pin-shared-memory for potential speed improvements. Hint: your device supports --cuda-malloc for potential speed improvements. Hint: your device supports --cuda-stream for potential speed improvements. VAE dtype: torch.bfloat16 CUDA Stream Activated: False Using pytorch cross attention ControlNet preprocessor location: C:\SD\stable-diffusion-webui-forge\models\ControlNetPreprocessor Calculating sha256 for C:\SD\stable-diffusion-webui-forge\models\Stable-diffusion\albedobaseXL_v13.safetensors: 2024-03-10 08:26:07,106 - ControlNet - INFO - ControlNet UI callback registered. Running on local URL: http://127.0.0.1:7860
To create a public link, set
share=True
inlaunch()
. Startup time: 14.9s (prepare environment: 4.3s, import torch: 4.2s, import gradio: 0.8s, setup paths: 0.8s, initialize shared: 0.1s, other imports: 0.6s, list SD models: 2.0s, load scripts: 1.4s, create ui: 0.5s, gradio launch: 0.2s).
So, yeah. Looks like it was (mostly) just a driver issue. Odd.
ah great.. yeah it download RVision during first installation.. just take time for nothing 😵
Checklist
What happened?
I tried to install WebUI-Forge (intending to create a dual set-up with main WebUI for 1.5 models and WebUI-Forge for XL). To this end, I cloned the repo into a new directory and moved all of my XL checkpoints (and the XL VAE) into the relevant folders. Then I ran webui-user,bat.
I got... well:
Attempting to run webui-user.bat again yields the following:
Adding --skip-torch-cuda-test to the commandline args simply results in the file hanging. Attempting to manually set the GPU via device id does nothing to help. Attempting to reinstall Webui-Forge does nothing to help.
I am genuinely puzzled as to what's going on. Again, this is the same system I have main Webui on, and it runs perfectly well.
Steps to reproduce the problem
Clone the repo onto my system.
Run Webui-user.bat.
What should have happened?
Webui-Forge should have run.
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
Attempting to use the --dump-sysinfo commandline argument produces the following:
Console logs
Additional information
No response