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
Lincoln Stein
24ce56b3db
Merge branch 'webui-sampler-fix' into main
2022-08-29 19:25:49 -04:00
Lincoln Stein
81ad239197
Merge pull request #192 from david-ford/working-branch
...
Fix case sensitive check to be case insensitive
2022-08-29 17:48:12 -04:00
David Ford
ed38c97ed8
Removed unrelated changes and updated based on recommendation
...
Removed the changes to the index.html and .gitattributes for this PR. Will add them in separate PRs.
Applied recommended change for resolving the case issue.
2022-08-29 16:43:34 -05:00
Lincoln Stein
7fe7cdc8c9
Merge pull request #176 from xraxra/show-tokenization
...
Print out tokenization data during image generation, allowing truncated prompts to be visible.
2022-08-29 15:36:10 -04:00
Lincoln Stein
6fb2f1ed6e
fixes WebUI so that the selected sampler is actually applied
2022-08-29 14:06:18 -04:00
Lincoln Stein
38701a6d7b
Fix IndexError when generating grid; --grid option can now be passed on shell command line
2022-08-29 13:52:44 -04:00
David Ford
31fa92a83f
Fix case sensitive check to be case insensitive
...
Case sensitivity between os.getcwd and os.realpath can fail due to different drive letter casing. C:\ vs c:\. This change addresses that by normalizing the strings before comparing.
2022-08-29 12:46:24 -05:00
Lincoln Stein
0abfc3cac6
Merge branch 'main' of github.com:lstein/stable-diffusion into main
...
This fixes issue with grid generation.
2022-08-29 13:39:59 -04:00
Lincoln Stein
d483fcb53a
Merge pull request #166 from SMUsamaShah/patch-1
...
Bug fix in grid
2022-08-29 13:39:50 -04:00
Lincoln Stein
c7db038c96
grid is broken, needs the grid-fix PR#166 to fix
2022-08-29 13:39:20 -04:00
Lincoln Stein
4acfb76be6
correctly handle upscaling in webUI, including displaying status messages during GFPGAN/ESRGAN postprocessing
2022-08-29 12:08:18 -04:00
Lincoln Stein
fd13526454
Merge pull request #175 from bakkot/unicode
...
read/write plain text files in utf-8, not ascii
2022-08-29 07:03:55 -04:00
Lincoln Stein
7718af041c
Merge pull request #178 from lstein/dream-web-upscaling
...
FEAT: Dream web upscaling
2022-08-29 06:59:21 -04:00
tesseractcat
070795a3b4
webui: stream progress events to page
2022-08-28 21:54:10 -07:00
Lincoln Stein
46464ac677
remove unused metadatastr variable
2022-08-28 23:45:50 -04:00
Lincoln Stein
03d8eb19e0
when no callback used, modify results list so that upscaled/face-fixed image replaces the old one
2022-08-28 23:40:04 -04:00
xra
fef632e0e1
tokenization logging (take 2)
...
This adds an option -t argument that will print out color-coded tokenization, SD has a maximum of 77 tokens, it silently discards tokens over the limit if your prompt is too long.
By using -t you can see how your prompt is being tokenized which helps prompt crafting.
2022-08-29 12:28:49 +09:00
Lincoln Stein
05061a70b3
report errors on non-cuda systems rather than failing silently
2022-08-28 23:13:23 -04:00
Lincoln Stein
617a029ae7
pass outdir from txt2img() and img2img() to prompt2img() correctly
2022-08-28 23:12:49 -04:00
Kevin Gibbons
7ae79b350e
write log files in utf-8, not ascii
2022-08-28 20:00:11 -07:00
Lincoln Stein
18899be4ae
working, but there is a bug in underlying txt2png() call that is preventing upscaled images from being returned
2022-08-28 22:42:31 -04:00
blessedcoolant
41b26e0520
Merge pull request #171 from blessedcoolant/sampler-bug-fix
...
Fix sampler changer not working.
2022-08-29 13:06:30 +12:00
blessedcoolant
b6053108c1
Merge pull request #168 from blessedcoolant/bug-fixes
...
Fixed grid image not saving
2022-08-29 13:05:53 +12:00
blessedcoolant
f0e2fa781f
Grid image not saving after recent changes has been fixed.
2022-08-29 11:29:45 +12:00
blessedcoolant
87b7446228
Fix unique filename bug
2022-08-29 11:28:16 +12:00
blessedcoolant
8a517fdc17
Fix sampler changer not working.
2022-08-29 11:26:19 +12:00
Lincoln Stein
373a2d9c32
Merge branch 'main' of github.com:lstein/stable-diffusion into main
2022-08-28 19:03:45 -04:00
Lincoln Stein
b85773f332
resolved conflicts and write properly-formatted prompt string (with sampler & upscaling) into image file
2022-08-28 19:01:45 -04:00
Lincoln Stein
ddc0e9b4d8
Merge pull request #133 from bakkot/dir-traversal
...
prevent directory traversal in the web UI
2022-08-28 18:32:12 -04:00
Lincoln Stein
8bbe7936bd
close Issue #165
2022-08-28 18:21:20 -04:00
Kevin Gibbons
9e7865704a
prevent directory traversal in the web UI
2022-08-28 14:33:30 -07:00
Lincoln Stein
ac02a775e4
moved server.py into right location
2022-08-28 17:27:43 -04:00
Lincoln Stein
7c485a1a4a
adjusted -U upscaling argument so that it defaults to upscaling strength 0.75 if the second argument is not given
2022-08-28 17:26:39 -04:00
Lincoln Stein
ea2ee33be8
cosmetic fixup to how the outputs are reported
2022-08-28 17:06:33 -04:00
Lincoln Stein
7dfca3dcb5
moved scripts/dream_server.py into ldm/dream/server.py
2022-08-28 16:37:27 -04:00
blessedcoolant
6e49c070bb
Optimize and Improve GFPGAN and Real-ESRGAN Pipeline
2022-08-29 08:14:29 +12:00
Lincoln Stein
a7ac93a899
Merge pull request #110 from sajattack/half-precision-embeddings
...
Support full-precision embeddings in half precision inference mode
2022-08-28 15:36:26 -04:00
Lincoln Stein
3b2569ebdd
Merge branch 'yunsaki-main' into main
2022-08-28 14:20:48 -04:00
Lincoln Stein
8b9a520c5c
adjusted handling of from_file
2022-08-28 14:20:34 -04:00
Lincoln Stein
ba03289c14
print current and max VRAM usage stats after each round of generation
2022-08-28 13:05:01 -04:00
blessedcoolant
d1551b1bd4
Enable users to set sampler using prompts
2022-08-29 04:27:54 +12:00
Muhammad Usama
59be6c815d
bug fix in grid
...
In case of 6 images 3rd image was also copied to 4th box missing the last image in the grid.
2022-08-28 15:39:09 +01:00
Lincoln Stein
800132970e
Merge pull request #105 from shusso/select-device
...
Move torch.device selection to it's own function
2022-08-26 12:23:21 -04:00
Paul Sajna
555f13e469
Merge branch 'main' into half-precision-embeddings
2022-08-26 08:33:46 -07:00
Paul Sajna
9b5101cd8d
support full-precision embeddings in half precision mode
2022-08-26 08:30:58 -07:00
yun saki
5129f256a3
simplet2i: changed image file handling to work as stated in the [docs]( https://pillow.readthedocs.io/en/stable/reference/open_files.html )
2022-08-26 14:13:16 +02:00
Samuel Husso
ed72ff3268
Move torch.device selection to it's own function
2022-08-26 14:43:18 +03:00
Sean McLellan
f3fad22cb6
Fix
2022-08-26 05:27:34 -04:00
Sean McLellan
7bf0bc5208
fix comment
2022-08-26 04:08:18 -04:00
Sean McLellan
4e5aa7e714
fix comment
2022-08-26 04:07:01 -04:00
Sean McLellan
46a223f229
Double check for null and 0, and add a comment to indicate intent
2022-08-26 04:05:09 -04:00
Lincoln Stein
4f02b72c9c
prettified all the code using "blue" at the urging of @tildebyte
2022-08-26 03:15:42 -04:00
Lincoln Stein
dd670200bb
documentation tweaks for installation and running of the GFPGAN extension; now you have the ability to specify the previous image's seed with -S -1, the one before that with -S -2, and so forth
2022-08-26 02:17:14 -04:00
Lincoln Stein
8f89a2456a
something is not quite right; when providing -G1 option on one prompt, and then omitting it on the next, I see a "images do not match" error from GFPGAN
2022-08-26 01:20:01 -04:00
Sean McLellan
407d70a987
Fix backwards logic
2022-08-26 00:49:12 -04:00
Sean McLellan
f1ffb5b51b
Fix blend if the target image has been upscaled
2022-08-26 00:45:19 -04:00
Sean McLellan
4f1664ec4f
remove params
2022-08-26 00:41:41 -04:00
Sean McLellan
fcdd95b652
Refactor so that behavior is consolidated at top level
2022-08-26 00:39:57 -04:00
Sean McLellan
470a62dbbe
Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-gfpgan-option
2022-08-26 00:26:03 -04:00
Sean McLellan
cb86b9ae6e
Remove the redundancy, better logging
2022-08-25 23:48:35 -04:00
Sean McLellan
dbb9132f4d
Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-gfpgan-option
2022-08-25 23:19:17 -04:00
Sean McLellan
5711b6d611
Add optional GFPGAN support
2022-08-25 22:57:30 -04:00
Lincoln Stein
f1bed52530
moved dream utilities into their own subfolder
2022-08-25 22:49:15 -04:00
Lincoln Stein
c38b6964b4
improved inline error messages slightly
2022-08-25 22:19:12 -04:00
Kevin Gibbons
797de3257c
fix batch_size
2022-08-25 17:28:52 -07:00
Kevin Gibbons
31b22e057d
switch to generators
2022-08-25 17:06:06 -07:00
Kevin Gibbons
078859207d
factor out loop
2022-08-25 16:51:39 -07:00
Kevin Gibbons
a10baf5808
factor out exception handler
2022-08-25 15:13:07 -07:00
Lincoln Stein
19fa222810
refactoring complete; please test carefully!
2022-08-25 17:30:08 -04:00
Lincoln Stein
b3e3b0e861
feature complete; looks like ready for merge
2022-08-25 17:26:48 -04:00
Lincoln Stein
650ae3eb13
Merge pull request #89 from BlueAmulet/remove-accelerate
...
Remove accelerate library
2022-08-25 13:48:48 -04:00
BlueAmulet
b7735b3788
Fix attribution
2022-08-25 11:13:12 -06:00
BlueAmulet
39b55ae016
Remove accelerate library
...
This library is not required to use k-diffusion
Make k-diffusion wrapper closer to the other samplers
2022-08-25 11:04:57 -06:00
JigenD
e82c5eba18
PR revision: replace cuda call with dynamic type
2022-08-25 12:18:35 -04:00
Lincoln Stein
49247b4aa4
fix performance regression; closes issue #42
2022-08-25 09:41:12 -04:00
JigenD
eb58276a2c
fix VRAM utilization
2022-08-25 08:34:51 -04:00
Lincoln Stein
0b4459b707
mostly back to full functionality; just missing grid generation code
2022-08-25 00:42:37 -04:00
Lincoln Stein
b978536385
code is reorganized and mostly functional. Grid needs to be brought back online, as well as naming of img2img variants (currently the variants get written but not logged)
2022-08-24 19:47:59 -04:00
Lincoln Stein
9133087850
first draft at big refactoring; will be broken
2022-08-24 17:52:34 -04:00
Lincoln Stein
1eec6b776b
tweaked documentation and comments slightly
2022-08-24 15:25:52 -04:00
Sean McLellan
feea5fb063
Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-simple-variant-mechanism
2022-08-24 13:16:15 -04:00
Sean McLellan
b5cdbd3b0b
Fixes issue with cuda/current mismatch
2022-08-24 13:14:08 -04:00
Lincoln Stein
e043f238af
backed out change from PR #44 that was causing ddim sampler to fail with the message 'sqrt _vml_cpu not implemented for 'Half'
2022-08-24 13:10:42 -04:00
Lincoln Stein
47a5da25b7
runtime errors now produce a stack trace
2022-08-24 12:57:04 -04:00
Sean McLellan
c6b5e930dc
Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-simple-variant-mechanism
2022-08-24 12:06:29 -04:00
Sean McLellan
d33e1bf563
Add simple way to make variants
2022-08-24 12:02:36 -04:00
Lincoln Stein
c24a16ccb0
resolved merge conflicts
2022-08-24 11:50:48 -04:00
Lincoln Stein
9050ce152b
Fixed up a few merge conflicts, looks good so far
2022-08-24 11:29:32 -04:00
Lincoln Stein
73901a2777
Merge pull request #58 from nicolai256/main
...
init img didn't work in textual inversion, now it does :)
2022-08-24 11:24:30 -04:00
Lincoln Stein
7f4a5e946d
Merge branch 'tildebyte-feat-samplers-add-remaining-k' into main
...
This adds the remaining k_* samplers to the dream.py script.
2022-08-24 11:19:45 -04:00
Lincoln Stein
3393b8cad1
added assertion checks for out-of-bound arguments; added various copyright and license agreement files
2022-08-24 09:22:27 -04:00
Benjamin Warner
886f1c0138
Undo more 'cuda' hardcoding
2022-08-24 00:39:25 -05:00
nicolai256
9588444f0e
textual inversion + init img fix
2022-08-24 05:16:01 +02:00
Sean McLellan
24b11ecf9f
Fix silent SystemExit if embedding_path is not specified
2022-08-23 22:45:02 -04:00
Sean McLellan
84989f0d05
Remote token output on startup
2022-08-23 22:39:10 -04:00
Sean McLellan
611ccb991e
Remove another duplicate file
2022-08-23 18:31:41 -04:00
Sean McLellan
bde956647f
Remove duplicate t2i file
2022-08-23 18:29:50 -04:00
Sean McLellan
8952196bbf
Add personalization
2022-08-23 18:26:28 -04:00
Ben Alkov
050dffd269
feat(samplers): add ability use all k_* samplers
...
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-08-23 17:26:22 -04:00
Benjamin Warner
de1cea92ce
Small QoL imporvements
2022-08-23 12:49:17 -05:00
Lincoln Stein
716dbbdf8c
resolved conflicts in README changelog
2022-08-23 10:40:22 -04:00
Lincoln Stein
dc788f92b3
in output directory, new image files always start with the number higher than the previous maximum filename to ensure alphabetic sort==chronological sort
2022-08-23 10:19:11 -04:00
Lincoln Stein
9d1343dce3
resolved conflicts and tested
2022-08-23 01:44:43 -04:00
Lincoln Stein
11c0df07b7
prompt weighting not working
2022-08-23 01:23:14 -04:00
Lincoln Stein
ca8a799373
Merge pull request #24 from bakkot/patch-1
...
Fix usage of simplified API in readme
2022-08-23 01:02:13 -04:00
Lincoln Stein
710b908290
Keyboard interrupt retains seed and log information in files produced prior to interrupt. Closes #21
2022-08-23 00:51:38 -04:00
Kevin Gibbons
c80ce4fff5
fix default config to match docs / dream.py
2022-08-22 21:46:22 -07:00
Lincoln Stein
6d1219deec
fixed filenames
2022-08-22 23:56:36 -04:00
Lincoln Stein
a20827697c
adjusted instructions for the released stable-diffusion-v1 weights
2022-08-22 15:33:27 -04:00
xra
e4eb775b63
added optional parameter to skip subprompt weight normalization
...
allows more control when fine-tuning
2022-08-23 00:03:32 +09:00
xra
a3632f5b4f
improved comments & added warning if value couldn't be parsed correctly
2022-08-22 23:32:01 +09:00
xra
2736d7e15e
optional weighting for creative blending of prompts
...
example: "an apple: a banana:0 a watermelon:0.5"
the above example turns into 3 sub-prompts:
"an apple" 1.0 (default if no value)
"a banana" 0.0
"a watermelon" 0.5
The weights are added and normalized
The resulting image will be: apple 66%, banana 0%, watermelon 33%
2022-08-22 22:59:06 +09:00
Lincoln Stein
aa2729d868
user's prompt is now normalized for reproducibility and written into the destination PNG file as a tEXt metadata chunk named "Dream". You can retrieve the prompt with an image editing program that supports browsing the full metadata, or with the images2prompt.py script located in 'scripts'
2022-08-22 00:12:16 -04:00
Lincoln Stein
5f352aec87
test of normalization of prompt
2022-08-21 22:48:40 -04:00
Lincoln Stein
f5450bad61
k_lms sampling working; half precision working, can override with --full_precision
2022-08-21 20:16:31 -04:00
Lincoln Stein
78aba5b770
preparing for merge into main
2022-08-21 19:57:48 -04:00
Lincoln Stein
bb91ca0462
first attempt to fold k_lms changes proposed by hwharrison and bmaltais
2022-08-21 17:09:00 -04:00
xra
a5fb8469ed
use Half precision for reduced memory usage & faster speed
...
This allows users with 6 & 8gb cards to run 512x512 and for even larger resolutions for bigger GPUs
I compared the output in Beyond Compare and there are minor differences detected at tolerance 3, but side by side the differences are not perceptible.
2022-08-19 17:23:43 +09:00
Lincoln Stein
2b2ebd19e7
fixed a typo that introduced a crash
2022-08-18 13:47:07 -04:00
Lincoln Stein
87fb4186d4
folded in changes from img2img-dev
2022-08-18 12:45:02 -04:00
Lincoln Stein
750408f793
added command-line completion
2022-08-18 12:43:59 -04:00
Lincoln Stein
bf76c4f283
img2img is now working; small refactoring of grid code in simplet2i.py
2022-08-18 10:47:53 -04:00
Lincoln Stein
831bbd7a54
improved error reporting when a missing online dependency can't be downloaded
2022-08-17 18:06:30 -04:00
Lincoln Stein
c477525036
catch and handle malformed user inputs; documentation fixes
2022-08-17 12:35:49 -04:00
Lincoln Stein
a7532b386a
simplified instructions to preload Bert and kornia prerequisites; fixed --grid and --batch handling; added timing information after image generation
2022-08-17 12:00:00 -04:00
Lincoln Stein
d6124c44a3
added customized patches and updated the README
2022-08-16 21:34:37 -04:00
Robin Rombach
2ff270f4e0
stable diffusion
2022-08-10 16:30:49 +02:00
rromb
f13bf9bf46
add vqgan loss with codebook statistic eval
2022-02-21 15:06:50 +01:00
Robin Rombach
2b46bcb98c
Update ddpm.py
...
clean up no.1
2022-01-17 21:24:19 +01:00
ablattmann
171cf29fb5
add configs for training unconditional/class-conditional ldms
2021-12-22 15:57:23 +01:00
ablattmann
e66308c7f2
add code
2021-12-21 03:23:41 +01:00