mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
metadata fix wildcard info
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
+5
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user