Commit Graph

64 Commits

Author SHA1 Message Date
Peter Baylies
6142cf25cc * Bug fixes 2022-09-21 09:12:32 -04:00
Peter Baylies
60f0090786
Merge branch 'development' into development 2022-09-21 03:10:49 -04:00
blessedcoolant
1b5013ab72 GFPGAN and Real ESRGAN Implementation Refactor 2022-09-20 23:37:19 -04:00
Peter Baylies
2f93418095
Merge branch 'development' into development 2022-09-17 20:35:48 -04:00
Lincoln Stein
239f41f3e0 add sd-metadata metadata_loads() and metadata_dumps() functions 2022-09-17 13:28:37 -04:00
Peter Baylies
c06dc5b85b
Merge branch 'development' into development 2022-09-17 08:43:15 -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
Peter Baylies
f8775f2f2d
Merge branch 'development' into development 2022-09-17 03:45:14 -04:00
Lincoln Stein
b3e026aa4e point legacy web server at legacy static files 2022-09-17 02:18:52 -04:00
Lincoln Stein
df4c80f177 respect --outdir again; fix issue #628 2022-09-16 19:58:45 -04:00
Peter Baylies
1e3200801f Merge remote-tracking branch 'upstream/development' into development 2022-09-16 19:29:08 -04:00
Kevin Schaul
ba4892e03f
Zero-pad intermediate image file names (#616) 2022-09-16 17:32:18 -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
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
Peter Baylies
9a8fecb2cb
Merge branch 'development' into development 2022-09-16 08:52:27 -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
Peter Baylies
357e1ad35f
Merge branch 'development' into development 2022-09-15 09:59:11 -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
William Becher
30e69f8b32
Fix image location on webpage - windows (#568) 2022-09-15 07:40:27 -04:00
Peter Baylies
80579a30e5
Merge branch 'development' into development 2022-09-14 07:10:39 -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
Peter Baylies
c41599746d
Merge branch 'development' into development 2022-09-09 00:19:17 -04:00
Lincoln Stein
c85ae00b33 fix bug which caused seed to get "stuck" on previous image even when UI specified -1 2022-09-08 23:57:45 -04:00
Peter Baylies
7f0cc7072b
Merge branch 'development' into development 2022-09-08 22:54:26 -04:00
Lincoln Stein
33874bae8d Squashed commit of the following:
commit afee7f9cea
Merge: 6531446 171f8db
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 22:14:32 2022 -0400

    Merge branch 'development' of github.com:deNULL/stable-diffusion into deNULL-development

commit 171f8db742
Author: Denis Olshin <me@denull.ru>
Date:   Thu Sep 8 03:15:20 2022 +0300

    saving full prompt to metadata when using web ui

commit d7e67b62f0
Author: Denis Olshin <me@denull.ru>
Date:   Thu Sep 8 01:51:47 2022 +0300

    better logic for clicking to make variations
2022-09-08 22:16:29 -04:00
Peter Baylies
ab39bc0bac
Merge branch 'development' into development 2022-09-07 23:15:09 -04:00
Lincoln Stein
5c6b612a72 fix bug that caused same seed to be redisplayed repeatedly 2022-09-07 22:50:55 -04:00
Johan Roxendal
56f155c590
added support for parsing run log and displaying images in the frontend init state (#410)
Co-authored-by: Johan Roxendal <johan.roxendal@litteraturbanken.se>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-07 22:50:06 -04:00
Peter Baylies
bd4fc64156
Merge branch 'development' into development 2022-09-07 21:30:39 -04:00
Lincoln Stein
d1d044aa87
actual image seed now written into web log rather than -1 (#428) 2022-09-07 17:56:59 -04:00
Peter Baylies
a48c03e0f4
Merge branch 'development' into development 2022-09-06 17:25:28 -04:00
Lincoln Stein
f6284777e6 Squashed commit of the following:
commit 7d1344282d942a33dcecda4d5144fc154ec82915
Merge: caf4ea3 ebeb556
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 5 10:07:27 2022 -0400

    Merge branch 'development' of github.com:WebDev9000/stable-diffusion into WebDev9000-development

commit ebeb556af9
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 18:05:15 2022 -0700

    Fixed unintentionally removed lines

commit ff2c4b9a1b
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 17:50:13 2022 -0700

    Add ability to recreate variations via image click

commit c012929cda
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 14:35:33 2022 -0700

    Add files via upload

commit 02a6018992
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 14:35:07 2022 -0700

    Add files via upload
2022-09-06 17:12:39 -04:00
Peter Baylies
7ff94383ce Merge branch 'development' of https://github.com/lstein/stable-diffusion into development 2022-09-05 22:57:03 -04:00
Peter Baylies
0891910cac * Updates for thresholding and perlin noise options, added warmup for thresholding. 2022-09-05 21:40:05 -04:00
Lincoln Stein
720e5cd651
Refactoring simplet2i (#387)
* start refactoring -not yet functional

* first phase of refactor done - not sure weighted prompts working

* Second phase of refactoring. Everything mostly working.
* The refactoring has moved all the hard-core inference work into
ldm.dream.generator.*, where there are submodules for txt2img and
img2img. inpaint will go in there as well.
* Some additional refactoring will be done soon, but relatively
minor work.

* fix -save_orig flag to actually work

* add @neonsecret attention.py memory optimization

* remove unneeded imports

* move token logging into conditioning.py

* add placeholder version of inpaint; porting in progress

* fix crash in img2img

* inpainting working; not tested on variations

* fix crashes in img2img

* ported attention.py memory optimization #117 from basujindal branch

* added @torch_no_grad() decorators to img2img, txt2img, inpaint closures

* Final commit prior to PR against development
* fixup crash when generating intermediate images in web UI
* rename ldm.simplet2i to ldm.generate
* add backward-compatibility simplet2i shell with deprecation warning

* add back in mps exception, addresses @vargol comment in #354

* replaced Conditioning class with exported functions

* fix wrong type of with_variations attribute during intialization

* changed "image_iterator()" to "get_make_image()"

* raise NotImplementedError for calling get_make_image() in parent class

* Update ldm/generate.py

better error message

Co-authored-by: Kevin Gibbons <bakkot@gmail.com>

* minor stylistic fixes and assertion checks from code review

* moved get_noise() method into img2img class

* break get_noise() into two methods, one for txt2img and the other for img2img

* inpainting works on non-square images now

* make get_noise() an abstract method in base class

* much improved inpainting

Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
2022-09-05 20:40:10 -04:00
thealanle
1ad2a8e567
Fix --outdir function for web (#373)
* Fix --outdir function for web

* Removed unnecessary hardcoded path
2022-09-05 20:35:04 -04:00
Kevin Gibbons
95c088b303
Revert "Add CORS headers to dream server to ease integration with third-party web interfaces" (#371)
This reverts commit 91e826e5f4.
2022-09-04 22:04:14 -04:00
Lincoln Stein
3a2be621f3
Merge branch 'development' into main 2022-09-04 08:15:51 -04:00
Sebastian Aigner
91e826e5f4 Add CORS headers to dream server to ease integration with third-party web interfaces 2022-09-04 10:22:54 +02:00
Lincoln Stein
d0d95d3a2a make initimg appear in web log 2022-09-03 14:10:31 -04:00
Lincoln Stein
a01b7bdc40 add web interface for seamless option 2022-09-03 13:43:04 -04:00
Lincoln Stein
28fe84177e optionally scale initial image to fit box defined by width x height
* This functionality is triggered by the --fit option in the CLI (default
false), and by the "fit" checkbox in the WebGUI (default True)

* In addition, this commit contains a number of whitespace changes to
make the code more readable, as well as an attempt to unify the visual
appearance of info and warning messages.
2022-09-01 00:52:43 -04:00
Mikhail Tishin
b622819051
Expose img2img strength parameter in Web UI (#239)
* Expose img2img strength parameter in Web UI

* Fix strength label id

Co-authored-by: Mikhail Tishin <michail.tishin@fayrix.com>
Co-authored-by: Kevin Gibbons https://github.com/bakkot
2022-08-31 11:18:32 -04:00
Kevin Gibbons
b983d61e93 tweak format of "result" event in web ui 2022-08-30 22:03:53 -07:00
Kevin Gibbons
153c93bdd4 refactor pngwriter 2022-08-30 22:03:51 -07:00
Kevin Gibbons
1714816fe2
remove support for batch_size from dream.py (#227)
* remove dream.py support for batch_size

* expect to get a single image
2022-08-30 22:30:12 -04:00
Kevin Gibbons
8ca4d6542d
support progress for img2img (#215)
WebGUI shows progress bar when an initial image is provided.
2022-08-30 15:36:12 -04:00
Kevin Gibbons
5d13207aa6 webui: support cancelation 2022-08-30 08:55:40 -07:00
Kevin Gibbons
0173d3a8fc stream images 2022-08-29 16:33:31 -07:00
Kevin Gibbons
a7a62d39d4 webui: hide gfpgan if not installed 2022-08-29 16:27:44 -07:00