Commit Graph

638 Commits

Author SHA1 Message Date
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
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
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
Ben Alkov
100f2e8f57 toil(docs): readme - remove remaining markdown warts, HTML
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-17 13:00:37 -04:00
Lincoln Stein
2faa116238 tidy up generation of prompt when variations in use 2022-09-17 11:59:47 -04:00
Lincoln Stein
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
Lincoln Stein
34fa6e38e7 fix long hex-encoded error message from legacy server
- closes issue #618
2022-09-17 08:39:20 -04:00
Lincoln Stein
9461c8127d upgrade Pillow 2022-09-17 02:44:31 -04:00
Lincoln Stein
b5ed668eff small legacy web appearance tweaks 2022-09-17 02:44:07 -04:00
Lincoln Stein
b3e026aa4e point legacy web server at legacy static files 2022-09-17 02:18:52 -04:00
Lincoln Stein
89540f293b Restored static files needed for new flask/react web server
WARNING: old web server will no longer display correct interface.
2022-09-17 02:01:55 -04:00
Lincoln Stein
31daf1f0d7 preload_models.py now downloads gfpgan model 2022-09-17 01:32:31 -04:00
Lincoln Stein
5b692f4720 include width and height in png dream prompt 2022-09-17 01:14:00 -04:00
Lincoln Stein
b89aadb3c9 fix crash on second prompt #636 2022-09-17 00:57:35 -04:00
Lincoln Stein
994c6b7512
Merge branch 'development' into bug-fixes 2022-09-16 23:08:02 -04:00
blessedcoolant
42072fc15c Bug Fixes 2022-09-17 14:12:35 +12:00
tildebyte
fefcdffb55
fix(readme): switch last-commit badge to last DEV commit (#626)
- switch badge service to badgen, as I couldn't figure out shields.io

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

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-16 20:21:19 -04:00
Lincoln Stein
61f46cac31 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-16 19:59:17 -04:00
Lincoln Stein
df4c80f177 respect --outdir again; fix issue #628 2022-09-16 19:58:45 -04:00
Lincoln Stein
df95a7ddf2 respect --outdir again; fix issue #628 2022-09-16 19:58:16 -04:00
Lincoln Stein
622db491b2 change tensor length to 768 per #572 2022-09-16 18:25:43 -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
SteveCaruso
40b61870f6
update Intel Mac instructions (#599)
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-16 17:42:21 -04:00
冯不游
6cab2e0ca0
refine env rebuild tip (#611) 2022-09-16 17:32:52 -04:00
Kevin Schaul
ba4892e03f
Zero-pad intermediate image file names (#616) 2022-09-16 17:32:18 -04:00
Lincoln Stein
6cb6c4a911 restore static files for old web server 2022-09-16 17:27:08 -04:00
Lincoln Stein
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
Lincoln Stein
cbac95b02a Merge with PR #602
- New and improved web api
- Author: @Kyle0654
2022-09-16 16:35:34 -04:00
Lincoln Stein
00d2d0e90e Flask/React web server now merged, but needs fixes.
* due to changes in the metadata written to PNG files, web server cannot
display images
* issue is identified and will be fixed in next 24h
* Python 3.9 required for flask/react web server; environment must be
updated.
2022-09-16 14:54:19 -04:00
psychedelicious
d1a2c4cd8c
React web UI with flask-socketio API (#429)
* Implements rudimentary api
* Fixes blocking in API
* Adds UI to monorepo > src/frontend/
* Updates frontend/README
* Reverts conda env name to `ldm`
* Fixes environment yamls
* CORS config for testing
* Fixes LogViewer position
* API WID
* Adds actions to image viewer
* Increases vite chunkSizeWarningLimit to 1500
* Implements init image
* Implements state persistence in localStorage
* Improve progress data handling
* Final build
* Fixes mimetypes error on windows
* Adds error logging
* Fixes bugged img2img strength component
* Adds sourcemaps to dev build
* Fixes missing key
* Changes connection status indicator to text
* Adds ability to serve other hosts than localhost
* Adding Flask API server
* Removes source maps from config
* Fixes prop transfer
* Add missing packages and add CORS support
* Adding API doc
* Remove defaults from openapi doc
* Adds basic error handling for server config query
* Mostly working socket.io implementation.
* Fixes bug preventing mask upload
* Fixes bug with sampler name not written to metadata
* UI Overhaul, numerous fixes

Co-authored-by: Kyle Schouviller <kyle0654@hotmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-16 13:18:15 -04:00
Lincoln Stein
403d02d94f
implementation of RFC #266 (#587)
* Feature complete for #266 with exception of several small deviations:
1. initial image and model weight hashes use full sha256 hash rather than first 8 digits
2. Initialization parameters for post-processing steps not provided
3. Uses top-level "images" tags for both a single image and a grid of images. This change was suggested in a comment.

* Added scripts/sd_metadata.py to retrieve and print metadata from PNG files
* New ldm.dream.args.Args class is a namespace like object which holds all defaults and can be modified during exection to hold current settings.
* Modified dream.py and server.py to accommodate Args class.
2022-09-16 13:09:04 -04:00
tildebyte
45af30f3a4
fix(install): unpinned 'protobuf' breaks macOS installs (#596)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-16 07:39:23 -04:00
CapableWeb
58baf9533b
Make API return error before raising error again (#606)
This change makes it so any API clients can show the same error as what
happens in the terminal where you run the API. Useful for various WebUIs
to display more helpful error messages to users.

Co-authored-by: CapableWeb <capableweb@domain.com>
2022-09-16 07:33:42 -04:00
ArDiouscuros
f9b272a7b9
Update to exclude GTX 16xx from autocast selection (#576)
* Update to exclude GTX 1660/1650 from autocast selection
2022-09-15 19:29:19 -04:00
Matthias Wild
e6011631a1
Mkdocs material (#593)
* Squashed commit of the following:

commit 82d9c25d9a
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:29:11 2022 +0200

    fix branch name in mkdocs-flow

commit 2e276cecc1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:28:35 2022 +0200

    fix theme name

commit 2eb77c1173
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:14:42 2022 +0200

    fixed some links and formating in main README

commit 66a7152e48
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 08:58:58 2022 +0200

    trigger mkdocs deployment on main

commit 897cc373ce
Merge: 89da371 3b5a830
Author: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Date:   Wed Sep 14 07:51:23 2022 +0200

    Merge pull request #1 from mauwii/mkdocs

    Mkdocs

commit 3b5a8308eb
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:42:56 2022 +0200

    huge update
    I was pretty busy trying to make the Readmes / docs  look good in MkDocs

commit 0b4f5a926f
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:41:45 2022 +0200

    update mkdocs config

commit 872172ea70
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:33:49 2022 +0200

    added the mkdocs-git-revision-date-plugin

commit eac81bf875
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 06:46:43 2022 +0200

    add  prettier config
    remove markdownlint
    move and rename requirements-mkdocs.txt

commit b36d4cc088
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 02:06:39 2022 +0200

    add dark theme

commit a14f18fede
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:38:02 2022 +0200

    update mkdocs flow and config

commit 2764b48693
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:15:33 2022 +0200

    add mkdocs workflow

commit 1bd22523b1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 00:57:37 2022 +0200
    I already begun with formating /  revising the sites

* change repository in mkdocs config to lstein

* adapt changes from repos main README.md

* add PR to mkdocs-flow

* update docs/index.md
- removed unecessary headlines
- added instructions how to host the docs locally
- removed TOC since it is already available via MkDocs
- update appearance of the latest changes

* Update appearance of docs/featuers/changelog

* add me to the contributors
and a small cosmetical change to docs/other/CLI.md

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-15 14:35:22 -04:00
Any-Winter-4079
60b731e7ab
Update dream.py. k_euler_a and k_dpm_2_a M1 fix (#579)
* Update dream.py. k_euler_a and k_dpm_2_a M1 fix

Make results reproducible (so runs with the same seed produce the same result).
Implements fix by @wbowling referenced in https://github.com/lstein/stable-diffusion/issues/397#issuecomment-1240679294

* Update dream.py. Remove import torch from dream.py

* generate.py: k_euler_a and k_dpm_2_a M1 fix #579

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-15 11:02:17 -04:00
Matthias Wild
ec2dc24ad7
Mkdocs-material (#575)
* Squashed commit of the following:

commit 82d9c25d9a
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:29:11 2022 +0200

    fix branch name in mkdocs-flow

commit 2e276cecc1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:28:35 2022 +0200

    fix theme name

commit 2eb77c1173
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:14:42 2022 +0200

    fixed some links and formating in main README

commit 66a7152e48
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 08:58:58 2022 +0200

    trigger mkdocs deployment on main

commit 897cc373ce
Merge: 89da371 3b5a830
Author: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Date:   Wed Sep 14 07:51:23 2022 +0200

    Merge pull request #1 from mauwii/mkdocs

    Mkdocs

commit 3b5a8308eb
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:42:56 2022 +0200

    huge update
    I was pretty busy trying to make the Readmes / docs  look good in MkDocs

commit 0b4f5a926f
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:41:45 2022 +0200

    update mkdocs config

commit 872172ea70
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:33:49 2022 +0200

    added the mkdocs-git-revision-date-plugin

commit eac81bf875
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 06:46:43 2022 +0200

    add  prettier config
    remove markdownlint
    move and rename requirements-mkdocs.txt

commit b36d4cc088
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 02:06:39 2022 +0200

    add dark theme

commit a14f18fede
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:38:02 2022 +0200

    update mkdocs flow and config

commit 2764b48693
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:15:33 2022 +0200

    add mkdocs workflow

commit 1bd22523b1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 00:57:37 2022 +0200
    I already begun with formating /  revising the sites

* change repository in mkdocs config to lstein

* adapt changes from repos main README.md

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-15 10:53:41 -04:00
Lincoln Stein
9df743e2bf
Web cleanup (#539)
* Refactor generate.py and dream.py

* config file path (models.yaml) is parsed inside Generate() to simplify
API

* Better handling of keyboard interrupts in file loading mode vs
interactive

* Removed oodles of unused variables.

* move nonfunctional inpainting out of the scripts directory

* fix ugly ddim tqdm formatting

* fix embiggen breakage, formatting fixes
2022-09-15 07:43:43 -04:00
Mihai
ccb2b7c2fb
Use cuda only when available in main.py. (#567)
Allows testing textual inversion / training flow on cpu only (very slow though).
Context: #508
2022-09-15 07:41:24 -04:00
William Becher
30e69f8b32
Fix image location on webpage - windows (#568) 2022-09-15 07:40:27 -04:00
Claus F. Strasburger
df4d1162b5
docs: VARIATIONS.md used wrong syntax in examples (#589) 2022-09-15 07:21:17 -04:00
Mihai
dd3fff1d3e
~7% speedup by switch to += in ldm.modules.attention. (#569)
Tested on 8GB eGPU nvidia setup so YMMV.
Re-land with .clone() fix, context #508
2022-09-14 18:10:33 -04:00
Lincoln Stein
94a7b3cc07 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-14 10:05:32 -04:00
Robert Bolender
b02ea331df
Clarify behavior of -v and -n parameters (#551)
Fixes https://github.com/lstein/stable-diffusion/issues/544
2022-09-14 09:47:17 -04:00
Lincoln Stein
9208bfd151 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-14 07:13:32 -04:00
Lincoln Stein
5818528aa6
fix web server handling of rel and abs outdir paths (#550)
* fix web server handling of rel and abs outdir paths
* Can now specify either a relative or absolute path for outdir
* Outdir path does not need to be inside the stable-diffusion directory
* Closes security hole that allowed user to read any file within
stable-diffusion (eek!)
* Closes #536
2022-09-14 07:09:01 -04:00