mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-22 08:13:22 +01:00
commit
d12877987f
@ -16,9 +16,6 @@ import shutil
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
from rich.console import Console
|
|
||||||
from rich.panel import Panel
|
|
||||||
|
|
||||||
os_name = platform.system()
|
os_name = platform.system()
|
||||||
|
|
||||||
modules_to_check = {
|
modules_to_check = {
|
||||||
@ -217,16 +214,16 @@ def get_config():
|
|||||||
|
|
||||||
def setup_amd_environment():
|
def setup_amd_environment():
|
||||||
if not os.access("/dev/kfd", os.W_OK):
|
if not os.access("/dev/kfd", os.W_OK):
|
||||||
Console().print(
|
print(
|
||||||
Panel(
|
"#########################################################################\n"
|
||||||
"\n"
|
+ "# EasyDiffusion has no write access to /dev/kfd. #\n"
|
||||||
+ "[black]EasyDiffusion has no write access to /dev/kfd.\n\n"
|
+ "#########################################################################\n"
|
||||||
|
+ "\n"
|
||||||
+ "Without this, the ROCm driver will probably not be able to initialize the GPU and EasyDiffusion will use the CPU for rendering.\n"
|
+ "Without this, the ROCm driver will probably not be able to initialize the GPU and EasyDiffusion will use the CPU for rendering.\n"
|
||||||
+ f"Follow the instructions on this site to configure the access:\n"
|
+ "\n"
|
||||||
+ f"[bold yellow underline]https://github.com/easydiffusion/easydiffusion/wiki/AMD-on-Linux#access-permissions\n",
|
+ "Follow the instructions on this site to configure the access:\n"
|
||||||
title="Missing write access to /dev/kfd",
|
+ "https://github.com/easydiffusion/easydiffusion/wiki/AMD-on-Linux#access-permissions\n"
|
||||||
style="white on red",
|
+ "\n"
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
gpus = list(filter(lambda x: ("amdgpu" in x), open("/proc/bus/pci/devices", "r").readlines()))
|
gpus = list(filter(lambda x: ("amdgpu" in x), open("/proc/bus/pci/devices", "r").readlines()))
|
||||||
|
Loading…
Reference in New Issue
Block a user