From 8660a79ccd7255d291be4741f647d12170110999 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 13 Mar 2024 18:44:17 +0530 Subject: [PATCH 1/8] v3.0.8 - update diffusers to v0.26.3 --- CHANGES.md | 1 + scripts/check_modules.py | 2 +- ui/index.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 389ea7b7..7b649b11 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ - **Major rewrite of the code** - We've switched to using diffusers under-the-hood, which allows us to release new features faster, and focus on making the UI and installer even easier to use. ### Detailed changelog +* 3.0.8 - 13 Mar 2024 - Update diffusers version to v0.26.3. * 3.0.7 - 11 Dec 2023 - Setting to enable/disable VAE tiling (in the Image Settings panel). Sometimes VAE tiling reduces the quality of the image, so this setting will help control that. * 3.0.6 - 18 Sep 2023 - Add thumbnails to embeddings from the UI, using the new `Upload Thumbnail` button in the Embeddings popup. Thanks @JeLuf. * 3.0.6 - 15 Sep 2023 - Fix broken embeddings dialog when LoRA information couldn't be fetched. diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 4509dfad..a6f9eb24 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -21,7 +21,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"), - "sdkit": "2.0.15", + "sdkit": "2.0.16", "stable-diffusion-sdkit": "2.1.5", "rich": "12.6.0", "uvicorn": "0.19.0", diff --git a/ui/index.html b/ui/index.html index 7abfa70c..77113985 100644 --- a/ui/index.html +++ b/ui/index.html @@ -35,7 +35,7 @@

Easy Diffusion - v3.0.7 + v3.0.8

From 47432fe54ef17bced0fc384d09d38e3ece4da324 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 13 Mar 2024 19:01:09 +0530 Subject: [PATCH 2/8] diffusers 0.26.3 --- scripts/check_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index a6f9eb24..336cf16b 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -21,7 +21,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"), - "sdkit": "2.0.16", + "sdkit": "2.0.17", "stable-diffusion-sdkit": "2.1.5", "rich": "12.6.0", "uvicorn": "0.19.0", From 5924d017896ebfd1b60698135bc798f5a669d254 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 13 Mar 2024 19:05:55 +0530 Subject: [PATCH 3/8] Temporarily revert to sdkit 2.0.15 --- scripts/check_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 336cf16b..4509dfad 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -21,7 +21,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"), - "sdkit": "2.0.17", + "sdkit": "2.0.15", "stable-diffusion-sdkit": "2.1.5", "rich": "12.6.0", "uvicorn": "0.19.0", From d1bd9e2a16c021aede7ad6f18db7694d94f56dac Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 13 Mar 2024 19:53:14 +0530 Subject: [PATCH 4/8] Prev version --- CHANGES.md | 1 - ui/index.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7b649b11..389ea7b7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,7 +17,6 @@ - **Major rewrite of the code** - We've switched to using diffusers under-the-hood, which allows us to release new features faster, and focus on making the UI and installer even easier to use. ### Detailed changelog -* 3.0.8 - 13 Mar 2024 - Update diffusers version to v0.26.3. * 3.0.7 - 11 Dec 2023 - Setting to enable/disable VAE tiling (in the Image Settings panel). Sometimes VAE tiling reduces the quality of the image, so this setting will help control that. * 3.0.6 - 18 Sep 2023 - Add thumbnails to embeddings from the UI, using the new `Upload Thumbnail` button in the Embeddings popup. Thanks @JeLuf. * 3.0.6 - 15 Sep 2023 - Fix broken embeddings dialog when LoRA information couldn't be fetched. diff --git a/ui/index.html b/ui/index.html index 77113985..7abfa70c 100644 --- a/ui/index.html +++ b/ui/index.html @@ -35,7 +35,7 @@

Easy Diffusion - v3.0.8 + v3.0.7

From e5519cda37ad6a3fc0f70b843c040758f7184eb7 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 19 Mar 2024 19:12:00 +0530 Subject: [PATCH 5/8] sdkit 2.0.18 (diffusers 0.26.3) --- scripts/check_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 4509dfad..810b59af 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -21,7 +21,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"), - "sdkit": "2.0.15", + "sdkit": "2.0.18", "stable-diffusion-sdkit": "2.1.5", "rich": "12.6.0", "uvicorn": "0.19.0", From a5b9eefcf979209f4ffcb67bdef0b28e92010f62 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 13 Mar 2024 18:44:17 +0530 Subject: [PATCH 6/8] v3.0.8 - update diffusers to v0.26.3 --- CHANGES.md | 1 + scripts/check_modules.py | 72 ++++++++++++++++++++++------------------ ui/index.html | 2 +- 3 files changed, 42 insertions(+), 33 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 389ea7b7..7b649b11 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ - **Major rewrite of the code** - We've switched to using diffusers under-the-hood, which allows us to release new features faster, and focus on making the UI and installer even easier to use. ### Detailed changelog +* 3.0.8 - 13 Mar 2024 - Update diffusers version to v0.26.3. * 3.0.7 - 11 Dec 2023 - Setting to enable/disable VAE tiling (in the Image Settings panel). Sometimes VAE tiling reduces the quality of the image, so this setting will help control that. * 3.0.6 - 18 Sep 2023 - Add thumbnails to embeddings from the UI, using the new `Upload Thumbnail` button in the Embeddings popup. Thanks @JeLuf. * 3.0.6 - 15 Sep 2023 - Fix broken embeddings dialog when LoRA information couldn't be fetched. diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 810b59af..26e40210 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -110,8 +110,9 @@ def update_modules(): fail(module_name) else: if version(module_name) != latest_version: - print(f"WARNING! Tried to install {module_name}=={latest_version}, but the version is still {version(module_name)}!") - + print( + f"WARNING! Tried to install {module_name}=={latest_version}, but the version is still {version(module_name)}!" + ) if module_name in modules_to_log: print(f"{module_name}: {version(module_name)}") @@ -177,8 +178,10 @@ Thanks!""" ) exit(1) + ### Launcher + def get_config(): config_directory = os.path.dirname(__file__) # this will be "scripts" config_yaml = os.path.join(config_directory, "..", "config.yaml") @@ -193,15 +196,17 @@ def get_config(): if os.path.isfile(config_yaml): from ruamel.yaml import YAML - yaml = YAML(typ='safe') - with open(config_yaml, 'r') as configfile: + + yaml = YAML(typ="safe") + with open(config_yaml, "r") as configfile: try: config = yaml.load(configfile) except Exception as e: print(e, file=sys.stderr) elif os.path.isfile(config_json): import json - with open(config_json, 'r') as configfile: + + with open(config_json, "r") as configfile: try: config = json.load(configfile) except Exception as e: @@ -215,43 +220,43 @@ def get_config(): def setup_amd_environment(): if not os.access("/dev/kfd", os.W_OK): print( - "#########################################################################\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" + "#########################################################################\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())) - gpus = [ x.split("\t")[1].upper() for x in gpus ] - gpus = [ AMD_PCI_IDs[x] for x in gpus if x in AMD_PCI_IDs ] - i=0 - supported_gpus=[] + gpus = [x.split("\t")[1].upper() for x in gpus] + gpus = [AMD_PCI_IDs[x] for x in gpus if x in AMD_PCI_IDs] + i = 0 + supported_gpus = [] for gpu in gpus: print(f"Found AMD GPU {gpu}.") if gpu.startswith("Navi 1"): print("--- Applying Navi 1 settings") - os.environ["HSA_OVERRIDE_GFX_VERSION"]="10.3.0" - os.environ["FORCE_FULL_PRECISION"]="yes" - os.environ["HIP_VISIBLE_DEVICES"]=str(i) + os.environ["HSA_OVERRIDE_GFX_VERSION"] = "10.3.0" + os.environ["FORCE_FULL_PRECISION"] = "yes" + os.environ["HIP_VISIBLE_DEVICES"] = str(i) supported_gpus.append("Navi 1") - elif gpu.startswith("Navi 2"): + elif gpu.startswith("Navi 2"): print("--- Applying Navi 2 settings") - os.environ["HSA_OVERRIDE_GFX_VERSION"]="10.3.0" - os.environ["HIP_VISIBLE_DEVICES"]=str(i) + os.environ["HSA_OVERRIDE_GFX_VERSION"] = "10.3.0" + os.environ["HIP_VISIBLE_DEVICES"] = str(i) supported_gpus.append("Navi 2") elif gpu.startswith("Navi 3"): print("--- Applying Navi 3 settings") - os.environ["HSA_OVERRIDE_GFX_VERSION"]="11.0.0" - os.environ["HIP_VISIBLE_DEVICES"]=str(i) + os.environ["HSA_OVERRIDE_GFX_VERSION"] = "11.0.0" + os.environ["HIP_VISIBLE_DEVICES"] = str(i) supported_gpus.append("Navi 3") else: print("--- This GPU is probably not supported by ROCm\n") - i+=1 + i += 1 return supported_gpus @@ -260,7 +265,7 @@ def launch_uvicorn(): pprint(config) - with open("scripts/install_status.txt","a") as f: + with open("scripts/install_status.txt", "a") as f: f.write("sd_weights_downloaded\n") f.write("sd_install_complete\n") @@ -268,9 +273,9 @@ def launch_uvicorn(): os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" if os_name == "Windows": - os.environ["PYTHONPATH"] = str(Path( os.environ["INSTALL_ENV_DIR"], "lib", "site-packages")) + os.environ["PYTHONPATH"] = str(Path(os.environ["INSTALL_ENV_DIR"], "lib", "site-packages")) else: - os.environ["PYTHONPATH"] = str(Path( os.environ["INSTALL_ENV_DIR"], "lib", "python3.8", "site-packages")) + os.environ["PYTHONPATH"] = str(Path(os.environ["INSTALL_ENV_DIR"], "lib", "python3.8", "site-packages")) os.environ["SD_UI_PATH"] = str(Path(Path.cwd(), "ui")) print(f"PYTHONPATH={os.environ['PYTHONPATH']}") @@ -297,7 +302,10 @@ def launch_uvicorn(): setup_amd_environment() print("\nLaunching uvicorn\n") - os.system(f'python -m uvicorn main:server_api --app-dir "{os.environ["SD_UI_PATH"]}" --port {listen_port} --host {bind_ip} --log-level error') + os.system( + f'python -m uvicorn main:server_api --app-dir "{os.environ["SD_UI_PATH"]}" --port {listen_port} --host {bind_ip} --log-level error' + ) + ### Start @@ -1102,5 +1110,5 @@ AMD_PCI_IDs = { update_modules() -if len(sys.argv) > 1 and sys.argv[1]=="--launch-uvicorn": +if len(sys.argv) > 1 and sys.argv[1] == "--launch-uvicorn": launch_uvicorn() diff --git a/ui/index.html b/ui/index.html index 7abfa70c..77113985 100644 --- a/ui/index.html +++ b/ui/index.html @@ -35,7 +35,7 @@

Easy Diffusion - v3.0.7 + v3.0.8

From 17ef1e04f79ae1fdaf646a2162649090641b79e4 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 19 Mar 2024 20:06:49 +0530 Subject: [PATCH 7/8] Roll back sdkit 2.0.18 (again) --- CHANGES.md | 1 - scripts/check_modules.py | 2 +- ui/index.html | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7b649b11..389ea7b7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,7 +17,6 @@ - **Major rewrite of the code** - We've switched to using diffusers under-the-hood, which allows us to release new features faster, and focus on making the UI and installer even easier to use. ### Detailed changelog -* 3.0.8 - 13 Mar 2024 - Update diffusers version to v0.26.3. * 3.0.7 - 11 Dec 2023 - Setting to enable/disable VAE tiling (in the Image Settings panel). Sometimes VAE tiling reduces the quality of the image, so this setting will help control that. * 3.0.6 - 18 Sep 2023 - Add thumbnails to embeddings from the UI, using the new `Upload Thumbnail` button in the Embeddings popup. Thanks @JeLuf. * 3.0.6 - 15 Sep 2023 - Fix broken embeddings dialog when LoRA information couldn't be fetched. diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 26e40210..480d4e62 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -21,7 +21,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"), - "sdkit": "2.0.18", + "sdkit": "2.0.15", "stable-diffusion-sdkit": "2.1.5", "rich": "12.6.0", "uvicorn": "0.19.0", diff --git a/ui/index.html b/ui/index.html index 77113985..7abfa70c 100644 --- a/ui/index.html +++ b/ui/index.html @@ -35,7 +35,7 @@

Easy Diffusion - v3.0.8 + v3.0.7

From fb749dbe24a67958d15cdd385c013749e226e62c Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 27 May 2024 10:37:09 +0530 Subject: [PATCH 8/8] Potential hotfix for #1781 - pin setuptools to a specific version, until clip is upgraded --- scripts/check_modules.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check_modules.py b/scripts/check_modules.py index 480d4e62..d90026b4 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -21,6 +21,7 @@ os_name = platform.system() modules_to_check = { "torch": ("1.11.0", "1.13.1", "2.0.0", "2.0.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1", "0.15.2"), + "setuptools": "69.5.1", "sdkit": "2.0.15", "stable-diffusion-sdkit": "2.1.5", "rich": "12.6.0",