Commit Graph

33 Commits (defdf8a9273fc1cd7c5a4be738d3e888bb452e1c)

Author SHA1 Message Date
Adi Eyal a43eb74dae Initegrated jinja2 from dynamicprompts
Removed old jinja2 code
2023-01-06 23:43:52 +02:00
Adi Eyal f53a375edc removed unused tests 2023-01-05 20:14:28 +02:00
Adi Eyal 51de80497e Using classes from the typing package for python 3.7 compatibility 2023-01-04 22:33:55 +02:00
Adi Eyal 89053f0dcf Better handling of missing wildcard files
now the original __wildcard__ is returned instead of throwing an error
2023-01-03 14:56:24 +02:00
Adi Eyal 93477b95a9 Fixed parser issue caused by literals adjacent to wildcards
e.g. (__colours__) or ,__colours__
2023-01-02 11:55:47 +02:00
Adi Eyal 7811b04657 Reverted prompt editing parsing 2023-01-02 01:31:13 +02:00
Adi Eyal acba16c23d Fixed parsing of emphasis with weights
e.g. (a term:1.2)
2023-01-02 00:31:17 +02:00
Adi Eyal 6b6bf03fe5 Fixed variants with missing values 2023-01-01 22:27:47 +02:00
Adi Eyal e6e4b22d2d Parser now correctly ignores [low emphasis] square brackets 2023-01-01 20:35:41 +02:00
Adi Eyal 82189b34a3 Prompt editing and alternating words can next prompts
See https://github.com/adieyal/sd-dynamic-prompts/blob/main/SYNTAX.md
for more details
2023-01-01 18:36:00 +02:00
Adi Eyal 0244810aa2 Added passthru support for prompt editing 2023-01-01 10:40:52 +02:00
Adi Eyal 1097693e66 regex to match literals instread of unicode printables
THe former is muchg faster than the latter
2022-12-31 19:35:42 +02:00
Adi Eyal 74976c7663 Included latin1 characters in printables
pyparsing by default only accepts ascii characters when using printables
2022-12-31 19:11:25 +02:00
Adi Eyal a122279157 Using pyparsing instead of regular expressions
Prompts are now more flexible allowing for arbitrary nesting of clauses,
c-style and python-style comments, and Auto1111's prompt editing. Ranges
are now also available in combinatorial mode.
2022-12-31 16:26:10 +02:00
Adi Eyal cd96cc7ee2 Fixed #131 2022-12-24 13:14:12 +02:00
Adi Eyal e70c93abee Removed hardcoded values from tests 2022-12-22 08:16:36 +02:00
Adi Eyal 9ad7001c7a Changed weights parameter in CombinationSelector to be optional 2022-12-22 04:15:34 +02:00
shoffing 96fa8fb049 add support for weighted variants 2022-12-21 16:54:46 -05:00
Adi Eyal d62b8686df Fixes https://github.com/adieyal/sd-dynamic-prompts/issues/88 2022-12-02 10:20:00 +02:00
Adi Eyal 98528f4acb Addresses https://github.com/adieyal/sd-dynamic-prompts/issues/85 2022-11-30 17:06:29 +02:00
Adi Eyal 3327751afe fixes https://github.com/adieyal/sd-dynamic-prompts/issues/80 2022-11-29 13:48:49 +02:00
Adi Eyal 2e79b55926 Fixes https://github.com/adieyal/sd-dynamic-prompts/issues/78 2022-11-29 08:43:25 +02:00
Adi Eyal 43ac2ba399 Fixes https://github.com/adieyal/sd-dynamic-prompts/issues/54 2022-11-28 09:02:34 +02:00
Adi Eyal ee72746ec8 Added unit test for magic prompt 2022-11-16 22:59:10 +02:00
Adi Eyal ad27c83db2 Added unit tests for magic prompt 2022-11-16 22:40:48 +02:00
Adi Eyal 8ebcfc4a46 re-wrote combinatorial generation using queues instead of recursion
This should provide better control for limited the number of prompts generated
2022-11-14 15:14:19 +02:00
Adi Eyal 36e8554de6 Added missing unit test for weighted choices 2022-11-14 10:50:47 +02:00
Adi Eyal 5dea3a53ad Added a weighted choice function to jinja2 templates 2022-11-14 10:37:40 +02:00
Adi Eyal 28eeb841df Added additional jinja2 extensions 2022-11-13 21:38:54 +02:00
Adi Eyal b694b4b6b5 Added jinja2 templates - v0.18.0 2022-11-13 17:46:23 +02:00
Adi Eyal efb63bc2b9 Refactored custom joiner code and added tests 2022-11-08 09:32:59 +02:00
Adi Eyal d293201458 Added implicit lower and upper ranges 2022-11-07 20:14:20 +02:00
Adi Eyal c87daca670 0.13.8 - Combinations now sample with replacement 2022-11-07 19:38:14 +02:00