mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix normalized prompt when a variation is generated
- The seed printed needs to be the one generated prior to the initial noising operation. To do this, I added a new "first_seed" argument to the image callback in dream.py. - Closes #641
This commit is contained in:
@ -250,11 +250,12 @@ def main_loop(gen, opt, infile):
|
||||
results = [] # list of filename, prompt pairs
|
||||
grid_images = dict() # seed -> Image, only used if `opt.grid`
|
||||
prior_variations = opt.with_variations or []
|
||||
first_seed = opt.seed
|
||||
|
||||
def image_writer(image, seed, upscaled=False):
|
||||
def image_writer(image, seed, upscaled=False, first_seed=None):
|
||||
# note the seed is the seed of the current image
|
||||
# the first_seed is the original seed that noise is added to
|
||||
# when the -v switch is used to generate variations
|
||||
path = None
|
||||
nonlocal first_seed
|
||||
nonlocal prior_variations
|
||||
if opt.grid:
|
||||
grid_images[seed] = image
|
||||
|
Reference in New Issue
Block a user