Commit Graph

27 Commits

Author SHA1 Message Date
Matthias Wild
36870a8f53
Merge branch 'development' into merge-main-into-development 2022-11-04 16:25:00 +01:00
damian0815
b70420951d fix parsing error doing eg forest ().swap(in winter) 2022-11-03 20:15:23 -04:00
Lincoln Stein
174a9b78b0 Bring main back into a consistent state with other branches
- Due to misuse of rebase command, main was transiently
  in an inconsistent state.

- This repairs the damage, and adds a few post-release
  patches that ensure stable conda installs on Mac and Windows.
2022-11-03 15:44:06 -04:00
Damian at mba
e554c2607f Rebuilt prompt parsing logic
Complete re-write of the prompt parsing logic to be more readable and
logical, and therefore also hopefully easier to debug, maintain, and
augment.

In the process it has also become more robust to badly-formed prompts.

Squashed commit of the following:

commit 8fcfa88a16e1390d41717e940d72aed64712171c
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 30 17:05:57 2022 +0100

    further cleanup

commit 1a1fd78bcfeb49d072e3e6d5808aa8df15441629
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 30 16:07:57 2022 +0100

    cleanup and document

commit 099c9659fa8b8135876f9a5a50fe80b20bc0635c
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 30 15:54:58 2022 +0100

    works fully

commit 5e6887ea8c25a1e21438ff6defb381fd027d25fd
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 30 15:24:31 2022 +0100

    further...

commit 492fda120844d9bc1ad4ec7dd408a3374762d0ff
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 30 14:08:57 2022 +0100

    getting there...

commit c6aab05a8450cc3c95c8691daf38fdc64c74f52d
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 28 14:29:03 2022 +0200

    wip doesn't compile

commit 5e533f731cfd20cd435330eeb0012e5689e87e81
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 28 13:21:43 2022 +0200

    working with CrossAttentionCtonrol but no Attention support yet

commit 9678348773431e500e110e8aede99086bb7b5955
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 28 13:04:52 2022 +0200

    wip rebuiling prompt parser
2022-11-01 17:37:26 -04:00
mauwii
48d4fccd61 add tests/validate_pr_prompt.txt 2022-10-28 13:47:45 -04:00
Damian at mba
864d080502 handle all unicode characters 2022-10-28 10:39:12 -04:00
Damian at mba
245cf606a3 be more forgiving about prompts with ((words)) 2022-10-27 22:36:33 +02:00
Damian at mba
30745f163d add one more test case 2022-10-27 21:18:08 +02:00
Damian at mba
e20108878c fix attention weight inside .swap() 2022-10-27 21:17:23 +02:00
Damian at mba
135c62f1a4 fix issue with hot-dog, improve () suppression 2022-10-27 07:37:48 -04:00
Damian at mba
44e4090909 re-enable legacy blend syntax 2022-10-24 11:16:52 +02:00
Damian at mba
2619a0b286 allow longer substitutions without quotes for cross attention swap 2022-10-24 00:22:14 +02:00
Damian at mba
b0eb864a25 move attention weighting operations to postfix 2022-10-23 23:01:53 +02:00
Damian at mba
ee7d4d712a parsing CrossAttentionControlSubstitute options works 2022-10-22 11:27:56 +02:00
Damian at mba
404d59b1b8 fix blend 2022-10-21 04:18:17 +02:00
Damian at mba
2e0b1c4c8b ok now we're cooking 2022-10-21 03:29:50 +02:00
Damian at mba
da75876639 better support for word.swap(otherWord) without parantheses or quotes 2022-10-21 00:08:28 +02:00
Damian at mba
da88097aba fix prompt handling in conditioning.py 2022-10-20 21:41:32 +02:00
Damian at mba
3f13dd3ae8 prompt parsing is now much more robust 2022-10-20 21:05:36 +02:00
Damian at mba
79b4afeae7 parser working with basic escapes 2022-10-20 16:56:34 +02:00
Damian at mba
da223dfe81 wip re-writing parts of prompt parser 2022-10-20 15:56:46 +02:00
Damian at mba
c9d27634b4 bring in prompt parser from fix-prompts branch
attention is parsed but ignored, blends old syntax doesn't work,
	  conjunctions are parsed but ignored, the only part that's used
	  here is the new .blend() syntax and cross-attention control
	  using .swap()
2022-10-20 12:01:48 +02:00
Damian at mba
42883545f9 add prompt language support for cross-attention .swap 2022-10-20 01:42:04 +02:00
mauwii
b39029521b
use very short validation for Pull Requests 2022-10-18 13:25:49 +02:00
CapableWeb
6c0dd9b5ef Add back old dream.py as legacy_api.py
This commit "reverts" the new API changes by extracting the old
functionality into new files.

The work is based on the commit `803a51d5adca7e6e28491fc414fd3937bee7cb79`

PngWriter regained PromptFormatter as old server used that.

`server_legacy.py` is the old server that `dream.py` used.

Finally `legacy_api.py` is what `dream.py` used to be at the mentioned
commit.

One manually run test has been added in order to be able to test
compatibility with the old API, currently just testing that the API
endpoint works the same way + the image hash is the same as it used to
be before.
2022-10-12 20:35:56 -04:00
James Reynolds
37e2418ee0
Added linux to the workflows (#463)
* Added linux to the workflows

- rename workflow files

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* fixes: run on merge to 'main', 'dev'; 

- reduce dev merge test cases to 1 (1 takes 11 minutes 😯)
- fix model cache name

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* add test prompts to workflows

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: James Reynolds <magnsuviri@me.com>
Co-authored-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-16 17:46:57 -04:00
James Reynolds
244239e5f6
macOS CI workflow, dream.py exits with an error, but the workflow com… (#396)
* macOS CI workflow, dream.py exits with an error, but the workflow completes.

* Files for testing

Co-authored-by: James Reynolds <magnsuviri@me.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-08 07:36:33 -04:00