fix wildcards

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-12-22 08:20:16 -05:00
parent 042f5f9fed
commit dff846182f
3 changed files with 7 additions and 5 deletions
+4 -3
View File
@@ -1,8 +1,8 @@
# Change Log for SD.Next
## Update for 2024-12-21
## Update for 2024-12-22
### Highlights for 2024-12-21
### Highlights for 2024-12-22
### SD.Next Xmass edition: *What's new?*
@@ -32,7 +32,7 @@ All-in-all, we're around ~160 commits worth of updates, check changelog for full
[ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867)
## Details for 2024-12-21
## Details for 2024-12-22
### New models and integrations
@@ -217,6 +217,7 @@ All-in-all, we're around ~160 commits worth of updates, check changelog for full
- fix xyz-grid with lora none
- fix svd image2video
- fix gallery display during generate
- fix wildcards replacement to be unique
## Update for 2024-11-21
+2 -1
View File
@@ -144,7 +144,8 @@ def full_vae_decode(latents, model):
decoded = model.vae.decode(latents, return_dict=False)[0]
except Exception as e:
shared.log.error(f'VAE decode: {stats} {e}')
errors.display(e, 'VAE decode')
if 'out of memory' not in str(e):
errors.display(e, 'VAE decode')
decoded = []
if hasattr(model.vae, "orig_dtype"):
+1 -1
View File
@@ -52,7 +52,7 @@ def apply_file_wildcards(prompt, replaced = [], not_found = [], recursion=0, see
choice = random.choice(lines).strip(' \n')
if '|' in choice:
choice = random.choice(choice.split('|')).strip(' []{}\n')
prompt = prompt.replace(f"__{wildcard}__", choice)
prompt = prompt.replace(f"__{wildcard}__", choice, 1)
shared.log.debug(f'Wildcards apply: wildcard="{wildcard}" choice="{choice}" file="{file}" choices={len(lines)}')
replaced.append(wildcard)
return prompt, True