Commit Graph

242 Commits

Author SHA1 Message Date
DenOfEquity
329c3ca334 fix API get/refresh embeddings (#2271) 2024-11-06 18:24:28 +00:00
catboxanon
e5b34baae6 Honor lossless WebP compression option in API (#2245) 2024-11-01 12:37:56 -04:00
psydok
878c056576 Any exception is translated in http response (#2186)
* fix: get error in http request
2024-10-28 00:27:38 +00:00
altoiddealer
2c543719e3 Improve options management (#2078)
- `/sdapi/v1/options` GET now calls `get_config()` from **sysinfo** module, instead of from its own version of the function.

- Defined a new, flexible and more robust `set_config()` function in **sysinfo** module, which:
  - obsoletes redundant code
  - skips updating values that are unchanged
  - has flexible args for both API and UI use

- `/sdapi/v1/options` POST and `override_settings` now use the new `set_config()` function.  `set_config()` could possibly obsolete additional functions, but I'm not going to get into that just yet.

- Options for `forge_additional_modules` can now be provided either as the file path, or just the module name.

- Most importantly, `refresh_model_loading_parameters()` is now only called ONCE per request, and **only** if necessary.

- It is now much easier to call `shared.opts.save()` as needed
2024-10-16 11:21:54 +01:00
altoiddealer
cce30d3340 Include Extra Images via API (#2066) 2024-10-15 13:52:08 +01:00
altoiddealer
862c7a589e API Improvements: Modules Change AND Restore override_settings (#2027)
* Improve API modules change
* Restore override_settings and make it work
* Simplify some memory management
2024-10-13 12:29:02 +01:00
altoiddealer
f4d5e8cac1 Apply memory changes via API (#1954)
Actually apply memory related changes posted to `/sdapi/v1/options`:
- 'forge_inference_memory'
- 'forge_async_loading'
- 'forge_pin_shared_memory'
2024-10-01 21:34:11 +01:00
layerdiffusion
18b356c0dc fix 2024-08-26 16:15:07 -07:00
altoiddealer
d55e6b5bfe Replace API sd-vae with sd-modules (#1463) 2024-08-26 15:08:02 -07:00
altoiddealer
86e3ccaa9d checkpoint change (#1427)
* checkpoint change

credit to @dermesut

https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/1421

Enables `sd_model_checkpoint` parameter for API payloads

* Omit redundant .save()
2024-08-23 09:01:30 -07:00
altoiddealer
d169cd5881 Gets type (#1410) 2024-08-22 12:50:09 -07:00
Igor Aherne
852e88564c Update api.py (#1389)
get_sd_models now also returning config - fixes the following error:

fastapi.exceptions.ResponseValidationError: 1 validation errors:
  {'type': 'missing', 'loc': ('response', 0, 'config'), 'msg': 'Field required', 'input': {'title': 'realisticVisionV51_v51VAE.safetensors', 'model_name': 'realisticVisionV51_v51VAE', 'hash': None, 'sha256': None, 'filename': 'C:\\Users\\Igor\\Documents\\StableProjectorz\\stable-diffusion-webui-forge\\webui\\models\\Stable-diffusion\\realisticVisionV51_v51VAE.safetensors'}, 'url': 'https://errors.pydantic.dev/2.8/v/missing'}
2024-08-21 22:47:40 -07:00
layerdiffusion
ae1d995d0d Finally removed model_hijack
finally
2024-08-05 21:05:25 -07:00
layerdiffusion
77a4980f08 remove everything related to training 2024-08-05 04:35:09 -07:00
layerdiffusion
bccf9fb23a Free WebUI from its Prison
Congratulations WebUI. Say Hello to freedom.
2024-08-05 04:21:35 -07:00
layerdiffusion
aafe11b14c Revert "Free WebUI from its Prison"
This reverts commit 62c11fdc71.
2024-08-05 03:52:44 -07:00
layerdiffusion
62c11fdc71 Free WebUI from its Prison
Congratulations WebUI. Say Hello to freedom.
2024-08-05 03:39:54 -07:00
layerdiffusion
e26abf87ec Gradio 4 + WebUI 1.10 2024-07-26 12:02:46 -07:00
Chenlei Hu
5a7e755528 ControlNet API (#162)
* ControlNet API

* update cache key

* nits

* disable controlnet tests
2024-02-10 01:16:13 -05:00
AUTOMATIC1111
19c95de8eb Merge pull request #14715 from stefanbenten/sb/embedding-refresh
modules/api/api.py: add api endpoint to refresh embeddings list
2024-01-23 22:35:41 +03:00
Stefan Benten
2974b9cee9 modules/api/api.py: add api endpoint to refresh embeddings list 2024-01-21 14:05:47 +01:00
unknown
8d986727b3 include tls arguments in api uvicorn init 2024-01-09 03:01:20 -06:00
AUTOMATIC1111
5d7d1823af rename infotext.py again, this time to infotext_utils.py; I didn't realize infotext would be used for variable names in multiple places, which makes it awkward to import the module; also fix the bug I caused by this rename that breaks tests 2024-01-01 17:25:30 +03:00
AUTOMATIC1111
d859cec696 infotext.py: rename usages in the codebase 2024-01-01 13:53:12 +03:00
AUTOMATIC1111
79c9151802 Merge pull request #14421 from lanyeeee/api_thread_safe
fix API thread safe issues of txt2img and img2img
2023-12-30 20:21:13 +03:00
lanyeeee
f651405427 remove locks, move init code to __init__ 2023-12-31 01:09:13 +08:00
lanyeeee
91560e98c4 fix format issue 2023-12-30 23:42:10 +08:00
AUTOMATIC1111
05230c0260 fix img2img api that i broke when implementing infotext support 2023-12-30 18:02:51 +03:00
kurisu_u
d05f9e8124 Merge branch 'dev' into api_thread_safe 2023-12-30 21:47:59 +08:00
lanyeeee
c069c2c562 add locks to ensure init args are thread-safe 2023-12-30 21:32:22 +08:00
AUTOMATIC1111
8f18263759 fix bad values read from infotext for API, add comment 2023-12-30 13:48:25 +03:00
AUTOMATIC1111
11a435b469 img2img support for infotext API 2023-12-30 13:34:46 +03:00
AUTOMATIC1111
0aacd4c72b add support for alwayson scripts for infotext API 2023-12-30 13:33:18 +03:00
AUTOMATIC1111
8b08b78c03 make it so that if an option from infotext conflicts with an argument from API, the latter overrides the former 2023-12-30 12:27:23 +03:00
AUTOMATIC1111
ba92135a2b add override_settings support for infotext API 2023-12-30 12:11:09 +03:00
AUTOMATIC1111
bb07cb6a0d a 2023-12-30 10:42:42 +03:00
lanyeeee
00d4a4d4ac move thread-unsafe code to __init__ 2023-12-26 14:46:29 +08:00
AUTOMATIC1111
de03882d6c make task ids for API work without force_task_id 2023-12-17 08:55:35 +03:00
AUTOMATIC1111
5b7d86d42b Merge pull request #14314 from gayshub/master
Add allow specify the task id and get the location of task in the queue of pending task
2023-12-16 11:01:42 +03:00
gayshub
6d7e57ba6a fix the problem of ruff of github 2023-12-15 18:03:14 +08:00
gayshub
da45e73b4f fix the problem of ruff of github 2023-12-15 17:57:58 +08:00
gayshub
d859de37d9 fix the problem of ruff of github 2023-12-15 17:48:20 +08:00
gayshub
1242ba08e1 add allow specify the task id and get the location of task in the queue of pending task 2023-12-15 16:57:17 +08:00
AUTOMATIC1111
11d23e8ca5 remove Train/Preprocessing tab and put all its functionality into extras batch images mode 2023-12-02 18:01:11 +03:00
AUTOMATIC1111
282903bb67 repair unload sd checkpoint button 2023-10-15 09:41:02 +03:00
FluttyProger
f71e919ecb Ability for extensions to return custom data via api in response.images 2023-10-01 18:06:48 +03:00
a666
b6c1a1bbbf Fix some deprecated types 2023-08-29 00:54:57 -06:00
AUTOMATIC1111
72ee347eab update pnginfo checkpoint to return dict with parsed values 2023-08-26 06:52:18 +03:00
SpenserCai
dd07b5193e fix format error 2023-08-25 22:23:17 +08:00
SpenserCai
3369fb27df support installed extensions list api 2023-08-25 22:15:35 +08:00