mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into pip-install-test
This commit is contained in:
commit
9050f3d399
10
README.md
10
README.md
@ -98,12 +98,15 @@ This will tell the sampler to invest 25% of its effort on the tabby
|
|||||||
cat aspect of the image and 75% on the white duck aspect
|
cat aspect of the image and 75% on the white duck aspect
|
||||||
(surprisingly, this example actually works). The prompt weights can
|
(surprisingly, this example actually works). The prompt weights can
|
||||||
use any combination of integers and floating point numbers, and they
|
use any combination of integers and floating point numbers, and they
|
||||||
do not need to add up to 1. A practical example of using this type of
|
do not need to add up to 1.
|
||||||
weighting is described here:
|
|
||||||
https://www.reddit.com/r/StableDiffusion/comments/wvb7q7/using_prompt_weights_to_tweak_an_image_with/
|
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
|
* v1.07 (23 August 2022)
|
||||||
|
* Image filenames will now never fill gaps in the sequence, but will be assigned the
|
||||||
|
next higher name in the chosen directory. This ensures that the alphabetic and chronological
|
||||||
|
sort orders are the same.
|
||||||
|
|
||||||
* v1.06 (23 August 2022)
|
* v1.06 (23 August 2022)
|
||||||
* Added weighted prompt support contributed by [xraxra](https://github.com/xraxra)
|
* Added weighted prompt support contributed by [xraxra](https://github.com/xraxra)
|
||||||
* Example of using weighted prompts to tweak a demonic figure contributed by [bmaltais](https://github.com/bmaltais)
|
* Example of using weighted prompts to tweak a demonic figure contributed by [bmaltais](https://github.com/bmaltais)
|
||||||
@ -496,6 +499,7 @@ optional arguments:
|
|||||||
--f F downsampling factor
|
--f F downsampling factor
|
||||||
--n_samples N_SAMPLES
|
--n_samples N_SAMPLES
|
||||||
how many samples to produce for each given prompt. A.k.a. batch size
|
how many samples to produce for each given prompt. A.k.a. batch size
|
||||||
|
(note that the seeds for each image in the batch will be unavailable)
|
||||||
--n_rows N_ROWS rows in the grid (default: n_samples)
|
--n_rows N_ROWS rows in the grid (default: n_samples)
|
||||||
--scale SCALE unconditional guidance scale: eps = eps(x, empty) + scale * (eps(x, cond) - eps(x, empty))
|
--scale SCALE unconditional guidance scale: eps = eps(x, empty) + scale * (eps(x, cond) - eps(x, empty))
|
||||||
--from-file FROM_FILE
|
--from-file FROM_FILE
|
||||||
|
@ -482,12 +482,12 @@ The vast majority of these arguments default to reasonable values.
|
|||||||
revision = 1
|
revision = 1
|
||||||
|
|
||||||
if previousname is None:
|
if previousname is None:
|
||||||
# count up until we find an unfilled slot
|
# sort reverse alphabetically until we find max+1
|
||||||
dir_list = [a.split('.',1)[0] for a in os.listdir(outdir)]
|
dirlist = sorted(os.listdir(outdir),reverse=True)
|
||||||
uniques = dict.fromkeys(dir_list,True)
|
# find the first filename that matches our pattern or return 000000.0.png
|
||||||
basecount = 1
|
filename = next((f for f in dirlist if re.match('^(\d+)\..*\.png',f)),'0000000.0.png')
|
||||||
while f'{basecount:06}' in uniques:
|
basecount = int(filename.split('.',1)[0])
|
||||||
basecount += 1
|
basecount += 1
|
||||||
if grid_count is not None:
|
if grid_count is not None:
|
||||||
grid_label = f'grid#1-{grid_count}'
|
grid_label = f'grid#1-{grid_count}'
|
||||||
filename = f'{basecount:06}.{seed}.{grid_label}.png'
|
filename = f'{basecount:06}.{seed}.{grid_label}.png'
|
||||||
|
@ -263,8 +263,8 @@ def create_argv_parser():
|
|||||||
choices=['plms','ddim', 'klms'],
|
choices=['plms','ddim', 'klms'],
|
||||||
default='klms',
|
default='klms',
|
||||||
help="which sampler to use (klms) - can only be set on command line")
|
help="which sampler to use (klms) - can only be set on command line")
|
||||||
parser.add_argument('-o',
|
parser.add_argument('--outdir',
|
||||||
'--outdir',
|
'-o',
|
||||||
type=str,
|
type=str,
|
||||||
default="outputs/img-samples",
|
default="outputs/img-samples",
|
||||||
help="directory in which to place generated images and a log of prompts and seeds")
|
help="directory in which to place generated images and a log of prompts and seeds")
|
||||||
@ -276,8 +276,8 @@ def create_cmd_parser():
|
|||||||
parser.add_argument('prompt')
|
parser.add_argument('prompt')
|
||||||
parser.add_argument('-s','--steps',type=int,help="number of steps")
|
parser.add_argument('-s','--steps',type=int,help="number of steps")
|
||||||
parser.add_argument('-S','--seed',type=int,help="image seed")
|
parser.add_argument('-S','--seed',type=int,help="image seed")
|
||||||
parser.add_argument('-n','--iterations',type=int,default=1,help="number of samplings to perform")
|
parser.add_argument('-n','--iterations',type=int,default=1,help="number of samplings to perform (slower, but will provide seeds for individual images)")
|
||||||
parser.add_argument('-b','--batch_size',type=int,default=1,help="number of images to produce per sampling")
|
parser.add_argument('-b','--batch_size',type=int,default=1,help="number of images to produce per sampling (will not provide seeds for individual images!)")
|
||||||
parser.add_argument('-W','--width',type=int,help="image width, multiple of 64")
|
parser.add_argument('-W','--width',type=int,help="image width, multiple of 64")
|
||||||
parser.add_argument('-H','--height',type=int,help="image height, multiple of 64")
|
parser.add_argument('-H','--height',type=int,help="image height, multiple of 64")
|
||||||
parser.add_argument('-C','--cfg_scale',default=7.5,type=float,help="prompt configuration scale")
|
parser.add_argument('-C','--cfg_scale',default=7.5,type=float,help="prompt configuration scale")
|
||||||
|
Loading…
Reference in New Issue
Block a user