Commit Graph

100 Commits

Author SHA1 Message Date
cmdr2
f6651b03b5 Workaround to run gfpgan on cuda:0 even if it's not enabled in the multi-gpu setup 2022-11-14 11:51:18 +05:30
cmdr2
ea03fd22db Start on multiple GPUs by default (top 75 percentile by free_mem); UI selection for 'cpu' or 'auto' or a list of specific GPUs, which is now linked to the backend; Dynamically start/stop render threads for the devices, without requiring a full program restart 2022-11-14 11:23:22 +05:30
Marc-Andre Ferland
aa21115e26 Always return a byte buffer. Sending the picture as URL text fails in some browsers. 2022-11-11 20:44:39 -05:00
cmdr2
fa0c2f7138 Temp change to get beta working and use a single GPU until the rest of the changes come through 2022-11-11 15:09:25 +05:30
cmdr2
bd56795c62 Switch to using cuda:N instead of N (integer device ids) 2022-11-11 14:46:05 +05:30
cmdr2
2c54b7f289 Remove the WIP line for render devices 2022-11-11 14:43:14 +05:30
cmdr2
b9a12d1562 Restrict device selection id to 'cpu' or integers (and 'auto' in the initial device selection functions) 2022-11-10 20:03:11 +05:30
cmdr2
058ce6fe82 UI-side changes for selecting multiple GPUs, and keeping the Use CPU option synchronized with the backend. This change isn't ready to be shipped, it still needs python-side changes to support the req.render_device config 2022-11-09 19:17:44 +05:30
cmdr2
087c10d52d
Sort models by name 2022-11-09 17:35:55 +05:30
cmdr2
18292e447c
Make the models dir if required 2022-11-09 16:28:58 +05:30
cmdr2
f742aad810
Merge pull request #446 from JeLuF/sd-ui-bind
Protect SD_UI_BIND_PORT and SD_UI_BIND_IP in config files
2022-11-09 10:09:28 +05:30
cmdr2
9bc7521de0 Make custom VAE an Image Setting, rather than a System Setting; Don't load a VAE into memory by default 2022-11-08 16:54:15 +05:30
cmdr2
67cca3bc00 Print the devices for which rendering threads have started; Prettier print of the model data 2022-11-07 18:26:10 +05:30
cmdr2
abbfae2fc0 Simplify the logic used for displaying the GFPGAN warning 2022-11-07 17:55:27 +05:30
JeLuF
58b759f652 Fix tabs to spaces 2022-11-06 16:50:23 +01:00
JeLuF
74ca756a53 Protect SD_UI_BIND_PORT and SD_UI_BIND_IP in config files 2022-11-06 00:27:11 +01:00
cmdr2
976bc727dd
Merge pull request #422 from madrang/device-select
Implement complete device selection in the backend.
2022-11-02 12:05:59 +05:30
JeLuF
d2f679030b
Don't put CUDA_VISIBLE_DEVICES hints if it's already set 2022-11-01 01:16:29 +01:00
JeLuF
7f151cbeba
Copy CUDA_VISIBLE_DEVICES to config.*, it it has been set
Don't delete CUDA_VISIBLE_DEVICES settings when generating a new config file
2022-10-31 00:48:18 +01:00
Marc-Andre Ferland
2208545612 Don't display this warning if on CPU. 2022-10-30 05:39:45 -04:00
Marc-Andre Ferland
70acc8a7c0 Syntax... 2022-10-29 19:02:07 -04:00
Marc-Andre Ferland
bf97781232 Don't let users register the same device twice. 2022-10-29 18:57:31 -04:00
Marc-Andre Ferland
b7a663ed20 Implement complete device selection in the backend. 2022-10-29 17:34:53 -04:00
Marc-Andre Ferland
03757632cf Missing .lower() cause CUDA:0 to fail check where cuda:0 works. 2022-10-29 04:33:14 -04:00
Marc-Andre Ferland
9f5202fee3 Improved readability and comments. 2022-10-29 00:43:02 -04:00
Marc-Andre Ferland
902ccbd203 Don't try to start cuda:0 if auto used cpu mode. 2022-10-29 00:36:26 -04:00
Marc-Andre Ferland
4675da4d16 Display warning on start failure.
Removes spam from exception and continue starting other devices.
2022-10-28 22:53:55 -04:00
cmdr2
ef6f491d94 Write lines, please 2022-10-28 22:42:11 +05:30
cmdr2
9dcef00fbb New lines for config.sh 2022-10-28 22:35:04 +05:30
cmdr2
e781e5dd43 Need to wrap the filter() output in a list 2022-10-28 22:30:05 +05:30
cmdr2
d3e672d811 Replace os-specific newlines with writelines() 2022-10-28 22:23:52 +05:30
cmdr2
dad1554ec2 Fix a bug where config.bat would not get written properly 2022-10-28 21:07:18 +05:30
cmdr2
30bf96c6cd Fix a bug where beta wouldn't switch properly because the config.bat/sh files weren't being written 2022-10-28 21:00:25 +05:30
cmdr2
a8c16e39b8 Support custom VAE files; Use vae-ft-mse-840000-ema-pruned as the default VAE, which can be overridden by putting a .vae.pt file inside models/stable-diffusion with the same name as the ckpt model file. The UI / System Settings allows setting the default VAE model to use 2022-10-28 20:06:44 +05:30
Marc-Andre Ferland
7dc7ba9977 Removed old comments. 2022-10-27 21:47:44 -04:00
Marc-Andre Ferland
fa4059a4b9 Removed all async code since now start_render_thread wait for init to complete making this useless. 2022-10-27 21:40:16 -04:00
cmdr2
9ad1e0d529 Allow the user to specify any disk path to the model, in the config 2022-10-27 23:39:29 +05:30
cmdr2
01a2fa7c2d Fix a bug where the default model would not load if the user hadn't already configured a custom model (e.g. in a fresh installation); Check for the model in the models/stable-diffusion folder first, before checking in the direct folder 2022-10-27 22:34:23 +05:30
Marc-Andre Ferland
189d31cc29 Specify update_ttl on all get_cached_task calls. 2022-10-24 05:12:08 -04:00
Marc-Andre Ferland
364e364429 Added get_cached_task to replace task_cache.tryGet in server.py
Now updated cache TTL on /stream and temp images endpoints.
Keep images alive longer when browser keeps reading the endpoints.
2022-10-22 13:52:13 -04:00
Marc-Andre Ferland
46a46877ed Missing model_path replaced by model_name 2022-10-22 13:49:23 -04:00
Marc-Andre Ferland
1442748f58 When starting with profiler cuda devices are slower to init. 2022-10-21 03:53:26 -04:00
Marc-Andre Ferland
849d1d7ebd Merge branch 'beta' of https://github.com/cmdr2/stable-diffusion-ui.git into multi-gpu
# Conflicts:
#	ui/media/js/main.js
#	ui/sd_internal/runtime.py
#	ui/server.py
2022-10-20 20:08:23 -04:00
cmdr2
e287df1320 Allow loading UI plugins from a /plugins/ URL path, which loads files ending with .plugin.js inside the plugins/ui folder 2022-10-19 21:34:40 +05:30
Marc-Andre Ferland
fc8660df78 Faster response on invalid settings when CPU was specified with GFPGANer. 2022-10-19 05:19:16 -04:00
Marc-Andre Ferland
a036b2981a Removed forgotten mention of CPU in message to user. 2022-10-19 04:31:57 -04:00
Marc-Andre Ferland
8fae83dab7 Print value to console for better debug from logs. 2022-10-19 04:26:09 -04:00
Marc-Andre Ferland
ef68e5b13d Added warning about validating config. 2022-10-19 04:16:46 -04:00
Marc-Andre Ferland
6098b196dc Text header, comments and better validations. 2022-10-18 23:58:55 -04:00
Marc-Andre Ferland
53cdeeff03 More fixes to devices changing names. 2022-10-18 21:08:04 -04:00