image metadata handle correct image index

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-08-14 10:44:56 +02:00
parent 0ac89385a0
commit ce69dd4f17
4 changed files with 13 additions and 4 deletions
+8 -1
View File
@@ -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]