adieyal / dynamicprompts

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

Optimize parsing #77

Closed akx closed 1 year ago

akx commented 1 year ago

I realized we

– the speed increase for a -k "not slow" test suite is pretty shocking (roughly 4x faster) 😁

(dynamicprompts) ~/b/dynamicprompts (main) $ hyperfine 'py.test -k "not slow"' -i -m 2
Benchmark 1: py.test -k "not slow"
  Time (mean ± σ):     14.112 s ±  0.428 s    [User: 14.190 s, System: 0.582 s]
  Range (min … max):   13.809 s … 14.415 s    2 runs
(dynamicprompts) ~/b/dynamicprompts (optimize-parse) $ hyperfine 'py.test -k "not slow"' -i -m 2
Benchmark 1: py.test -k "not slow"
  Time (mean ± σ):      3.681 s ±  0.009 s    [User: 4.088 s, System: 0.436 s]
  Range (min … max):    3.674 s …  3.687 s    2 runs
codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 93.33% and project coverage change: -0.03 :warning:

Comparison is base (2747411) 97.98% compared to head (3ce9f00) 97.95%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #77 +/- ## ========================================== - Coverage 97.98% 97.95% -0.03% ========================================== Files 71 71 Lines 2726 2738 +12 ========================================== + Hits 2671 2682 +11 - Misses 55 56 +1 ``` | [Impacted Files](https://codecov.io/gh/adieyal/dynamicprompts/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal) | Coverage Δ | | |---|---|---| | [src/dynamicprompts/parser/config.py](https://codecov.io/gh/adieyal/dynamicprompts/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal#diff-c3JjL2R5bmFtaWNwcm9tcHRzL3BhcnNlci9jb25maWcucHk=) | `100.00% <ø> (ø)` | | | [src/dynamicprompts/parser/parse.py](https://codecov.io/gh/adieyal/dynamicprompts/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal#diff-c3JjL2R5bmFtaWNwcm9tcHRzL3BhcnNlci9wYXJzZS5weQ==) | `98.41% <93.33%> (-0.46%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adi+Eyal)

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