lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
41.51k stars 5.9k forks source link

[Bug]: Colab: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx #2674

Closed DavidHF closed 7 months ago

DavidHF commented 7 months ago

Checklist

What happened?

Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

Steps to reproduce the problem

30 minutes ago (and during the last few days) I had no problems starting and running lllyasviel/Fooocus.git. But 30 minutes ago when restarting I got this: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

During the last 30 minutes I haven't installed another graphics card. I have an Nvidia 1070 TI installed and driver is latest version. but the problem might be because I am also using the onboard Intel Graphics card. My guess is you don't really check for confusion with multiple graphics adapters. Probably detecting the wrong driver as enum can be random.

I should NOT get an error message like this.

The log also has this: fatal: destination path 'Fooocus' already exists and is not an empty directory.

Message is persistant. Reboot makes no difference.

What should have happened?

should never have gotten that error message as I have a fully functional GTX 1070 TI onboard.

What browsers do you use to access Fooocus?

Google Chrome

Where are you running Fooocus?

Cloud (Google Colab)

What operating system are you using?

Windows 11

Console logs

Requirement already satisfied: pygit2==1.12.2 in /usr/local/lib/python3.10/dist-packages (1.12.2)
Requirement already satisfied: cffi>=1.9.1 in /usr/local/lib/python3.10/dist-packages (from pygit2==1.12.2) (1.16.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.9.1->pygit2==1.12.2) (2.21)
/content
fatal: destination path 'Fooocus' already exists and is not an empty directory.
/content/Fooocus
Already up-to-date
Update succeeded.
[System ARGV] ['entry_with_update.py', '--share', '--always-high-vram']
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Fooocus version: 2.3.1
[Cleanup] Attempting to delete content of temp dir /tmp/fooocus
[Cleanup] Cleanup successful
Traceback (most recent call last):
  File "/content/Fooocus/entry_with_update.py", line 46, in <module>
    from launch import *
  File "/content/Fooocus/launch.py", line 136, in <module>
    from webui import *
  File "/content/Fooocus/webui.py", line 10, in <module>
    import modules.async_worker as worker
  File "/content/Fooocus/modules/async_worker.py", line 3, in <module>
    from modules.patch import PatchSettings, patch_settings, patch_all
  File "/content/Fooocus/modules/patch.py", line 5, in <module>
    import ldm_patched.modules.model_base
  File "/content/Fooocus/ldm_patched/modules/model_base.py", line 2, in <module>
    from ldm_patched.ldm.modules.diffusionmodules.openaimodel import UNetModel, Timestep
  File "/content/Fooocus/ldm_patched/ldm/modules/diffusionmodules/openaimodel.py", line 15, in <module>
    from ..attention import SpatialTransformer, SpatialVideoTransformer, default
  File "/content/Fooocus/ldm_patched/ldm/modules/attention.py", line 9, in <module>
    from .sub_quadratic_attention import efficient_dot_product_attention
  File "/content/Fooocus/ldm_patched/ldm/modules/sub_quadratic_attention.py", line 27, in <module>
    from ldm_patched.modules import model_management
  File "/content/Fooocus/ldm_patched/modules/model_management.py", line 121, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "/content/Fooocus/ldm_patched/modules/model_management.py", line 90, in get_torch_device
    return torch.device(torch.cuda.current_device())
  File "/usr/local/lib/python3.10/dist-packages/torch/cuda/__init__.py", line 787, in current_device
    _lazy_init()
  File "/usr/local/lib/python3.10/dist-packages/torch/cuda/__init__.py", line 302, in _lazy_init
    torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

Additional information

Driver updated 2 days ago and checked again right now. It IS latest possible version. Studio as well as Game Ready.

Github Nvidia

mashb1t commented 7 months ago

Please do not confuse local setup (1070) with Cloud (Colab), when using Colab your local GPU isn't used at all, you're only using the browser as an interface. This could also be done with your smartphone.

The issue in Colab for destination path is no issue, this just indicates that Fooocus already has been downloaded to the cloud instance.

Solution: Use a T4 instance or better in the cloud, in general one offering a GPU, as i assume you've either run out of free Colab minutes or switched by accident to a TPU/CPU instance.

DavidHF commented 7 months ago

I know. I specifically ask it NOT to use local GPU. Already running T4 and nowhere near 2000 minutes. Which makes the error message totally miss the target.

RobertoMalatesta commented 6 months ago

It would be interesting to fire it up on colab without using the GPU. For quick benchmark testings. Currently it is not possible because the first unit gives error. I just skimmed through the code and I think it is a rather easy fix it but no time.
Can someone more advanced in the code point at the things to change? Ty R