From 9fd32084def209b42593472ed57602a47e3fea5c Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 12 Sep 2026 20:36:28 +0200 Subject: [PATCH] metadata fix wildcard info Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 1 + modules/processing_info.py | 5 ----- modules/styles.py | 9 +++++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e646173b5..b35f52f5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -123,6 +123,7 @@ Plus inevitable bug-fixes... - lora: support transformer ref models - lucida: handle requirements - lumina-dimoo: attention-kwargs, thanks @Anai-Guo + - metadata: fix wildcard info - minimax: crop image to video aspect ratio - modular: handle module with remote-code - network: improve type/version lookup diff --git a/modules/processing_info.py b/modules/processing_info.py index 719fec0c6..54544ae84 100644 --- a/modules/processing_info.py +++ b/modules/processing_info.py @@ -208,11 +208,6 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No args['Sampler shift'] = get_opt('schedulers_shift') if get_opt('schedulers_shift') != shared.opts.data_labels.get('schedulers_shift').default else None args['Sampler dynamic shift'] = get_opt('schedulers_dynamic_shift') if get_opt('schedulers_dynamic_shift') != shared.opts.data_labels.get('schedulers_dynamic_shift').default else None - # model specific - 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) 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] diff --git a/modules/styles.py b/modules/styles.py index f5136f1a5..d432959ea 100644 --- a/modules/styles.py +++ b/modules/styles.py @@ -200,14 +200,15 @@ def apply_wildcards_to_prompt(prompt, all_wildcards, seed=-1, silent=False, p: S except Exception as e: log.error(f'Wildcards: wildcard="{wildcard}" error={e}') t1 = time.time() - prompt, replaced_file, not_found = apply_file_wildcards(prompt, [], [], recursion=0, seed=seed, p=p) + prompt, replaced_files, missing_files = apply_file_wildcards(prompt, [], [], recursion=0, seed=seed, p=p) t2 = time.time() if replaced and not silent: log.debug(f'Apply wildcards: {replaced} path="{shared.opts.wildcards_dir}" type=style time={t1-t0:.2f}') - if (len(replaced_file) > 0 or len(not_found) > 0) and not silent: - log.debug(f'Apply wildcards: found={replaced_file} missing={not_found} path="{shared.opts.wildcards_dir}" type=file seed={seed} time={t2-t2:.2f}') + if (len(replaced_files) > 0 or len(missing_files) > 0) and not silent: + log.debug(f'Apply wildcards: found={replaced_files} missing={missing_files} path="{shared.opts.wildcards_dir}" type=file seed={seed} time={t2-t1:.2f}') if p is not None: - p.extra_generation_params['Wildcards'] = p.extra_generation_params.get('Wildcards', []) + [replaced_file] + wildcards = p.extra_generation_params.get('Wildcards', []) + replaced_files + p.extra_generation_params['Wildcards'] = ', '.join(wildcards) if old_state is not None: random.setstate(old_state) return prompt