From 8d2afefe6a8c08c27d9b6a90ff8355a9ad7cb833 Mon Sep 17 00:00:00 2001 From: Dominic Letz Date: Thu, 15 Sep 2022 15:43:33 +0200 Subject: [PATCH] fixup --- ldm/generate.py | 2 +- scripts/dream.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ldm/generate.py b/ldm/generate.py index 1919dca732..877c42fbc8 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -632,7 +632,7 @@ class Generate: elif direction == 'right': image = image.transpose(Image.Transpose.ROTATE_90) - pixels = image.height//2 if pixels == None else int(pixels) + pixels = image.height//2 if pixels is None else int(pixels) assert 0 < pixels < image.height, 'Direction (-D) pixels length must be in the range 0 - image.size' # the top part of the image is taken from the source image mirrored diff --git a/scripts/dream.py b/scripts/dream.py index bcca04225f..64e971fce0 100755 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -204,7 +204,8 @@ def main_loop(gen, outdir, prompt_as_dir, parser, infile): opt.seed = None continue - opt.strength = 0.83 if opt.out_direction and opt.strength is None else opt.strength + if opt.strength is None: + opt.strength = 0.75 if opt.out_direction is None else 0.75 if opt.with_variations is not None: # shotgun parsing, woo @@ -621,7 +622,6 @@ def create_cmd_parser(): parser.add_argument( '-f', '--strength', - default=0.75, type=float, help='Strength for noising/unnoising. 0.0 preserves image exactly, 1.0 replaces it completely', )