mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
image metadata handle correct image index
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -23,6 +23,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No
|
||||
if not hasattr(shared.sd_model, 'sd_checkpoint_info'):
|
||||
return ''
|
||||
|
||||
job_size = p.n_iter * p.batch_size
|
||||
if index is None:
|
||||
index = position_in_batch + iteration * p.batch_size
|
||||
if all_prompts is None:
|
||||
@@ -209,7 +210,13 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No
|
||||
if shared.sd_model_type == 'h1':
|
||||
args['LLM'] = None if shared.opts.model_h1_llama_repo == 'Default' else shared.opts.model_h1_llama_repo
|
||||
|
||||
args.update(p.extra_generation_params)
|
||||
# args.update(p.extra_generation_params)
|
||||
for k, v in p.extra_generation_params.items():
|
||||
if isinstance(v, (list, tuple)) and (job_size > index) and (len(v) > 1) and (len(v) == job_size): # likely a per-job param
|
||||
args[k] = v[index]
|
||||
else:
|
||||
args[k] = v
|
||||
|
||||
for k, v in args.copy().items():
|
||||
if v is None:
|
||||
del args[k]
|
||||
|
||||
Reference in New Issue
Block a user