adieyal / dynamicprompts

Templating language for generating prompts for text to image generators such as Stable Diffusion
MIT License
124 stars 20 forks source link

Optionally disable sortand and deduplication of wildcards #89

Closed adieyal closed 1 year ago

adieyal commented 1 year ago

To maintain backwards compatibility, by default wildcards are sorted and deduplicated but this functionality can be disabled.

adieyal commented 1 year ago

This is a pretty simple change. I would prefer to provide these settings in the constructor rather than setter methods, but until we can be confident that the extension will update the dynamicprompts library, I am hesitant to change method signatures. Thoughts?

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (bd83ee7) 97.66% compared to head (e24c1ad) 97.67%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #89 +/- ## ======================================= Coverage 97.66% 97.67% ======================================= Files 70 70 Lines 2864 2876 +12 ======================================= + Hits 2797 2809 +12 Misses 67 67 ``` | [Impacted Files](https://app.codecov.io/gh/adieyal/dynamicprompts/pull/89?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal) | Coverage Δ | | |---|---|---| | [src/dynamicprompts/wildcards/wildcard\_manager.py](https://app.codecov.io/gh/adieyal/dynamicprompts/pull/89?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal#diff-c3JjL2R5bmFtaWNwcm9tcHRzL3dpbGRjYXJkcy93aWxkY2FyZF9tYW5hZ2VyLnB5) | `97.43% <100.00%> (+0.21%)` | :arrow_up: | | [tests/wildcard/test\_wildcardmanager.py](https://app.codecov.io/gh/adieyal/dynamicprompts/pull/89?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal#diff-dGVzdHMvd2lsZGNhcmQvdGVzdF93aWxkY2FyZG1hbmFnZXIucHk=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

adieyal commented 1 year ago

Re - kwarg *

Suppose we push this release. Then modify the extension to allow for toggling deduplication and sorting. If someone updates their extension but their dynamicprompts doesn't update, then the code will break since the signature doesn't accept these new parameters.

I think we should wait to update the extension until https://github.com/adieyal/sd-dynamic-prompts/pull/449 is merged before updating the extension.