Commit Graph

1209 Commits

Author SHA1 Message Date
Peter Baylies
3692f223e1
Merge branch 'development' into development 2022-09-18 18:58:04 -04:00
Lincoln Stein
fccf809e3a add ability to post-process images from the CLI
- supports gfpgan, esrgan, codeformer and embiggen
- To use:
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft gfpgan -U2 -G0.8
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft codeformer -G 0.8
   dream> !fix ./outputs/img-samples/000056.29214455.png  -U4
   dream> !fix ./outputs/img-samples/000056.292144555.png -embiggen 1.5

   The first example invokes gfpgan to fix faces and esrgan to upscale.
   The second example invokes codeformer to fix faces, no upscaling
   The third example uses esrgan to upscale 4X
   The four example runs embiggen to enlarge 1.5X

- This is very preliminary work. There are some anomalies to note:
  1. The syntax is non-obvious. I would prefer something like:
     !fix esrgan,gfpgan
     !fix esrgan
     !fix embiggen,codeformer

     However, this will require refactoring the gfpgan and embiggen
     code.

   2. Images generated using gfpgan, esrgan or codeformer all are named
      "xxxxxx.xxxxxx.postprocessed.png" and the original is saved.
      However, the prefix is a new one that is not related to the
      original.

   3. Images generated using embiggen are named "xxxxx.xxxxxxx.png",
      and once again the prefix is new. I'm not sure whether the
      prefix should be aligned with the original file's prefix or not.
      Probably not, but opinions welcome.
