From f5e489ba8792b12f5cfb1ddcfad2c1bba11d64c5 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Wed, 13 Sep 2023 13:39:34 +0200 Subject: [PATCH 1/2] Don't use rich During the first installation, rich is not yet installed --- scripts/check_modules.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index bfd568c8..2c53c4e6 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -16,9 +16,6 @@ import shutil from pathlib import Path from pprint import pprint -from rich.console import Console -from rich.panel import Panel - os_name = platform.system() modules_to_check = { @@ -217,16 +214,18 @@ def get_config(): def setup_amd_environment(): if not os.access("/dev/kfd", os.W_OK): - Console().print( - Panel( - "\n" - + "[black]EasyDiffusion has no write access to /dev/kfd.\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" - + f"Follow the instructions on this site to configure the access:\n" - + f"[bold yellow underline]https://github.com/easydiffusion/easydiffusion/wiki/AMD-on-Linux#access-permissions\n", - title="Missing write access to /dev/kfd", - style="white on red", - ) + print( + f"#########################################################################\n" + + f"# EasyDiffusion has no write access to /dev/kfd. #\n" + + f"#########################################################################\n" + + f"# #\n" + + f"# Without this, the ROCm driver will probably not be able to initialize #\n" + + f"# the GPU and EasyDiffusion will use the CPU for rendering. #\n" + + f"# #\n" + + f"# Follow the instructions on this site to configure the access: #\n" + + f"# https://github.com/easydiffusion/easydiffusion/wiki/AMD-on-Linux #\n", + + f"# #\n" + + f"#########################################################################\n" ) gpus = list(filter(lambda x: ("amdgpu" in x), open("/proc/bus/pci/devices", "r").readlines())) From 52761ad88c2797c0ba57c00520d8b2bb8e76d42b Mon Sep 17 00:00:00 2001 From: JeLuF Date: Wed, 13 Sep 2023 13:45:21 +0200 Subject: [PATCH 2/2] Update check_modules.py --- scripts/check_modules.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 2c53c4e6..13551b0a 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -215,17 +215,15 @@ def get_config(): def setup_amd_environment(): if not os.access("/dev/kfd", os.W_OK): print( - f"#########################################################################\n" - + f"# EasyDiffusion has no write access to /dev/kfd. #\n" - + f"#########################################################################\n" - + f"# #\n" - + f"# Without this, the ROCm driver will probably not be able to initialize #\n" - + f"# the GPU and EasyDiffusion will use the CPU for rendering. #\n" - + f"# #\n" - + f"# Follow the instructions on this site to configure the access: #\n" - + f"# https://github.com/easydiffusion/easydiffusion/wiki/AMD-on-Linux #\n", - + f"# #\n" - + f"#########################################################################\n" + "#########################################################################\n" + + "# EasyDiffusion has no write access to /dev/kfd. #\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" + + "\n" + + "Follow the instructions on this site to configure the access:\n" + + "https://github.com/easydiffusion/easydiffusion/wiki/AMD-on-Linux#access-permissions\n" + + "\n" ) gpus = list(filter(lambda x: ("amdgpu" in x), open("/proc/bus/pci/devices", "r").readlines()))