adieyal / sd-dynamic-prompts

A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation
MIT License
1.96k stars 253 forks source link

Should not fail all wildcards when one of is invalid #780

Open bluelovers opened 1 month ago

bluelovers commented 1 month ago
__a/a__
__b/a__
__c/a__

current

when __b/a__ is invalid, all other is also failed

expected

when __b/a__ is invalid, all other is still work

akx commented 3 weeks ago

What should happen instead in your opinion? Should the entire wildcard invocation be erased from the prompt? Then there's the issue that it would be hard to report a misspelled wildcard without the user having to e.g. look at the webui console.

bluelovers commented 3 weeks ago

when __b/a__ is invalid, keep it as __b/a__ in prompts, but just ignore error, make others not break

also if can, display error notice about error __b/a__ is invalid or not exists in webui't html-log

image