Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Help with Stable Diffusion on Gentoo

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
LeTesla
n00b
n00b
Posts: 3
Joined: Mon Aug 03, 2020 2:27 am

Help with Stable Diffusion on Gentoo

  • Quote

Post by LeTesla » Sat Apr 20, 2024 5:32 am

Currently I'm moving from Artix to Gentoo and one of the things that was pretty easy to setup compared to Gentoo was all the CUDA-related packages. Gentoo appears to not have the packages for the actual SDK of CUDA, or at least seemingly Gentoo did at some point given that I see some archives for a dev-util/nvidia-cuda-sdk package existing but it stopped after version 10, yet, there's still the dev-util/nvidia-cuda-toolkit package. However, installing this package does not seem to correct the error of Automatic1111 being unable to support my RTX 3050 because it can't find CUDA. So is there any way to go around this? I've heard about downloading the actual CUDA SDK, but the latest from Nvidia's website is version 12 and the package for the toolkit is version 12.4.1, and I am unsure of how to go about manually installing the SDK as well. If there is another method though, I'd be willing to do it as well.
Top
saturnalia0
Apprentice
Apprentice
Posts: 172
Joined: Thu Oct 13, 2016 3:09 am

  • Quote

Post by saturnalia0 » Mon Apr 22, 2024 4:33 pm

I have a GTX 1060, I only have nvidia-drivers which is needed regardless. Auto1111 works for me just by running the default webui.sh script. What error are you actually getting? How did you install Auto1111? Have you searched the issues on GitHub? PS: I'm using an old release, v1.5.1.
Top
LeTesla
n00b
n00b
Posts: 3
Joined: Mon Aug 03, 2020 2:27 am

  • Quote

Post by LeTesla » Mon Apr 22, 2024 7:39 pm

saturnalia0 wrote:I have a GTX 1060, I only have nvidia-drivers which is needed regardless. Auto1111 works for me just by running the default webui.sh script. What error are you actually getting? How did you install Auto1111? Have you searched the issues on GitHub? PS: I'm using an old release, v1.5.1.
A1111 is just installed by itself the usual way, though I had to skirt around venv because I was having issues with using venv, so my pip and my environment are not limited to venv. More specifically, I am using A1111-Forge, a fork of A1111, however I have attempted both and neither work. The error when I run webui.sh is:

Code: Select all

Traceback (most recent call last):
  File "/home/lkvass/RAID/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/lkvass/RAID/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/lkvass/RAID/stable-diffusion-webui/modules/launch_utils.py", line 386, 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
When I run it as ./webui.sh --skip-torch-cuda-test:

Code: Select all

Traceback (most recent call last):
  File "/home/lkvass/RAID/stable-diffusion-webui-forge/launch.py", line 51, in <module>
    main()
  File "/home/lkvass/RAID/stable-diffusion-webui-forge/launch.py", line 47, in main
    start()
  File "/home/lkvass/RAID/stable-diffusion-webui-forge/modules/launch_utils.py", line 541, in start
    import webui
  File "/home/lkvass/RAID/stable-diffusion-webui-forge/webui.py", line 17, in <module>
    initialize_forge()
  File "/home/lkvass/RAID/stable-diffusion-webui-forge/modules_forge/initialization.py", line 50, in initialize_forge
    import ldm_patched.modules.model_management as model_management
  File "/home/lkvass/RAID/stable-diffusion-webui-forge/ldm_patched/modules/model_management.py", line 122, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
                                  ^^^^^^^^^^^^^^^^^^
  File "/home/lkvass/RAID/stable-diffusion-webui-forge/ldm_patched/modules/model_management.py", line 91, in get_torch_device
    return torch.device(torch.cuda.current_device())
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/torch/cuda/__init__.py", line 787, in current_device
    _lazy_init()
  File "/usr/lib/python3.11/site-packages/torch/cuda/__init__.py", line 293, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Top
saturnalia0
Apprentice
Apprentice
Posts: 172
Joined: Thu Oct 13, 2016 3:09 am

  • Quote

Post by saturnalia0 » Mon Apr 22, 2024 11:10 pm

Well, has torch been installed with cuda? How did you install it, if not through the vanilla script in a venv? My environment looks like this:

Code: Select all

stable-diffusion-webui $ source ./venv/bin/activate  
(venv) stable-diffusion-webui $ python3
Python 3.11.8 (main, Mar 28 2024, 10:57:06) [GCC 13.2.1 20240210] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
Honestly I'd just wipe everything and try again with venv which is the default and try to resolve any issues that arise from that. Note that in webui-user.sh there is TORCH_COMMAND which you can use to customize how torch is installed.

See also: https://github.com/pytorch/pytorch/issues/30664 , https://github.com/pytorch/pytorch/issues/30664

Sorry if this doesn't help...
Top
Post Reply

4 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic