Skip to content

NixOS - Nvidia driver not found #1080

@Adamekka

Description

@Adamekka

Describe the problem
Fooocus cannot find Nvidia drivers installed on my system, I'm using NixOS unstable and my GPU is Nvidia GTX 1650
I have drivers them installed on my system
Here is part of my config that contains that they are installed:

    xserver = {
      enable = true;
      displayManager = {
        gdm = {
          enable = true;
          wayland = true;
        };
        sessionPackages = with pkgs; [
          hyprland
        ];
      };
      layout = "us";
      libinput.enable = true;
      videoDrivers = [ "nvidia" ];
    };

  hardware = {
    nvidia = {
      modesetting.enable = true;
      nvidiaSettings = true;
      open = false;
      package = config.boot.kernelPackages.nvidiaPackages.stable;
    };
    opengl = {
      driSupport = true;
      driSupport32Bit = true;
      enable = true;
    };
    pulseaudio.support32Bit = true;
  };

Full Console Log

[nix-shell:~/Coding/Fooocus]$ python entry_with_update.py
Update failed.
libz.so.1: cannot open shared object file: No such file or directory
Update succeeded.
[System ARGV] ['entry_with_update.py']
Python 3.11.6 (main, Oct  2 2023, 13:45:54) [GCC 12.3.0]
Fooocus version: 2.1.824
Running on local URL:  http://127.0.0.1:7865

To create a public link, set `share=True` in `launch()`.
Opening in existing browser session.
Exception in thread Thread-2 (worker):
Traceback (most recent call last):
  File "/run/current-system/sw/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/run/current-system/sw/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/home/adamekka/Coding/Fooocus/modules/async_worker.py", line 25, in worker
    import modules.default_pipeline as pipeline
  File "/home/adamekka/Coding/Fooocus/modules/default_pipeline.py", line 1, in <module>
    import modules.core as core
  File "/home/adamekka/Coding/Fooocus/modules/core.py", line 1, in <module>
    from modules.patch import patch_all
  File "/home/adamekka/Coding/Fooocus/modules/patch.py", line 6, in <module>
    import fcbh.model_base
  File "/home/adamekka/Coding/Fooocus/backend/headless/fcbh/model_base.py", line 2, in <module>
    from fcbh.ldm.modules.diffusionmodules.openaimodel import UNetModel
  File "/home/adamekka/Coding/Fooocus/backend/headless/fcbh/ldm/modules/diffusionmodules/openaimodel.py", line 16, in <module>
    from ..attention import SpatialTransformer
  File "/home/adamekka/Coding/Fooocus/backend/headless/fcbh/ldm/modules/attention.py", line 10, in <module>
    from .sub_quadratic_attention import efficient_dot_product_attention
  File "/home/adamekka/Coding/Fooocus/backend/headless/fcbh/ldm/modules/sub_quadratic_attention.py", line 27, in <module>
    from fcbh import model_management
  File "/home/adamekka/Coding/Fooocus/backend/headless/fcbh/model_management.py", line 114, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
                                  ^^^^^^^^^^^^^^^^^^
  File "/home/adamekka/Coding/Fooocus/backend/headless/fcbh/model_management.py", line 83, in get_torch_device
    return torch.device(torch.cuda.current_device())
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/adamekka/Coding/Fooocus/fooocus_env/lib/python3.11/site-packages/torch/cuda/__init__.py", line 769, in current_device
    _lazy_init()
  File "/home/adamekka/Coding/Fooocus/fooocus_env/lib/python3.11/site-packages/torch/cuda/__init__.py", line 298, 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
^CKeyboard interruption in main thread... closing server.
(fooocus_env)
[nix-shell:~/Coding/Fooocus]$

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions