From 28c8dc4bcc5eedbc92e2add76291326a30c9df63 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 10 Sep 2022 22:45:12 +0530 Subject: [PATCH 1/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7449d8a6..f1f80c00 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,8 +19,9 @@ This is in-flux, but one way to get a development environment running for editin 4) Check you can view and generate images on `localhost:9000` 5) Close the server, and edit `/projects/stable-diffusion-ui-archive/scripts/on_env_start.sh` 6) Comment out the line near the bottom that copies the `files/ui` folder, e.g. `cp -Rf sd-ui-files/ui ui` for `.sh` or `@xcopy sd-ui-files\ui ui /s /i /Y` for `.bat` -7) Delete the current `ui` folder at `/projects/stable-diffusion-ui-archive/ui` -8) Now make a symlink between the repository clone (where you will be making changes) and this archive (where you will be running stable diffusion): +7) Comment out the line at the top of `/projects/stable-diffusion-ui-archive/scripts/on_sd_start.sh` that copies `on_env_start`. For e.g. `@copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y` +8) Delete the current `ui` folder at `/projects/stable-diffusion-ui-archive/ui` +9) Now make a symlink between the repository clone (where you will be making changes) and this archive (where you will be running stable diffusion): `ln -s /projects/stable-diffusion-ui-repo/ui /projects/stable-diffusion-ui-archive/ui` or for Windows `mklink /D \projects\stable-diffusion-ui-archive\ui \projects\stable-diffusion-ui-repo\ui` (link name first, source repo dir second) From a1e5a2cb67f25720930e991b977340495c6db8d9 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 10 Sep 2022 22:58:16 +0530 Subject: [PATCH 2/7] Update modifiers.json --- ui/modifiers.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/modifiers.json b/ui/modifiers.json index 9eb2e7f5..d1191cb5 100644 --- a/ui/modifiers.json +++ b/ui/modifiers.json @@ -191,6 +191,7 @@ "by Johannes Vermeer", "by John William Waterhouse", "by Katsushika Hokusai", + "by Kim Tschang Yeul", "by Ko Young Hoon", "by Leonardo da Vinci", "by Lisa Frank", @@ -212,6 +213,7 @@ "by Sam Does Arts", "by Sandro Botticelli", "by Ted Nasmith", + "by Ten Hundred", "by Thomas Kinkade", "by Tivadar Csontváry Kosztka", "by Victo Ngai", From 8d31c474df8edd3782db942db3640cd4bb3bcc2d Mon Sep 17 00:00:00 2001 From: youmslinky Date: Sat, 10 Sep 2022 15:39:38 -0500 Subject: [PATCH 3/7] Update CONTRIBUTING.md to instruct commenting out multiple lines Need to comment out most of the lines so the `ui` folder symlink doesn't get removed and the `.sh` and `.bat` file changes don't get rolled back on next startup. --- CONTRIBUTING.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1f80c00..64959f07 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,21 @@ This is in-flux, but one way to get a development environment running for editin 3) `cd /projects/stable-diffusion-ui-archive` and run the script to set up and start the project, e.g. `start.sh` 4) Check you can view and generate images on `localhost:9000` 5) Close the server, and edit `/projects/stable-diffusion-ui-archive/scripts/on_env_start.sh` -6) Comment out the line near the bottom that copies the `files/ui` folder, e.g. `cp -Rf sd-ui-files/ui ui` for `.sh` or `@xcopy sd-ui-files\ui ui /s /i /Y` for `.bat` +6) Comment out the lines near the bottom that copies the `files/ui` folder, e.g: + + for `.sh` +``` +# rm -rf ui +# cp -Rf sd-ui-files/ui . +# cp sd-ui-files/scripts/on_sd_start.sh scripts/ +# cp sd-ui-files/scripts/start.sh . +``` +for `.bat` +``` +REM @xcopy sd-ui-files\ui ui /s /i /Y +REM @copy sd-ui-files\scripts\on_sd_start.bat scripts\ /Y +REM @copy "sd-ui-files\scripts\Start Stable Diffusion UI.cmd" . /Y +``` 7) Comment out the line at the top of `/projects/stable-diffusion-ui-archive/scripts/on_sd_start.sh` that copies `on_env_start`. For e.g. `@copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y` 8) Delete the current `ui` folder at `/projects/stable-diffusion-ui-archive/ui` 9) Now make a symlink between the repository clone (where you will be making changes) and this archive (where you will be running stable diffusion): From d88e0f16ac506f404cbaf14ef6848663d8c1156e Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sun, 11 Sep 2022 10:34:04 +0530 Subject: [PATCH 4/7] Use CPU mode for graphics cards with less than 3 GB of RAM --- ui/sd_internal/runtime.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/sd_internal/runtime.py b/ui/sd_internal/runtime.py index f0ca6412..02094ae5 100644 --- a/ui/sd_internal/runtime.py +++ b/ui/sd_internal/runtime.py @@ -57,11 +57,19 @@ sampler_ddim = None has_valid_gpu = False force_full_precision = False try: - gpu_name = torch.cuda.get_device_name(torch.cuda.current_device()) - has_valid_gpu = True + gpu = torch.cuda.current_device() + gpu_name = torch.cuda.get_device_name(gpu) force_full_precision = ('nvidia' in gpu_name.lower()) and ('1660' in gpu_name or ' 1650' in gpu_name) # otherwise these NVIDIA cards create green images if force_full_precision: print('forcing full precision on NVIDIA 16xx cards, to avoid green images. GPU detected: ', gpu_name) + + mem_free, mem_total = torch.cuda.mem_get_info(gpu) + mem_total /= float(10**9) + if mem_total < 3.0: + print("GPUs with less than 3 GB of VRAM are not compatible with Stable Diffusion") + raise Exception() + + has_valid_gpu = True except: print('WARNING: No compatible GPU found. Using the CPU, but this will be very slow!') pass From 9fe1709bf7071d533a6bbf8223c0f3654299091d Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sun, 11 Sep 2022 11:16:05 +0530 Subject: [PATCH 5/7] Catch 16xx cards without the NVIDIA name in them --- ui/sd_internal/runtime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/sd_internal/runtime.py b/ui/sd_internal/runtime.py index 02094ae5..36550dbe 100644 --- a/ui/sd_internal/runtime.py +++ b/ui/sd_internal/runtime.py @@ -59,7 +59,7 @@ force_full_precision = False try: gpu = torch.cuda.current_device() gpu_name = torch.cuda.get_device_name(gpu) - force_full_precision = ('nvidia' in gpu_name.lower()) and ('1660' in gpu_name or ' 1650' in gpu_name) # otherwise these NVIDIA cards create green images + force_full_precision = ('nvidia' in gpu_name.lower() or 'geforce' in gpu_name.lower()) and (' 1660' in gpu_name or ' 1650' in gpu_name) # otherwise these NVIDIA cards create green images if force_full_precision: print('forcing full precision on NVIDIA 16xx cards, to avoid green images. GPU detected: ', gpu_name) From 7879bf19ebce3717323e927320cd45f6766b221d Mon Sep 17 00:00:00 2001 From: Manuel Warum Date: Sun, 11 Sep 2022 13:00:13 +0200 Subject: [PATCH 6/7] Update README.md Add note about Stable Diffusion model version --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dcee9b2a..8abbcf09 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ ️‍🔥🎉 **New!** Face Correction (GFPGAN) and Upscaling (RealESRGAN) have been added! +This distribution currently uses Stable Diffusion 1.4. Once the model for 1.5 becomes publicly available, the model in this distribution will be updated. + # Features in the new v2 Version: - **No Dependencies or Technical Knowledge Required**: 1-click install for Windows 10/11 and Linux. *No dependencies*, no need for WSL or Docker or Conda or technical setup. Just download and run! - **Face Correction (GFPGAN) and Upscaling (RealESRGAN)** From a294b128c701e42aeb4bc1ef78b75b2b88a4d478 Mon Sep 17 00:00:00 2001 From: Manuel Warum Date: Sun, 11 Sep 2022 13:04:45 +0200 Subject: [PATCH 7/7] Update README.md Some minor text adjustments --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8abbcf09..2fec319d 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ You do not need anything else. You do not need WSL, Docker or Conda. The install 1. **Download** [for Windows](https://github.com/cmdr2/stable-diffusion-ui/releases/download/v2.05/stable-diffusion-ui-win64.zip) or [for Linux](https://github.com/cmdr2/stable-diffusion-ui/releases/download/v2.05/stable-diffusion-ui-linux.tar.xz). 2. **Extract**: - - For Windows: After unzipping the file, please move the `stable-diffusion-ui` folder to your `C:` (or any drive like D: at the top root level). For e.g. `C:\stable-diffusion-ui`. This will avoid a common problem with Windows (of file path length limits). + - For Windows: After unzipping the file, please move the `stable-diffusion-ui` folder to your `C:` (or any drive like D:, at the top root level), e.g. `C:\stable-diffusion-ui`. This will avoid a common problem with Windows (file path length limits). - For Linux: After extracting the .tar.xz file, please open a terminal, and go to the `stable-diffusion-ui` directory. 3. **Run**: @@ -43,11 +43,11 @@ You do not need anything else. You do not need WSL, Docker or Conda. The install This will automatically install Stable Diffusion, set it up, and start the interface. No additional steps are needed. -**To Uninstall:** Just delete the `stable-diffusion-ui` folder, to uninstall all the downloaded packages. +**To Uninstall:** Just delete the `stable-diffusion-ui` folder to uninstall all the downloaded packages. # Usage -Open http://localhost:9000 in your browser (after running step 3 previously). +Open http://localhost:9000 in your browser (after running step 3 previously). It may take a few moments for the back-end to be ready. ## With a text description 1. Enter a text prompt, like `a photograph of an astronaut riding a horse` in the textbox. @@ -90,4 +90,4 @@ Also, please feel free to submit a pull request, if you have any code contributi # Disclaimer The authors of this project are not responsible for any content generated using this interface. -This license of this software forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, spread misinformation and target vulnerable groups. For the full list of restrictions please read [the license](LICENSE). +The license of this software forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, spread misinformation, or target vulnerable groups. For the full list of restrictions please read [the license](LICENSE). You agree to these terms by using this software.