diff --git a/VARIATIONS.md b/VARIATIONS.md index 16af337a8b..cb42ddfd0e 100644 --- a/VARIATIONS.md +++ b/VARIATIONS.md @@ -48,12 +48,12 @@ variation. dream> "prompt" -n6 -S3357757885 -v0.2 ... Outputs: -./outputs/Xena/000002.784039624.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 784039624,0.2 -S3357757885 -./outputs/Xena/000002.3647897225.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.2 -S3357757885 -./outputs/Xena/000002.917731034.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 917731034,0.2 -S3357757885 -./outputs/Xena/000002.4116285959.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 4116285959,0.2 -S3357757885 -./outputs/Xena/000002.1614299449.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 1614299449,0.2 -S3357757885 -./outputs/Xena/000002.1335553075.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 1335553075,0.2 -S3357757885 +./outputs/Xena/000002.784039624.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 784039624:0.2 -S3357757885 +./outputs/Xena/000002.3647897225.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.2 -S3357757885 +./outputs/Xena/000002.917731034.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 917731034:0.2 -S3357757885 +./outputs/Xena/000002.4116285959.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 4116285959:0.2 -S3357757885 +./outputs/Xena/000002.1614299449.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 1614299449:0.2 -S3357757885 +./outputs/Xena/000002.1335553075.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 1335553075:0.2 -S3357757885 ~~~ Note that the output for each image has a -V option giving the @@ -78,7 +78,7 @@ this to work. ~~~ dream> "prompt" -S3357757885 -V3647897225,0.1;1614299449,0.1 Outputs: -./outputs/Xena/000003.1614299449.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.1;1614299449,0.1 -S3357757885 +./outputs/Xena/000003.1614299449.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1 -S3357757885 ~~~ Here we are providing equal weights (0.1 and 0.1) for both the @@ -95,12 +95,12 @@ strength) options. Note that we use -n6 to generate 6 variations: ~~~~ dream> "prompt" -S3357757885 -V3647897225,0.1;1614299449,0.1 -v0.05 -n6 Outputs: -./outputs/Xena/000004.3279757577.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.1;1614299449,0.1;3279757577,0.05 -S3357757885 -./outputs/Xena/000004.2853129515.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.1;1614299449,0.1;2853129515,0.05 -S3357757885 -./outputs/Xena/000004.3747154981.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.1;1614299449,0.1;3747154981,0.05 -S3357757885 -./outputs/Xena/000004.2664260391.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.1;1614299449,0.1;2664260391,0.05 -S3357757885 -./outputs/Xena/000004.1642517170.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.1;1614299449,0.1;1642517170,0.05 -S3357757885 -./outputs/Xena/000004.2183375608.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225,0.1;1614299449,0.1;2183375608,0.05 -S3357757885 +./outputs/Xena/000004.3279757577.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1,3279757577:0.05 -S3357757885 +./outputs/Xena/000004.2853129515.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1,2853129515:0.05 -S3357757885 +./outputs/Xena/000004.3747154981.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1,3747154981:0.05 -S3357757885 +./outputs/Xena/000004.2664260391.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1,2664260391:0.05 -S3357757885 +./outputs/Xena/000004.1642517170.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1,1642517170:0.05 -S3357757885 +./outputs/Xena/000004.2183375608.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1,2183375608:0.05 -S3357757885 ~~~~ This produces six images, all slight variations on the combination of diff --git a/ldm/dream/pngwriter.py b/ldm/dream/pngwriter.py index 1e86eb8fbc..2461486b22 100644 --- a/ldm/dream/pngwriter.py +++ b/ldm/dream/pngwriter.py @@ -70,10 +70,10 @@ class PromptFormatter: if opt.upscale: switches.append(f'-U {" ".join([str(u) for u in opt.upscale])}') if opt.variation_amount > 0: - switches.append(f'-v {opt.variation_amount}') + switches.append(f'-v{opt.variation_amount}') if opt.with_variations: - formatted_variations = ';'.join(f'{seed},{weight}' for seed, weight in opt.with_variations) - switches.append(f'-V {formatted_variations}') + formatted_variations = ','.join(f'{seed}:{weight}' for seed, weight in opt.with_variations) + switches.append(f'-V{formatted_variations}') if t2i.full_precision: switches.append('-F') return ' '.join(switches) diff --git a/scripts/dream.py b/scripts/dream.py index 54d6f86e77..65e40a631e 100755 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -187,8 +187,8 @@ def main_loop(t2i, outdir, prompt_as_dir, parser, infile): # shotgun parsing, woo parts = [] broken = False # python doesn't have labeled loops... - for part in opt.with_variations.split(';'): - seed_and_weight = part.split(',') + for part in opt.with_variations.split(','): + seed_and_weight = part.split(':') if len(seed_and_weight) != 2: print(f'could not parse with_variation part "{part}"') broken = True @@ -598,7 +598,7 @@ def create_cmd_parser(): '--with_variations', default=None, type=str, - help='list of variations to apply, in the format `seed,weight;seed,weight;...' + help='list of variations to apply, in the format `seed:weight,seed:weight,...' ) return parser