Commit Graph

321 Commits

Author SHA1 Message Date
d5209965bc Merge branch 'development' into development 2022-09-20 17:40:21 -04:00
d176fb07cd Replace --full_precision with --precision that works even if not specified
Allowed values are 'auto', 'float32', 'autocast', 'float16'. If not specified or 'auto' a working precision is automatically selected based on the torch device.
Context: #526
Deprecated --full_precision / -F

Tested on both cuda and cpu by calling scripts/dream.py without arguments and checked the auto configuration worked. With --precision=auto/float32/autocast/float16 it performs as expected, either working or failing with a reasonable error. Also checked Img2Img.
2022-09-20 17:08:00 -04:00
e02bfd00a8 create ldm.dream.log 2022-09-20 16:54:50 -04:00
90d8f0af73 Merge branch 'development' of https://github.com/lstein/stable-diffusion into development 2022-09-20 16:32:00 -04:00
5f8f2e63eb Merge remote-tracking branch 'upstream/development' into development 2022-09-20 07:27:32 +10:00
8c72da3643 Merge remote-tracking branch 'upstream/development' into development 2022-09-19 15:48:22 -04:00
57577401bd Fixes metadata_loads() #686 2022-09-19 12:33:45 -04:00
58c63fe339 Merge branch 'development' of github.com:psychedelicious/stable-diffusion into psychedelicious-development 2022-09-19 12:27:42 -04:00
37c44ced1d Merge branch 'development' into development 2022-09-19 07:22:03 -04:00
2a6999d500 Fixes various issues with metadata handling 2022-09-19 17:38:56 +10:00
682d74754c Fixes metadata_loads() #686 2022-09-18 22:41:39 -04:00
dc024845cf Merge branch 'development' into development 2022-09-18 22:34:00 -04:00
94ca13c494 Fixes metadata_loads() #686 2022-09-19 12:33:37 +10:00
2743e17588 Fix token display when using -t
Add true weight used for subprompt
2022-09-18 21:25:27 -04:00
f0b500fba8 Fixes metadata implementation #686 2022-09-18 21:24:29 -04:00
aaec6baeca Add .gitkeep to the weights folder 2022-09-18 20:35:05 -04:00
3692f223e1 Merge branch 'development' into development 2022-09-18 18:58:04 -04:00
1e8e5245eb CLI writes prompt string metadata in same format as web server 2022-09-18 15:08:56 -04:00
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
c98ade9b25 Merge branch 'development' into development 2022-09-18 12:35:28 -04:00
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
d478a241a8 Merge branch 'development' into development 2022-09-18 09:20:13 -04:00
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
0b786f61cc Merge branch 'development' into development 2022-09-18 08:54:22 -04:00
b68cb521ba restore ability to save files to directories named after prompt (#654) 2022-09-18 08:37:08 -04:00
2f93418095 Merge branch 'development' into development 2022-09-17 20:35:48 -04:00
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
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
d8685ad66b Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-17 13:29:21 -04:00
239f41f3e0 add sd-metadata metadata_loads() and metadata_dumps() functions 2022-09-17 13:28:37 -04:00
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
7ade11c4f3 Merge branch 'development' into development 2022-09-17 12:29:25 -04:00
2faa116238 tidy up generation of prompt when variations in use 2022-09-17 11:59:47 -04:00
c94b8cd959 small bug fixes in prompt generation
- fixes no closing quote in pretty-printed dream_prompt string
- removes unecessary -f switch when txt2img used

In addition, this commit does an experimental commenting-out of the
random.seed() call in the variation-generating part of ldm.dream.generator.base.
This fixes the problem of two calls that use the same seed and -v0.1
generating different images (#641). However, it does not fix the issue
of two images generated using the same seed and -VXXXXXX being
different.
2022-09-17 10:18:55 -04:00
c06dc5b85b Merge branch 'development' into development 2022-09-17 08:43:15 -04:00
34fa6e38e7 fix long hex-encoded error message from legacy server
- closes issue #618
2022-09-17 08:39:20 -04:00
f8775f2f2d Merge branch 'development' into development 2022-09-17 03:45:14 -04:00
b3e026aa4e point legacy web server at legacy static files 2022-09-17 02:18:52 -04:00
b89aadb3c9 fix crash on second prompt #636 2022-09-17 00:57:35 -04:00
42072fc15c Bug Fixes 2022-09-17 14:12:35 +12:00
df4c80f177 respect --outdir again; fix issue #628 2022-09-16 19:58:45 -04:00
df95a7ddf2 respect --outdir again; fix issue #628 2022-09-16 19:58:16 -04:00
1e3200801f Merge remote-tracking branch 'upstream/development' into development 2022-09-16 19:29:08 -04:00
622db491b2 change tensor length to 768 per #572 2022-09-16 18:25:43 -04:00
ba4892e03f Zero-pad intermediate image file names (#616) 2022-09-16 17:32:18 -04:00
fe12c6c099 Squashed commit of the following:
commit 67fbaa7c31
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Sep 16 16:57:54 2022 -0400

    reconciled conflicting changes to pngwriter call

commit ddc68b01f7
Merge: f9feaac cbac95b
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Sat Sep 17 06:39:22 2022 +1000

    Merge remote-tracking branch 'upstream/development' into development

commit f9feaac8c7
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Sat Sep 17 06:16:16 2022 +1000

    Fixes metadata related to new args

commit d1de1e357a
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Sat Sep 17 06:15:55 2022 +1000

    Fixes PromptFormatter import bug
2022-09-16 16:58:16 -04:00
67fbaa7c31 reconciled conflicting changes to pngwriter call 2022-09-16 16:57:54 -04:00
ddc68b01f7 Merge remote-tracking branch 'upstream/development' into development 2022-09-17 06:39:22 +10:00
f9feaac8c7 Fixes metadata related to new args 2022-09-17 06:36:19 +10:00
cbac95b02a Merge with PR #602
- New and improved web api
- Author: @Kyle0654
2022-09-16 16:35:34 -04:00