Commit Graph

261 Commits

Author SHA1 Message Date
AUTOMATIC1111 353c876172 fix API always using -1 as seed 2023-08-14 10:43:18 +03:00
AUTOMATIC1111 c7c16f805c repair /docs page 2023-08-14 09:49:51 +03:00
AUTOMATIC1111 4ca9f70b59
Merge pull request #11950 from AnyISalIn/dev
feat: add refresh vae api
2023-07-29 09:37:02 +03:00
caoxipeng 6cc5a886ae Add total_tqdm clear in the end of txt2img & img2img api. 2023-07-28 11:40:10 +08:00
AUTOMATIC1111 6b877c35da Merge pull request #12032 from AUTOMATIC1111/fix-api-get-options-sd_model_checkpoint
api /sdapi/v1/options use "Any" type when default type is None
2023-07-26 11:52:58 +03:00
AUTOMATIC1111 ce0aab3643 Merge pull request #11984 from AUTOMATIC1111/api-only-subpath-(root_path)
api only subpath (rootpath)
2023-07-25 16:20:46 +03:00
AUTOMATIC1111 704628b903 Merge pull request #11923 from AnyISalIn/dev
[bug] If txt2img/img2img raises an exception, finally call state.end()
2023-07-25 16:19:36 +03:00
AnyISalIn 1cbfafafd2 feat: add refresh vae api
Signed-off-by: AnyISalIn <anyisalin@gmail.com>
2023-07-24 19:45:08 +08:00
AnyISalIn 1fe2dcaa2a [bug] If txt2img/img2img raises an exception, finally call state.end()
Signed-off-by: AnyISalIn <anyisalin@gmail.com>
2023-07-22 10:00:27 +08:00
AUTOMATIC1111 7f7db1700b linter fix 2023-07-18 18:16:23 +03:00
AUTOMATIC1111 b270ded268 fix the issue with /sdapi/v1/options failing (this time for sure!)
fix automated tests downloading CLIP model
2023-07-18 18:10:04 +03:00
AUTOMATIC1111 ed82f1c5f1 lint 2023-07-18 15:55:23 +03:00
AUTOMATIC1111 420cc8f68e also make None a valid option for options API for #11854 2023-07-18 11:48:40 +03:00
AUTOMATIC1111 b8bd8ce4cf disable rich exception output in console for API by default, use WEBUI_RICH_EXCEPTIONS env var to enable 2023-07-15 07:44:37 +03:00
AUTOMATIC1111 b7c5b30f14
Merge branch 'dev' into master 2023-07-13 15:21:39 +03:00
TangJicheng 14501f56aa
set timeout_keep_alive 2023-07-11 17:32:04 +09:00
AUTOMATIC1111 7b833291b3 Merge branch 'master' into dev 2023-07-11 06:25:50 +03:00
tangjicheng 089a0022ae add queue lock for refresh-checkpoints 2023-07-10 23:10:14 +09:00
Aarni Koskela da468a585b Fix typo: checkpoint_alisases 2023-07-08 17:28:42 +03:00
AUTOMATIC1111 eb51acb89e
Merge pull request #11503 from AUTOMATIC1111/rename---add-stop-route-to---api-server-stop
Rename --add-stop-route to --api-server-stop
2023-07-08 14:40:21 +03:00
AUTOMATIC1111 fc049a2fd3
Merge branch 'dev' into better-status-reporting-1 2023-07-08 14:19:34 +03:00
AUTOMATIC1111 5ed1ae5003
Merge pull request #11656 from jovijovi/dev
fix(api): convert to "RGB" if image mode is "RGBA" #11655
2023-07-08 13:10:50 +03:00
jovijovi 259967b7c6 fix(api): convert to "RGB" if image mode is "RGBA" 2023-07-06 18:43:17 +08:00
ramyma c1c0492859 Use contextlib for closing the generation process 2023-07-03 20:17:47 +03:00
ramyma 3278887317 Handle cleanup in case there's an exception thrown 2023-07-03 20:02:30 +03:00
Aarni Koskela e430344347 API: use finally: for state.end() 2023-07-03 11:03:41 +03:00
Aarni Koskela f44feb6a10 Add job argument to State.begin() 2023-07-03 11:03:41 +03:00
ramyma 74d001bc68 Hotfix: call processing close to cleanup API generation calls 2023-07-02 04:59:59 +03:00
w-e-w cc9c171978 rename --add-stop-route to --api-server-stop 2023-06-29 14:21:28 +09:00
AUTOMATIC1111 1bf01b73f4
Merge pull request #11046 from akx/ded-code
Remove a bunch of unused/vestigial code
2023-06-27 11:25:55 +03:00
AUTOMATIC d06af4e517 fix and rework #11113 2023-06-27 09:26:18 +03:00
AUTOMATIC1111 0b97ae2832
Merge branch 'dev' into master 2023-06-27 09:23:15 +03:00
w-e-w 6091c4e4aa terminate -> stop 2023-06-14 19:53:08 +09:00
w-e-w 49fb2a3376 response 501 if not a able to restart 2023-06-14 19:52:12 +09:00
w-e-w 5be6c026f5 rename routes 2023-06-14 18:51:47 +09:00
w-e-w b9664ab615 move _stop route to api 2023-06-12 18:15:27 +09:00
Su Wei 7e2d39a2d1 update model checkpoint switch code 2023-06-12 15:22:49 +08:00
w-e-w 9142be0a0d quit restart 2023-06-10 23:36:34 +09:00
Su Wei 8ca34ad6d8 add model exists status check to modeuls/api/api.py , /sdapi/v1/options [POST] 2023-06-09 13:14:20 +08:00
Aarni Koskela ba70a220e3 Remove a bunch of unused/vestigial code
As found by Vulture and some eyes
2023-06-05 22:43:57 +03:00
AUTOMATIC1111 7a7a201d81
Merge pull request #10956 from akx/len
Simplify a bunch of `len(x) > 0`/`len(x) == 0` style expressions
2023-06-05 11:06:37 +03:00
ramyma 4faaf3e723 Add endpoint to get latent_upscale_modes for hires fix 2023-06-04 17:05:29 +03:00
Aarni Koskela 51864790fd Simplify a bunch of `len(x) > 0`/`len(x) == 0` style expressions 2023-06-02 15:07:10 +03:00
AUTOMATIC 05933840f0 rename print_error to report, use it with together with package name 2023-05-31 19:56:37 +03:00
AUTOMATIC1111 52b8752e62
Merge branch 'dev' into report-error 2023-05-31 19:15:21 +03:00
AUTOMATIC1111 69f49a935a
Merge pull request #10845 from DragonHawkAlpha/master
Added VAE listing to web API. Via: /sdapi/v1/sd-vae
2023-05-31 18:44:46 +03:00
James 42e020c1c1 Added VAE listing to web API. 2023-05-29 22:25:43 +01:00
Aarni Koskela 00dfe27f59 Add & use modules.errors.print_error where currently printing exception info by hand 2023-05-29 09:17:30 +03:00
AUTOMATIC1111 d77ba18d5d
Merge pull request #10635 from prodialabs/master
disable `timeout_keep_alive`: fixes #10625 #10510 #10474
2023-05-22 22:17:25 +03:00
Monty Anderson efc9853059 `modules/api/api.py`: disable `timeout_keep_alive` 2023-05-22 15:52:44 +01:00
AUTOMATIC f6fc7916c4 add /sdapi/v1/script-info api 2023-05-17 22:43:24 +03:00
Aarni Koskela 49a55b410b Autofix Ruff W (not W605) (mostly whitespace) 2023-05-11 20:29:11 +03:00
AUTOMATIC d25219b7e8 manual fixes for some C408 2023-05-10 11:55:09 +03:00
AUTOMATIC 550256db1c ruff manual fixes 2023-05-10 11:19:16 +03:00
AUTOMATIC 96d6ca4199 manual fixes for ruff 2023-05-10 08:25:25 +03:00
AUTOMATIC 762265eab5 autofixes from ruff 2023-05-10 07:52:45 +03:00
Aarni Koskela 3ba6c3c83c Fix up string formatting/concatenation to f-strings where feasible 2023-05-09 22:25:39 +03:00
AUTOMATIC 90e4659822 bump gradio to 3.28.1 2023-04-29 20:28:30 +03:00
AUTOMATIC1111 fc6eeda69c
Merge pull request #9130 from Vespinian/fix-api-alwayson_scripts-less-then-requiered-args
[Fix] Prevent alwayson_scripts args param resizing script_arg list when they are inserted in it
2023-04-29 12:55:19 +03:00
AUTOMATIC 101a18fc84 bump gradio to 3.27 2023-04-29 09:17:35 +03:00
Vespinian 70a0a11783 Changed behavior that puts the args from alwayson_script request in the script_args, so don't accidently resize the arg list if we get less arg then or default list has 2023-03-28 23:52:51 -04:00
AUTOMATIC1111 c7daba71de
Merge pull request #8669 from Vespinian/fix-api-running-unwanted_scripts
Fix for API running unwanted alwayson scripts
2023-03-27 08:11:34 +03:00
Vespinian 23f6dfce4c Reworked this PR, now we have 2 default arg list (one for each tab) that will be initialized on the first api request and then reused afterwards. The init_script_args copies the corresponding default list and applies the modifications asked by the api request. 2023-03-25 14:16:35 -04:00
Vespinian f371579571 Revert "Made copies of global scriptrunners, now we clear the copied scriptrunner of alwayson_scripts and only add back the ones that that were requested"
This reverts commit dfa258de5f.
2023-03-25 14:11:46 -04:00
Vespinian db602b100e Revert "Comment fix"
This reverts commit f04bd037a5.
2023-03-25 14:11:38 -04:00
AUTOMATIC1111 a03536f213
Merge pull request #8662 from vladmandic/api-handler
api error handler
2023-03-25 12:47:32 +03:00
Φφ 4cbbb881ee Unload checkpoints on Request
…to free VRAM.

