Commit Graph

171 Commits

Author SHA1 Message Date
oldfndm
0aa9727f6c feat(): add mask blur strength slider 2022-08-27 00:53:36 +01:00
hlky
78d136e9f2
glob functionality using listdir 🔥 2022-08-27 00:52:56 +01:00
Torbjörn Lönnemark
6d5ac72790 Fix seed conversion
Max value for a 32bit unsigned int is 2**32 - 1, not 2**32 (and the
range of possible values returned by randint includes both of its
arguments).

Python's hash() function is not deterministic across different
invocations of the interpreter. This meant a given string seed would
produce different results after restarting the script. Use the passed
strings to seed a Random instance instead.
2022-08-27 00:19:41 +01:00
oldfndm
ab9f89a585 feat(): add advanced editor 2022-08-27 00:08:15 +01:00
hlky
d310ca68b9 CPU support for RealESRGAN/GFPGAN 💻
Also, a new way to set gpu device for RealESRGAN/GFPGAN

Usage:
--extra-models-cpu
or a combination of
--gfpgan-cpu and --esrgan-cpu
2022-08-26 22:44:57 +01:00
hlky
ee5537d8f4 GFPGAN/RealESRGAN CPU support
Test on this branch for now until I add a cli argument
Tested working on my machine, RealESRGAN ran on CPU, result attached to #81
2022-08-26 22:44:57 +01:00
Craftyawesome
d973e5c6d1 Use GC before GAN 2022-08-26 22:17:24 +01:00
hlky
a7fa62bbfe Revert to os.listdir() 2022-08-26 21:49:08 +01:00
Steve Stavropoulos
1f4a0eb310 Make --gpu argument use the correct GPU 2022-08-26 21:41:19 +01:00
hlky
51edb7259e Possible fix 2022-08-26 21:41:19 +01:00
hlky
e655d4f58f
🔴 💚 2022-08-26 20:35:26 +01:00
hlky
0b6811464a
stderr + part of flagging got deleted?? 2022-08-26 20:33:13 +01:00
hlky
87f8712f53
defaults 2022-08-26 20:29:26 +01:00
hlky
7b44c49680
fix conflicts 2022-08-26 20:26:10 +01:00
hlky
18415d704f
Revert "Merge branch 'master' into patch-1"
This reverts commit f13f810af7, reversing
changes made to 4f8dd02ccb.
2022-08-26 20:22:25 +01:00
hlky
f13f810af7
Merge branch 'master' into patch-1 2022-08-26 20:20:57 +01:00
JohannesGaessler
a167ac9860 Fixed setting environmental variable on Linux 2022-08-26 20:18:28 +01:00
Georg Zoeller
4f8dd02ccb
Adding .png metadata
This may open the option to read data from images dragged into the tool later.  Activated with --save_metadata

