mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'development' into development
This commit is contained in:
commit
0b786f61cc
@ -654,6 +654,8 @@ def metadata_loads(metadata):
|
|||||||
# repack the prompt and variations
|
# repack the prompt and variations
|
||||||
image['prompt'] = ','.join([':'.join([x['prompt'], str(x['weight'])]) for x in image['prompt']])
|
image['prompt'] = ','.join([':'.join([x['prompt'], str(x['weight'])]) for x in image['prompt']])
|
||||||
image['variations'] = ','.join([':'.join([str(x['seed']),str(x['weight'])]) for x in image['variations']])
|
image['variations'] = ','.join([':'.join([str(x['seed']),str(x['weight'])]) for x in image['variations']])
|
||||||
|
# fix a bit of semantic drift here
|
||||||
|
image['sampler_name']=image.pop('sampler')
|
||||||
opt = Args()
|
opt = Args()
|
||||||
opt._cmd_switches = Namespace(**image)
|
opt._cmd_switches = Namespace(**image)
|
||||||
results.append(opt)
|
results.append(opt)
|
||||||
|
@ -191,11 +191,7 @@ def main_loop(gen, opt, infile):
|
|||||||
else:
|
else:
|
||||||
opt.with_variations = None
|
opt.with_variations = None
|
||||||
|
|
||||||
if opt.outdir:
|
if opt.prompt_as_dir:
|
||||||
if not os.path.exists(opt.outdir):
|
|
||||||
os.makedirs(opt.outdir)
|
|
||||||
current_outdir = opt.outdir
|
|
||||||
elif opt.prompt_as_dir:
|
|
||||||
# sanitize the prompt to a valid folder name
|
# sanitize the prompt to a valid folder name
|
||||||
subdir = path_filter.sub('_', opt.prompt)[:name_max].rstrip(' .')
|
subdir = path_filter.sub('_', opt.prompt)[:name_max].rstrip(' .')
|
||||||
|
|
||||||
@ -210,6 +206,8 @@ def main_loop(gen, opt, infile):
|
|||||||
if not os.path.exists(current_outdir):
|
if not os.path.exists(current_outdir):
|
||||||
os.makedirs(current_outdir)
|
os.makedirs(current_outdir)
|
||||||
else:
|
else:
|
||||||
|
if not os.path.exists(opt.outdir):
|
||||||
|
os.makedirs(opt.outdir)
|
||||||
current_outdir = opt.outdir
|
current_outdir = opt.outdir
|
||||||
|
|
||||||
# Here is where the images are actually generated!
|
# Here is where the images are actually generated!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user