Commit Graph

293 Commits

Author SHA1 Message Date
Vladimir Mandic 6fc0830d2c api audit
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-01 11:47:29 +02:00
QualiaRain 711d6018bf fix(api): IP-adapter mask accumulation, null params, colon-in-password, raw allowed path
generate.py: p.ip_adapter_masks was reinitialized inside the per-adapter loop, discarding all but the last adapter's masks; move it beside the other accumulators. process.py: req.params is dict|None, so a null params body crashed .items() in post_preprocess/post_mask. api.py: split(':') without maxsplit broke auth/auth-file entries whose password contains a colon. gallery.py: allowed_paths stored quote(path) but the membership check and path guards use the raw path, causing duplicate accumulation and an ineffective whitelist; also drop the unused FastAPI import (pylint W0611 surfaced when this file is linted).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:07 -04:00
Vladimir Mandic f25f325efb fixes based on full skills run
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-04 11:10:26 +02:00
CalamitousFelicitousness f9ab0bf04d feat(api): add detailer postprocess script and /sdapi/v1/detail endpoint
Surface YoloRestorer.restore() as a standalone operation: a Detailer
postprocessing script in the Process tab and a thin /sdapi/v1/detail
endpoint, neither requiring a base generation pass.

- modules/postprocess/yolo.py: YoloRestorer.make_processing() builds the
  synthetic Img2Img processing object both entry points feed to restore(),
  resolving the seed so the inpaint passes are reproducible
- modules/api/process.py: post_detail handler exposes the full detailer
  parameter set and returns the detailed image plus optional annotations
  as base64
- scripts/postprocessing_detailer.py: reuses shared.yolo.ui('extras') and
  runs through make_processing()
- modules/postprocessing.py: run_extras takes a per-script script_args
  dict, also letting the extras API drive other scripts such as Remove
  background; omitting it leaves existing callers unchanged
- modules/api/models.py: ReqDetail / ResDetail
- modules/processing_info.py: guard create_infotext's Image/Hires CFG
  reporting against an unset (None) cfg_image, matching the is-not-None
  checks the other cfg_image readers use; the detailer inpaint pass runs
  with it unset
- test/test-detailer-api.py: covers both paths; effect tests measure the
  diff inside the detected region with extreme isolated parameter values,
  and the suite disables model quantization for the run and restores the
  original settings afterward
2026-06-01 00:25:59 +01:00
Vladimir Mandic f1b6e82ccf models table improvements
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 12:16:21 +02:00
Vladimir Mandic 725db1f324 add gallery quick actions
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-05 07:45:26 +02:00
CalamitousFelicitousness e2c856459c feat(autocomplete): aliases, extra-networks, translations, baseline fixes
- tag aliases (optional 4-tuple) and translations (companion file)
- lora and wildcard triggers; embeddings fold into tag-mode results
- new GET /sdapi/v1/wildcards endpoint
- LRU cap, IME safety, multi-textarea safety, modifier-key pass-through
- manifest-retry and config-bridge hardening
- tags-fetch: alias/translation harvesters with authenticated rate limits
2026-04-24 21:55:27 +01:00
Vladimir Mandic b3f09aa417 Merge pull request #4707 from vladmandic/feat/tag-dictionaries
Feat/tag dictionaries
2026-04-13 11:57:48 +02:00
vladmandic a6c726f8d6 update tag-autocomplete
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-13 11:54:59 +02:00
vladmandic 15c8b2b0c4 fixes from check-api
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-12 18:54:22 +02:00
CalamitousFelicitousness d4d5bce3b9 feat(autocomplete): add native tag autocomplete for prompt textareas 2026-03-26 00:47:14 +00:00
CalamitousFelicitousness 5312265d27 refactor(autocomplete): rename dicts to autocomplete, relocate to models/ 2026-03-26 00:47:14 +00:00
CalamitousFelicitousness d26f8560c8 fix(dicts): move default dicts directory to data/dicts
Tag dictionaries are lookup data, not model weights — place them
alongside cache.json and metadata.json in the data/ folder instead
of inside the models directory.
2026-03-26 00:47:13 +00:00
CalamitousFelicitousness 9343768d78 feat(api): add tag dictionary API and settings for prompt autocomplete 2026-03-26 00:47:13 +00:00
vladmandic afe3786f5f add unet/dir to networks
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-22 11:09:45 +01:00
vladmandic 760b0121bc update register_api
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-20 08:07:05 +01:00
vladmandic d679fbb8fb move rembg to internal
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-20 08:04:21 +01:00
vladmandic fb2f9ea650 new server info panel
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-18 15:37:57 +01:00
vladmandic de7959397c fb merge phase 3
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-16 10:32:12 +01:00
vladmandic af1531af5a revert gallery appy
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-13 12:06:33 +01:00
vladmandic f89afe0add revert gallery api
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-13 12:06:26 +01:00
vladmandic 20e8b8ab18 add upload api endpoint
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-09 16:02:05 +01:00
Vladimir Mandic e5c494f999 cleanup logger 2026-02-19 11:09:13 +01:00
Vladimir Mandic a3074baf8b unified logger 2026-02-19 09:46:42 +01:00
Vladimir Mandic bfe014f5da modernize typing 2026-02-19 09:15:37 +01:00
Vladimir Mandic 41f206dec9 Merge pull request #4637 from CalamitousFelicitousness/refactor/remove-face-restoration
Refactor/remove face restoration
2026-02-11 11:12:34 +01:00
CalamitousFelicitousness 6c20e49897 refactor(caption): extract caption API into standalone module
Move all caption/interrogate/tagger/VQA API code out of the monolithic
endpoints.py and models.py into a new self-contained modules/api/caption.py,
following the loras.py / nudenet.py self-registering pattern.