New Action buttons in the settings to manually free and reload checkpoints, essentially
juggling models between RAM and VRAM.
2023-03-21 09:28:50 +03:00
Vespinian f04bd037a5 Comment fix 2023-03-15 22:27:54 -04:00
Vespinian dfa258de5f Made copies of global scriptrunners, now we clear the copied scriptrunner of alwayson_scripts and only add back the ones that that were requested 2023-03-15 22:17:32 -04:00
Vladimir Mandic 5387576c59
api error handler 2023-03-15 15:11:04 -04:00
Vespinian 49bbdbe447 small diff whitespace cleanup 2023-03-11 14:34:56 -05:00
Vespinian 5546e71a10 Fixed whitespace 2023-03-11 12:35:20 -05:00
Vespinian 46f9fe3cd6 Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui 2023-03-11 12:33:35 -05:00
Vespinian 2174f58dae Changed alwayson_script_name and alwayson_script_args api params to 1 alwayson_scripts param dict 2023-03-11 12:21:33 -05:00
AUTOMATIC1111 8ec0442dcd
Merge pull request #8322 from yeataro/master
add: /sdapi/v1/scripts in API
2023-03-11 13:43:34 +03:00
AUTOMATIC 3531a50080 rename fields for API for saving/sending images
save images to correct directories
2023-03-11 13:22:59 +03:00
Yea Chen f85a192f99
Update modules/api/api.py
Suggested change by @akx