2022-09-18 17:26:09 -04:00
mauwii
23e62efdc5
Merge remote-tracking branch 'upstream/development' into mkdocs-updates 2022-09-18 21:41:14 +02:00
mauwii
6ea0a7699e
add Icons to Titles and in index.md 2022-09-18 21:30:18 +02:00
Lincoln Stein
1e8e5245eb CLI writes prompt string metadata in same format as web server 2022-09-18 15:08:56 -04:00
Lincoln Stein
4f926fc470
Merge branch 'development' into development 2022-09-18 15:04:01 -04:00
tildebyte
a0a9b12daf
fix(scripts): dream.py typo (#675)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-18 15:03:11 -04:00
blessedcoolant
f3292a6953
Implement CodeFormer Face Restoration (#669)
* Implement CodeFormer Face Restoration

* fix codeformer model destination path

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-18 15:01:05 -04:00
Lincoln Stein
062f3e8f31
Gfpgan download fix (#655)
* restore ability to save files to directories named after prompt

* don't download gfpgan model file if it exists

- Fixes #647
2022-09-18 14:42:43 -04:00
Armando C. Santisbon
20ffd4082c needs protobuf 3.20.1 2022-09-18 13:25:21 -05:00
mauwii
578638c258
include rust inst. step in standalone installation
also include protobuf uninstall if installed previously
2022-09-18 18:48:05 +02:00
mauwii
cdc78cc6a1
use inline codeblocks for those very long prompts
this way they linebreak which helps a lot in this case
also removed odd whitespaces
2022-09-18 18:46:03 +02:00
Peter Baylies
c98ade9b25
Merge branch 'development' into development 2022-09-18 12:35:28 -04:00
mauwii
fe0f5bcc11
readd missed backticks and add tabkey 2022-09-18 16:43:04 +02:00
mauwii
df98178018
fix paths in PROMPTS.md 2022-09-18 16:39:18 +02:00
mauwii
0b0cde2351
Merge remote-tracking branch 'upstream/development' into mkdocs-updates 2022-09-18 16:34:14 +02:00
mauwii
5b4c37e043
fix #643 shortcut for --strength is -f 2022-09-18 16:09:08 +02:00
Brent Ozar
3c4c4d71c9
VARIATIONS.md - fix typo in formatting (#664)
A beginning line for a code section was left out.
2022-09-18 09:50:54 -04:00
Brent Ozar
ea2b0828d8
Documentation for negative prompts (#668)
Documentation for pull lstein#661, and splits prompt docs into a separate file.
2022-09-18 09:50:19 -04:00
Danny Beer
045aa7a9a3
Support color correction for img2img and inpainting (#613)
* Support color correction for img2img and inpainting, avoiding the shift to magenta seen when running images through img2img repeatedly.

* Fix docs for color correction

* add --init_color to prompt reconstruction

* For best results, the --init_color option should point to the *very first* image used in the sequence of img2img operations. Otherwise color correction will skew towards cyan.

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-18 09:47:57 -04:00
Peter Baylies
d478a241a8
Merge branch 'development' into development 2022-09-18 09:20:13 -04:00
blessedcoolant
0a4397094e
Negative / Unconditioned Prompts (#661)
Co-Authored-By: rabidcopy <8052832+rabidcopy@users.noreply.github.com>

Co-authored-by: rabidcopy <8052832+rabidcopy@users.noreply.github.com>
2022-09-18 09:08:30 -04:00
Peter Baylies
0b786f61cc
Merge branch 'development' into development 2022-09-18 08:54:22 -04:00
Lincoln Stein
b68cb521ba
restore ability to save files to directories named after prompt (#654) 2022-09-18 08:37:08 -04:00
psychedelicious
e1f0ee819d Minor bug fix 2022-09-18 21:13:42 +10:00
mauwii
f2c3fba28d
update mkdocs-flow
for the git-revision-date addon it is necesarry to set fetch-depth to 0
2022-09-18 11:33:09 +02:00
mauwii
676c772f11
update mkdocs config
- use git-revision-date-localized with enabled creation date
- update requirements-mkdocs.txt and pin verisons
- add requirements
- add dev addr
- fix template
- use better icons for repo and edit button
- remove odd extension
2022-09-18 11:12:45 +02:00
mauwii
016fd65f6a
use more admonitions and introduce keys 2022-09-18 11:09:27 +02:00
psychedelicious
09bf6dd7c1 Merge remote-tracking branch 'upstream/development' into development 2022-09-18 18:44:40 +10:00
psychedelicious
6e927acd58 Improves state/API code structure, formatting, etc 2022-09-18 17:33:09 +10:00
mauwii
383b870499
update index.md to use same labes as README.md 2022-09-18 07:00:43 +02:00
mauwii
98f189cc69
fix username for magiclinks to point to lstein 2022-09-18 06:43:50 +02:00
mauwii
dbc9134630
add previously missed admonition 2022-09-18 05:06:54 +02:00
mauwii
746162b578
Merge remote-tracking branch 'upstream/development' into mkdocs-updates 2022-09-18 04:58:40 +02:00
mauwii
0071f43b2c
use Admonitions for notes, warnings, ... 2022-09-18 04:54:20 +02:00
mauwii
6d09f8c6b2
some smaller fixes to linux and windows install 2022-09-18 04:09:42 +02:00
mauwii
66e9fd4771
fix CLI.md
disabled toc in order to view those large tables
added linebreaks in long cells to stop multiline arguments/shortcut
added backticks arround arguments to stop interpreting `<...>` as html
added missing identifiers to codeblocks
changed html tags to markdown to insert the png
2022-09-18 03:00:07 +02:00
psychedelicious
ef6609abcb Updates frontend/README 2022-09-18 10:45:06 +10:00
Peter Baylies
2f93418095
Merge branch 'development' into development 2022-09-17 20:35:48 -04:00
tildebyte
9bcb0dff96
feat(docs): readme - add discord server badge/link (#644)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-17 18:28:26 -04:00
tildebyte
f84372efd8
fix(doc): readme - more meaningful CI links from badges (#645)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-17 18:26:09 -04:00
mauwii
334045b27d
fix CompViz assets 2022-09-18 00:13:45 +02:00
Mihai
071f65a892
Enable even larger images with one simple torch.nn.functional.silu import (#653)
Fixes:
File "stable-diffusion/ldm/modules/diffusionmodules/model.py", line 37, in nonlinearity
    return x*torch.sigmoid(x)
RuntimeError: CUDA out of memory. Tried to allocate 1.56 GiB [..]

Now up to 1536x1280 is possible on 8GB VRAM.
Also remove unused SiLU class.
2022-09-17 18:03:52 -04:00
psychedelicious
e30827e19b Adds enter keydown > generate 2022-09-18 06:13:27 +10:00
Armando C. Santisbon
af98524179
Merge branch 'lstein:main' into main 2022-09-17 13:42:38 -05:00
tildebyte
e994073b5b
fix(ci): Cherry-pick new CI to main (#646)
* 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>
2022-09-17 14:12:14 -04:00
Lincoln Stein
ad292b095d minor fix to ldm.dream.args
- If no list of seeds is provided to metadata_dumps(), then the contents
of the Args object's seed attribute are used.
2022-09-17 13:44:39 -04:00
Lincoln Stein
d8685ad66b Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-17 13:29:21 -04:00
Lincoln Stein
239f41f3e0 add sd-metadata metadata_loads() and metadata_dumps() functions 2022-09-17 13:28:37 -04:00
Mihail Dumitrescu
e0951f28cf Refactor attention.CrossAttention to remove duplicate code and apply optimizations
Apply ~6% speedup by moving * self.scale to earlier on a smaller tensor.
When we have enough VRAM don't make a useless zeros tensor.
Switch between cuda/mps/cpu based on q.device.type to allow cleaner per architecture future optimizations.
For cuda and cpu keep VRAM usage and faster slicing consistent.
For cpu use smaller slices. Tested ~20% faster on i7, 9.8 to 7.7 s/it.
Fix = typo to self.mem_total >= 8 in einsum_op_mps_v2 as per #582 discussion.
2022-09-17 20:19:21 +03:00