Properties (example output from imagemagic 'identify -verbose' command:
    SD:cfg_scale: 7.5
    SD:GFPGAN: False
    SD:height: 512
    SD:normalize_prompt_weights: True
    SD:prompt: a beautiful matte painting of a cottage on a magical fantasy island, unreal engine, barometric projection, rectilinear
    SD:seed: 247624793
    SD:steps: 50
    SD:width: 512
2022-08-27 03:08:15 +08:00
hlky
187c77e9c7 force GFPGAN/RealESRGAN to selected gpu 2022-08-26 19:58:01 +01:00
_nderscore
63f16a2b25 fix: prevent memory monitoring from breaking on non-nvidia gpus 2022-08-26 19:58:01 +01:00
_nderscore
a8bf8941b1 feat: add --gpu argument for users with multiple gpus 2022-08-26 19:58:01 +01:00
JohannesGaessler
33eac66a85 Fixed config values not being applied 2022-08-26 19:38:11 +01:00
JohannesGaessler
cab0681bb5 Working glob pattern for counting png files 2022-08-26 16:49:58 +01:00
hlky
f5228aadf6
jpg samples 🔥
#15 implemented
2022-08-26 16:38:24 +01:00
oldfndm
46d6740f02 fix(): fix mask errors when sending 2022-08-26 15:30:11 +01:00
hlky
ec43d18ee5
fix pr 🐸 2022-08-26 15:14:40 +01:00
JohannesGaessler
b57d2bc3c9 separate output directories, sample info files 2022-08-26 15:11:34 +02:00
hlky
1d4ece76b8
Disable telemetry + add title
#62 implemented
2022-08-26 13:12:08 +01:00
hlky
d184f373fc
Merge branch 'master' into 55-realesrgan-support 2022-08-26 11:47:20 +01:00
chanoc
164b318fb4 Update copy-paste generation parameters to reflect RealESRGAN usage
Fix minor error in README
2022-08-26 03:02:04 -07:00
chanoc
601b176a18 Add support for RealESRGAN upscaling 2022-08-26 02:37:35 -07:00
Sam Green
844311fe7b Add support for configuring defaults. 2022-08-26 04:28:36 +01:00
oldfndm
524bdfe731 feat(): add copy to img2img 2022-08-25 22:49:23 -04:00
oldfndm
73d5588723 fix(): fix error when generating from crop mode 2022-08-25 21:59:54 -04:00
oldfndm
7eea0a2906 fix whitespace 2022-08-25 21:36:39 -04:00
oldfndm
2171399708 feat(): copy output image to input 2022-08-25 21:18:50 -04:00
oldfndm
f12de25a58 feat(): add cropping 2022-08-25 21:18:48 -04:00
oldfndm
3f7864115f feat(): migrate from interface to blocks 2022-08-25 21:16:35 -04:00
hlky
92bb0c7fb0
🔥 Random loopback seed Merge pull request #39 from hlky/32-loopback-should-have-the-option-to-randomize-seed
🔥 Random loopback seed   #32 implemented
2022-08-26 00:06:03 +01:00
Torbjörn Lönnemark
0d6e2ae144 Fix font loading on linux
If loading Arial fails, try loading a font commonly installed on Linux
distros.

This means it continues to work on Windows, and will also just work on
most Linux machines (DejaVu Sans is widely available and often installed
by default).
2022-08-26 00:10:49 +02:00
hlky
1879e76be1
Update webui.py 2022-08-25 22:55:00 +01:00
hlky
9c780e1d18
Fix #36 📓 2022-08-25 22:52:06 +01:00
oldfndm
f3ea97ddbc feat(): force bigger image input box 2022-08-25 17:42:42 -04:00
hlky
e62ef1bb67
Loopback random seed 2022-08-25 22:07:23 +01:00
hlky
770ead14f0
Possible fix 2022-08-25 17:59:57 +01:00
hlky
f0287a33d2
🔥 Scripting support for txt2img 🔥 - Merge pull request #22 from JohannesGaessler/scripting
🔥 Scripting support for txt2img 🔥
2022-08-25 14:58:29 +01:00
EyeDeck
f63b294b87 add missing selfs 2022-08-25 08:31:44 -04:00
JohannesGaessler
0d133e05f4 Scripting support for txt2img 2022-08-25 14:20:29 +02:00
EyeDeck
5e9ed5961d Workaround for Gradio server hanging on keyboard interrupt
Moved the demo.launch() call to start up a new thread, so we can kill the process ourselves on keyboard interrupt
2022-08-25 08:08:24 -04:00
hlky
2b264de644
Update webui.py 2022-08-25 11:40:01 +01:00
EyeDeck
67130cf1ff Update webui.py 2022-08-25 04:12:10 -04:00
EyeDeck
60cd83aa03 Fix crash when cfg_scale == 1.0 2022-08-25 02:28:01 -04:00
EyeDeck
13c818053a Update webui.py
the same commit I made last time
2022-08-25 01:47:01 -04:00
hlky
c2ccff1684
🐸 work WITHOUT a mask
keep_mask default should be FALSE
🐸
2022-08-25 06:06:54 +01:00
hlky
e34c6a8b7e
,,,,,, 🐸 👎 2022-08-25 06:01:15 +01:00
hlky
58f11b34e8
🐸 🐸 🐸 2022-08-25 05:52:17 +01:00
hlky
2f2d78956f
Revert "Revert "Update webui.py""
This reverts commit 9c7af7a3d0.
2022-08-25 05:44:53 +01:00
hlky
5c8063bc2a
Update webui.py 2022-08-25 05:43:05 +01:00
hlky
9c7af7a3d0
Revert "Update webui.py"
This reverts commit 5d452710b1.
2022-08-25 05:39:41 +01:00
EyeDeck
5d452710b1 Update webui.py
Fix CheckboxGroup read error
2022-08-25 00:25:38 -04:00
hlky
d2968f4089
pr fix 🐸
reeee
2022-08-25 05:17:42 +01:00
EyeDeck
85a905f757
Merge branch 'hlky:master' into master 2022-08-24 23:44:25 -04:00
hlky
92661ba475
pr fix reeeee 🐸 2022-08-25 04:39:32 +01:00
EyeDeck
0ec5bd9f91 Merge branch 'master' of https://github.com/EyeDeck/stable-diffusion-webui 2022-08-24 23:36:40 -04:00
EyeDeck
98ec85da40 UI tweaks
Made a handful of UI tweaks:
- changed literal 'random' default seed to a blank (more intuitive I think, also a blank previously behaved the same as '0')
- moved toggles into a Gradio CheckboxGroup (somewhat subjective, but saves a little vertical space in the UI, and makes it easier to adjust toggles in code)
- changed default CFG scale to 7.5 and 5.0 to match official txt2img and img2img (the waifu-diffusion fork this ultimately borrows from changed them to 7.0 for some reason)
- raised some of the default limits somewhat:
	- Steps from 150 -> 250 (the official command line version crashes at exactly 251, so seems like a reasonable limit)
	- ~~Batch count 16 -> 40~~ Got changed to 250 before I committed anyway
	- CFG scale 15.0 -> 30.0 (above 15 doesn't seem to affect k-diffusion much, but significantly impacts DDIM and PLMS up to about 50—maybe should be - higher?)
- inverted toggle names for clarity (both default on):
	- 'Skip grid' -> 'Save grid'
	- 'Skip save individual images' -> 'Save individual images'

Also:
- added separate --outdir_txt2img and --outdir_img2img command line args, which take priority over --outdir
- fixed flagging, some var names were only partially updated previously—note that CSV indicies were changed, so old log files will need deleted/renamed/etc
2022-08-24 23:31:49 -04:00
hlky
72e58a3af6
Merge pull request #13 from bryanlyon/patch-1
Fix GFPGAN color errors.  🔥 🥇
2022-08-25 04:28:07 +01:00
hlky
5240a47ee6
k-samplers fix 🔥
now THIS should fix it
2022-08-25 04:19:55 +01:00
bryanlyon
9caf41f5a1
Fix GFPGAN color errors.
GFPGAN requires images in BGR color space.  Using the wrong color space leads to color-shift of the face after it's put through GFPGAN.  To fix, convert the color space before sending to GFPGAN and again when it's returned.
2022-08-24 20:18:29 -07:00
hlky
07e4d738d5
Fix default selection of sampling checkbox
k-lms -> k_lms
2022-08-25 04:07:14 +01:00
hlky
77c06f829f
KDiffusionSampler fix 2022-08-25 03:55:15 +01:00
hlky
7143234939
description k_lms = default k-diffusion + max batch size increase
more k-diffusion samplers available now so clarify that k_lms is the same as was used before
2022-08-25 03:44:13 +01:00
hlky
3be4ce4fbd
Merge branch 'master' of https://github.com/hlky/stable-diffusion-webui 2022-08-25 03:31:44 +01:00
hlky
1ca4a3ec42
other k-diffusion samplers 2022-08-25 03:31:40 +01:00
EyeDeck
0afb4ca285 Fix crash display
Output tuple was changed;
also, fix text so it isn't black-on-black with light UI theme
2022-08-24 20:36:28 -04:00
hlky
a6452fbaa5
Flagging fix
🚩 🚩 🚩 🚩
2022-08-25 01:28:23 +01:00
hlky
9927f7c38a
img2img-mask
Great work, thanks anon!! 💯 🔥
2022-08-25 00:03:47 +01:00
hlky
8d6c046a08
Textual inversion support
Enabled only if textual-inversion exists.  i.e.
> config (configs/stable-diffusion/v1-inference.yaml) is updated for textual inversion
> ldm/modules/embedding_manager.py exists (copied from textual-inversion repo)
> ldm/data/personalized.py exists (copied from textual-inversion repo)
> ldm/data/personalized_style.py exists (copied from textual-inversion repo)
> ldm/models/diffusion/ddpm.py is replaced with textual-inversion version
> ldm/util.py is replaced with textual-inversion version

Without textual-inversion installed script will function as normal

Please note:
Once textual-inversion changes have been applied do not remove personalization_config from config .yaml without also replacing the files changed with the original versions
2022-08-24 22:28:32 +01:00
hlky
22e225ad1e
Queue
Fix for Issue#7
2022-08-24 21:38:29 +01:00
xra
c099aa8185 prompt weighting
was missing the grid gradio options last time
2022-08-25 02:58:45 +09:00
xra
c861d42feb Merge branch 'master' of https://github.com/xraxra/stable-diffusion-webui
# Conflicts:
#	webui.py
2022-08-25 02:54:40 +09:00
xra
f502897a06 updated weights code to match latest 2022-08-25 02:51:28 +09:00
hlky
75a7cadf3b
Revert "Merge pull request #4 from xraxra/master"
This reverts commit eae4ec82be, reversing
changes made to 5ae104bd99.
2022-08-24 18:23:52 +01:00
hlky
eae4ec82be
Merge pull request #4 from xraxra/master
weighted prompts similar to Midjourney
2022-08-24 18:15:04 +01:00
hlky
e460676043
Merge branch 'master' into master 2022-08-24 18:14:16 +01:00
hlky
56a93f37c3
Fix skip save individual images and skip grid with loopback
Fix skip save individual images and skip grid with loopback
2022-08-24 18:02:26 +01:00
xra
f2f866e67f weighted prompts similar to Midjourney
adds support for doing stuff like `a forest under night sky: by Studio Ghibli:1.8 in the style of Starry Night:2.3`

the : are treated as splits in the prompt, so the above turns into 3 prompts-
a forest under night sky 19.6%
by Studio Ghibli 35.2%
in the style of Starry Night 45.0%

the prompts are added together with torch.add using their weight as alpha
if a weight is negative it has the effect of subtracting (same result as torch.sub)

by default all values are normalized to try to add up to 1.0
If you want more control you can disable normalization, but values going far below 0 and 1 will cause artifacts
2022-08-25 01:51:22 +09:00
netcavy
b58c3038f9 added support for words in seeds 2022-08-25 02:42:29 +10:00
hlky
0f9c93808d
jpg quality 💯
jpg quality 💯 %
2022-08-24 17:36:45 +01:00
hlky
a743e60e0e
Skip grid/skip save + DDIM img2img!!
Added checkboxes for skip grid/skip individual save
+
DDIM for img2img!! (PLMS unsupported??)
2022-08-24 17:32:55 +01:00
netcavy
2137bb1ada Better crash display 2022-08-25 01:53:35 +10:00
netcavy
ae70eaeb5c Better crash display 2022-08-25 01:47:34 +10:00
netcavy
7b855f7022 Better crash display 2022-08-25 01:45:55 +10:00
hlky
60c81774da
Merge branch 'master' into master 2022-08-24 15:21:58 +01:00
netcavy
2ca56e3434 Fix img2img stats with new loopback feature 2022-08-25 00:14:23 +10:00
hlky
95423e2798
pynvml mem usage
pynvml mem usage
2022-08-24 15:12:20 +01:00
hlky
47d79b2ac9
Revert "Merge branch 'master' into master"
This reverts commit 15a700bbe5, reversing
changes made to abb83239e5.
2022-08-24 15:11:12 +01:00
ShinkoNet
accbdee516
Merge branch 'master' into master 2022-08-25 00:04:17 +10:00
netcavy
8cd893f279 Add stat handling to img2img 2022-08-24 23:59:44 +10:00
AUTOMATIC1111
15a700bbe5
Merge branch 'master' into master 2022-08-24 16:50:57 +03:00
netcavy
cd46fb54b5 Merge branch 'master' of https://github.com/ShinkoNet/stable-diffusion-webui 2022-08-24 23:47:07 +10:00