Co-authored-by: Aarni Koskela <akx@iki.fi>
2023-03-07 04:04:35 +08:00
Vladimir Mandic b012d70f15
update using original defaults 2023-03-04 17:51:37 -05:00
Yea chen c48bbccf12 add: /sdapi/v1/scripts in API
API for get scripts list
2023-03-04 11:46:07 +08:00
Vladimir Mandic f8e219bad9
allow api requests to specify do not send images in response 2023-03-03 09:00:52 -05:00
Vladimir Mandic 23d4fb5bf2
allow saving of images via api 2023-03-03 08:29:10 -05:00
Vespinian c6c2a59333 comment clarification 2023-02-27 23:45:59 -05:00
Vespinian a39c4cf766 small refactor of api.py 2023-02-27 23:27:33 -05:00
Vespinian 3b6de96467 Added alwayson_script_name and alwayson_script_args to api
Added 2 additional possible entries in the api request: alwayson_script_name, a string list, and, alwayson_script_args, a list of list containing the args of each script. This allows us to send args to always on script and keep backwards compatibility with old script_name and script_arg api params
2023-02-27 21:51:20 -05:00
minux302 33947a3c66 fix arg for hypernetwork train api 2023-02-10 17:58:35 +09:00
AUTOMATIC 6f31d2210c support detecting midas model
fix broken api for checkpoint list
2023-01-27 11:54:19 +03:00
AUTOMATIC d2ac95fa7b remove the need to place configs near models 2023-01-27 11:28:12 +03:00
AUTOMATIC 602a1864b0 also return the removed field to sdapi/v1/upscalers because someone might have relied on it existing 2023-01-24 10:09:30 +03:00
AUTOMATIC 42a70d7477 repair sdapi/v1/upscalers returning bogus results 2023-01-24 10:05:45 +03:00
Vladimir Mandic 45e270dfc8
add image decod exception handling 2023-01-23 17:11:22 -05:00
Vladimir Mandic 6e1b296baf
api-image-format 2023-01-23 10:10:59 -05:00
AUTOMATIC b5230197a6 rework extras tab to use script system 2023-01-23 09:24:43 +03:00
AUTOMATIC 6d805b669e make CLIP interrogator download original text files if the directory does not exist
remove random artist built-in extension (to re-added as a normal extension on demand)
remove artists.csv (but what does it mean????????????????????)
make interrogate buttons show Loading... when you click them
2023-01-21 09:14:27 +03:00
AUTOMATIC 40ff6db532 extra networks UI
rework of hypernets: rather than via settings, hypernets are added directly to prompt as <hypernet:name:weight>
2023-01-21 08:36:07 +03:00
AUTOMATIC a95f135308 change hash to sha256 2023-01-14 09:56:59 +03:00
Vladimir Mandic 39ea251945
add textinfo to progress response 2023-01-11 10:23:51 -05:00
Vladimir Mandic 2275f130bf
relax reponse type check enforcement 2023-01-09 21:23:58 -05:00
AUTOMATIC1111 b1d976dca2
Merge pull request #6466 from vladmandic/api-get-memory
Implement API get-memory
2023-01-10 02:02:19 +03:00
Vladimir Mandic 95727312ca
remove bytes -> gb conversion 2023-01-09 16:54:12 -05:00
AUTOMATIC 137ce534b2 remove some code duplication
remove calls to locals()
add a test for img2img with script
2023-01-08 16:14:38 +03:00