From 60ed00432837bc393f205321750788f91f3aa4b0 Mon Sep 17 00:00:00 2001 From: Sean McLellan Date: Thu, 25 Aug 2022 23:31:08 -0400 Subject: [PATCH] Update readme, fix defaults for case-sensitive fs's --- README.md | 14 ++++++++++++-- scripts/dream.py | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 28063203c8..f3cf91877f 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ This script also provides the ability to invoke GFPGAN after image generation. D and optionally upscale the image to a higher resolution. To use the ability, clone the [GFPGAN repository](https://github.com/TencentARC/GFPGAN) and follow their -installation instructions. By default, we expect GFPGAN to be installed in a 'gfpgan' sibling directory. +installation instructions. By default, we expect GFPGAN to be installed in a 'GFPGAN' sibling directory. You may also want to install Real-ESRGAN, if you want to enhance non-face regions in the image by installing the pip Real-ESRGAN package. @@ -97,6 +97,15 @@ pip install realesrgan Now, you can run this script by adding the --gfpgan option. Any issues with GFPGAN will be reported on initialization. +~~~~ +(ldm) ~/stable-diffusion$ python3 ./scripts/dream.py +* Initializing, be patient... +(...more initialization messages...) +* --gfpgan was specified, loading gfpgan... +(...even more initialization messages...) +* Initialization done! Awaiting your command... +~~~~ + When generating prompts, add a -G or --gfpgan_strenth option to control the strength of the GFPGAN enhancement. 0.0 is no enhancement, 1.0 is maximum enhancement. @@ -115,7 +124,8 @@ That's it! There's also a bunch of options to control GFPGAN settings when starting the script for different configs that you can read about in the help text. This will let you control where GFPGAN is installed, if upsampling is enapled, the upsampler to use and the model path. -Note that loading GFPGAN consumes additional GPU memory, additionaly, a couple of seconds will be tacked on when generating your images. +Note that loading GFPGAN consumes additional GPU memory, but hey, 3090s with 24Gi of VRAM are cheap now *cough*. +Additionally, a couple of seconds will be tacked on when generating your images, but hey, it's worth it. ## Barebones Web Server diff --git a/scripts/dream.py b/scripts/dream.py index 66980bf1f1..0e888bf99c 100755 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -333,7 +333,7 @@ def create_argv_parser(): help="indicates the path to the GFPGAN model, relative to --gfpgan_dir. Only used if --gfpgan is specified") parser.add_argument("--gfpgan_dir", type=str, - default='../gfpgan', + default='../GFPGAN', help="indicates the directory containing the GFPGAN code. Only used if --gfpgan is specified") return parser