- Move 15 Pydantic models (ReqCaption, ResCaption, ReqVQA, ResVQA,
  ReqTagger, ResTagger, dispatch union types, etc.) from models.py
- Move 11 handler functions from endpoints.py
- Deduplicate ~150 lines via shared _do_openclip, _do_tagger, _do_vqa
  core functions called by both direct and dispatch endpoints
- Add register_api() that registers all 8 caption routes
- Add promptgen field to ResVLMPrompts (bug fix: handler returned it
  but response model silently dropped it)
- Improve all endpoint docstrings and Field descriptions for API docs
2026-02-11 02:50:06 +00:00
CalamitousFelicitousness f4b5abde68 refactor: update API for caption module
Update API endpoints and models for caption module rename:
- modules/api/api.py - update imports and endpoint handlers
- modules/api/endpoints.py - update endpoint definitions
- modules/api/models.py - update request/response models
2026-02-11 02:48:11 +00:00
CalamitousFelicitousness ec7934799e feat(api): add caption API endpoints and documentation
Add comprehensive caption/interrogate API with documentation:

- GET /sdapi/v1/interrogate: List available interrogation models
- POST /sdapi/v1/interrogate: Interrogate with OpenCLIP/BLIP/DeepDanbooru
- POST /sdapi/v1/vqa: Caption with Vision-Language Models (VLM)
- GET /sdapi/v1/vqa: List available VLM models
- POST /sdapi/v1/vqa/batch: Batch caption multiple images
- POST /sdapi/v1/tagger: Tag images with WaifuDiffusion/DeepBooru

Updates:
- Add detailed docstrings with usage examples
- Fix analyze_image response parsing for Gradio update dicts
- Add request/response models for all endpoints
2026-02-11 02:47:40 +00:00
CalamitousFelicitousness 8d764951cf refactor(api): remove face restoration endpoints and parameters
- Remove /sdapi/v1/face-restorers route from api.py
- Remove get_restorers() function from endpoints.py
- Remove gfpgan_visibility, codeformer_visibility, codeformer_weight
  fields from ReqProcess model
- Remove GFPGAN and CodeFormer entries from run_extras() signature
  and create_args_for_run dict in postprocessing.py
2026-02-08 22:59:28 +00:00
vladmandic d9a2a21c8c add sampler api endpoints
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-04 13:08:31 +01:00
Vladimir Mandic 20aeb8b793 /sdapi/v1/xyz-grid
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-31 11:04:50 +00:00
vladmandic 7bd04e0b5c add /detailers api endpoint
Signed-off-by: vladmandic <mandic00@live.com>
2025-12-06 12:33:52 +01:00
vladmandic ed45e0d793 remove invalid password from log
Signed-off-by: vladmandic <mandic00@live.com>
2025-11-23 13:09:51 -05:00
Vladimir Mandic 59864de067 update mime-types
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-14 15:47:13 -05:00
Vladimir Mandic 8fb037d4d4 wrap all internal api calls with auth check and use token when possible
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-11 18:13:47 -05:00
Vladimir Mandic d292c85df0 strong-enforce auth check on all api endpoints
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-08 11:41:24 -05:00
Vladimir Mandic 2aa917b58e add /sdapi/v1/modules endpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-12 15:09:08 -04:00
Vladimir Mandic 73049f7bb8 add load-checkpoint api endpoint and test all models script
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-09 14:06:54 -04:00
Vladimir Mandic 4b74fd26b5 redesign gpu monitor
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-07 13:56:13 -04:00
Vladimir Mandic a9c65c0e8c move api-only to legacy options
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-06 19:27:57 -04:00
Vladimir Mandic 66456f3b4f civitai search redesign prototype
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-04 15:53:43 -04:00
Vladimir Mandic 74d3f0bdd5 integrate nudenet
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-19 11:17:10 -04:00
Vladimir Mandic b2a52a146b fix ansi controle output and add model locking
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-06 12:50:09 -04:00
Vladimir Mandic e8b5ea3847 major refactor: remove backend original
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-05 13:16:46 -04:00
Vladimir Mandic f8977d2f01 add /sdapi/v1/controlnets api endpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-06-25 15:54:43 -04:00
Vladimir Mandic 3d52e3fe9f add /sdapi/v1/lora endpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-06-25 10:54:02 -04:00
Vladimir Mandic 6489e4c37d prompt-enhance api support and img2img support
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-05-08 15:31:07 -04:00
Vladimir Mandic 78e22350b9 add api get-checkpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-05-07 10:31:06 -04:00
Vladimir Mandic 10fb362bdc server state history
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-04-25 12:25:30 -04:00