Commit Graph

464 Commits (f5c037a7350a8a778e412ced3e53fec8dccb60ce)

Author SHA1 Message Date
CalamitousFelicitousness bf7a72f12e fix(caption): remove dead min_length param, split Florence/PromptGen prompts, fix gaze detection
- Remove caption_openclip_min_length from settings, API models, endpoints, and UI
  (clip_interrogator library has no min_length support; parameter was never functional)
- Split vlm_prompts_florence into base Florence prompts and PromptGen-only prompts
  (GENERATE_TAGS, Analyze, Mixed Caption require MiaoshouAI PromptGen fine-tune)
- Add 'promptgen' category to /vqa/prompts API endpoint
- Fix gaze detection: move DETECT_GAZE check before generic 'detect ' prefix
  to prevent "Detect Gaze" matching as detect target="Gaze"
- Update test suite: remove min_length tests, fix min_flavors to use mode='best',
  add acceptance-only notes, fix thinking trace detection, improve bracket/OCR tests,
  split Florence/PromptGen test coverage
2026-02-11 02:48:11 +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 83fa8e39ba refactor(api): update cli tools for DeepBooru tagger migration
- Update cli/api-interrogate.py to use /sdapi/v1/tagger for DeepBooru
- Handle tagger response format (scores dict or tags string)
- Remove DeepBooru test from interrogate endpoint tests
- Update API model descriptions to reference tagger for anime tagging
2026-02-11 02:47:41 +00:00
CalamitousFelicitousness 7825f44581 refactor(api): remove DeepBooru from interrogate endpoint
DeepBooru/DeepDanbooru should only be accessed via the tagger endpoint.
The interrogate endpoint is now exclusively for OpenCLIP/BLIP.

- Remove DeepDanbooru handling from post_interrogate
- Update docstring to reference tagger endpoint for anime tagging
- Simplify code by removing if/else branching
2026-02-11 02:47:40 +00:00
CalamitousFelicitousness a04ba1e482 feat(api): add missing caption API parameters for UI parity
Add prompt field to VQA endpoint and advanced settings to OpenCLIP endpoint
to achieve full parity between UI and API capabilities.

VLM endpoint changes:
- Add prompt field for custom text input (required for 'Use Prompt' task)
- Pass prompt to vqa.interrogate instead of hardcoded empty string

OpenCLIP endpoint changes:
- Add 7 optional per-request override fields: min_length, max_length,
  chunk_size, min_flavors, max_flavors, flavor_count, num_beams
- Add get_clip_setting() helper for override support in openclip.py
- Apply overrides via update_interrogate_params() before interrogation

All new fields are optional with None defaults for backwards compatibility.
2026-02-11 02:47:40 +00:00
CalamitousFelicitousness 5fc46c042e docs(api): synchronize API descriptions with UI hints
Update API model field descriptions to match the hints in locale_en.json
for consistency between UI and API documentation.

Updated models:
- ReqInterrogate: clip_model, blip_model, mode
- ReqVQA: model, question, system
- ReqTagger: model, threshold, character_threshold, max_tags,
  include_rating, sort_alpha, use_spaces, escape_brackets,
  exclude_tags, show_scores
2026-02-11 02:47:40 +00:00
CalamitousFelicitousness f431141d2f feat(api): add LLM generation parameters to VQA endpoint
Add optional LLM generation parameters to the VQA API request model,
allowing per-request override of settings:

- max_tokens, temperature, top_k, top_p, num_beams, do_sample
- thinking_mode, prefill, keep_thinking, keep_prefill

Changes:
- Add 10 new optional fields to ReqVQA model with descriptive docs
- Update get_kwargs() to support per-request overrides via singleton
- Add helper functions get_keep_thinking(), get_keep_prefill()
- Update post_vqa endpoint to pass generation kwargs
- Add _generation_overrides instance variable to VQA class
2026-02-11 02:47:40 +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
vladmandic d7ca4f63a7 update schedulers and lint everything
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-04 11:58:02 +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
CalamitousFelicitousness 761ea1c327 feat(settings): add base path support for output folders
Change "Images folder" and "Grids folder" settings to act as base paths
that combine with specific folder settings, rather than replacing them.

- Add resolve_output_path() helper function to modules/paths.py
- Update all output path usages to use combined base + specific paths
- Update gallery API to return resolved paths with display labels
- Update gallery UI to show short labels with full path on hover

Example: If base is "C:\Database\" and specific is "outputs/text",
the resolved path becomes "C:\Database\outputs\text"

Edge cases handled:
- Empty base path: uses specific path directly (backward compatible)
- Absolute specific path: ignores base path
- Empty specific path: uses base path only
2026-01-16 16:24:05 +00:00
awsr 1a083a54f4
Use generic type 2026-01-13 02:08:11 -08:00
awsr 0faabffc14
Simplify options init/save/load 2026-01-10 13:27:38 -08:00
vladmandic 4c35d3887e nvml warn once
Signed-off-by: vladmandic <mandic00@live.com>
2025-12-22 09:17:15 +01:00
Vladimir Mandic 469962cc9c
Merge pull request #4453 from awsr/python-datetime-compat
Fix timestamp formatting for thumbnails
2025-12-07 06:49:38 +01:00
awsr f01e977695
Fix timestamp formatting for thumbnails 2025-12-06 18:34:15 -08: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
vladmandic b5f000ab8a add xyz and script support to control api
Signed-off-by: vladmandic <mandic00@live.com>
2025-11-23 13:07:42 -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 7a5a0ebc0d improve version detect
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-12 18:56:38 -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 4033567d4f controlnet fixes and validation
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-30 13:36:58 -04:00
Disty0 0e6d67168d log correct xpu id 2025-10-27 02:14:41 +03:00
vladmandic 60ac82b191 add basic xpu gpu monitor
Signed-off-by: vladmandic <mandic00@live.com>
2025-10-26 18:55:54 -04:00
Vladimir Mandic 25e28050c3 update swagger docs
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-07 08:21:05 -04:00
Vladimir Mandic e54065c3b3 update nvml
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-14 11:17:03 -04:00
Vladimir Mandic 1c5b3a47e2 job history
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-12 22:14:07 -04:00
Vladimir Mandic 175e9cbe29 cleanup/refactor state history
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-12 16:12:45 -04:00
Vladimir Mandic 9bed503ce6 control handle override settings
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-11 16:06:03 -04:00
Vladimir Mandic 6a0090714c add reference models to gallery
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-10 10:21:51 -04:00
Vladimir Mandic d673c58c10 fix drop image to prompt in modernui
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-08 09:42:26 -04:00
Disty0 c210c93444 fix agent scheduler with pydantic 2 2025-09-04 23:38:45 +03:00
Vladimir Mandic 72a9094b42 better model version detect and experimental pydantic v2
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-04 12:41:40 -04:00
Vladimir Mandic 2318f97991 manual set dtype via api
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-14 15:35:50 -04:00
Vladimir Mandic e4cc2b1ee0 fix gallery mtime
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-14 09:42:58 -04:00
Vladimir Mandic 8e9244939b calc folder size
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-13 12:23:29 -04: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 a36676a5a9 cleanup lora api
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-12 08:49:38 -04:00
Vladimir Mandic 2a85c05689 refactor pipeline loaders to generic methods and introduce `te_shared_t5` option
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:05:39 -04:00
Vladimir Mandic 3e0fee01f9 cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-10 11:06:37 -04:00
Vladimir Mandic 752d636324 add /sdapi/v1/network
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-10 10:53:28 -04:00
Vladimir Mandic 41640773e5 fix global state tracking
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-10 09:19:49 -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 0cc24a6d81 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-08 18:09:46 -04:00
Disty0 5ffb6e8b88 Cleanup 2025-08-07 23:36:38 +03:00
Disty0 3edb80e1be Add api/rocm_smi.py 2025-08-07 23:23:24 +03:00
Vladimir Mandic e111d151e5 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-07 14:19:43 -04:00
Vladimir Mandic 5d9c0675e5 cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-07 13:56:13 -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 7167d9d82a api set default script-name
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-31 17:16:47 -04:00
Vladimir Mandic f53ee29366 infotext apply styles and fix progress bar
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-30 12:02:47 -04:00
Vladimir Mandic e8fedf0a73 fix api progress reporting endpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-30 08:32:30 -04:00
Vladimir Mandic 3bf31eb4fd linting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-19 11:33:16 -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 c4d9338d2e major refactoring of modules
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-03 09:18:38 -04:00
Vladimir Mandic 7fbac675fe api update default sampler
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-06-28 09:36:33 -04:00
Vladimir Mandic 82aaff9d70 gallery trace file fetch
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-06-26 07:59:51 -04:00
Vladimir Mandic 42b3e08e65 Control add setting to run hires with or without control
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-06-25 18:43:29 -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 5b486a6ef1 sdnq add xyz grid support, improve offloading compatibility
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-06-25 15:32:37 -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 8473bae0fc 1000 papercuts
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-05-13 21:51:33 -04:00
Vladimir Mandic 47862fef08 prompt enhance nsfw allow/disallow
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-05-12 20:33:16 -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 1da43e4f62 api b64 error handler
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-05-05 22:28:03 -04:00
Vladimir Mandic 0ef2249d55
Merge pull request #3903 from TsarFox/fix-vlm-api
Add `system` field to `ReqVQA`
2025-05-02 13:21:03 -04:00
Jakob L. Kreuze e6be2a6cdc
Add `system` field to `ReqVQA` 2025-05-02 11:13:29 -04:00
Vladimir Mandic 57da399a1e fix api checkpoint list
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-04-29 17:20:29 -04:00
Vladimir Mandic 10fb362bdc server state history
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-04-25 12:25:30 -04:00
Vladimir Mandic b5031a5eba lora modularize code
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-04-01 13:39:47 -04:00
Vladimir Mandic a3e10fd24c fix progress eta reporting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-03-16 11:22:29 -04:00
Vladimir Mandic dbfd59434f add gemma3
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-03-15 15:30:57 -04:00
Vladimir Mandic 60a7549614 configurable card sizes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-17 12:04:34 -05:00
Vladimir Mandic e95bd93f67 caption ui redesign
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-15 12:57:19 -05:00
Vladimir Mandic dbf20d1388 api refactor: force access control and handle subpaths
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-14 11:27:21 -05:00
Vladimir Mandic d01fefdb30 add locale override capabilities
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-09 09:27:06 -05:00
Vladimir Mandic e40b33d237 add vlms: qwen-vl2, smol-vl2, toriigate
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-02 17:07:43 -05:00
Vladimir Mandic 2963ce127c refactor interrogate/caption
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-01 15:40:19 -05:00
Vladimir Mandic 654f44f66f refactor interrogate/analyze/vqa code
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-01 11:47:20 -05:00
Vladimir Mandic ceaf0238fa update nvml
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-01 10:36:12 -05:00
Vladimir Mandic 19b01e5000 make nvml work in cli
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-01 10:31:07 -05:00
Vladimir Mandic 7d9b268655 update repo links
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-01-31 12:15:21 -05:00
Vladimir Mandic 68115410ff unified standar and modernui auth
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-01-24 11:09:24 -05:00
Vladimir Mandic bdf8ca7e27 add legacy mode indicator on splash screen
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-01-18 14:29:40 -05:00
Vladimir Mandic 6b225d0bc2 gallery add http fallback
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-01-16 11:00:23 -05:00
Disty0 705556d68d JPEG XL support 2025-01-12 00:38:13 +03:00
Vladimir Mandic 9f30abbad5 fix scheduler api
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-01-02 16:45:08 -05:00
Vladimir Mandic ea6d3107ab update all todo statements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-12-22 08:39:31 -05:00
Vladimir Mandic b6963470a9 conditional imports and summary timer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-11-29 10:05:06 -05:00
Vladimir Mandic 6aa7a4707e modules.lora full integration
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-11-29 09:39:38 -05:00
Vladimir Mandic 00ebdf3476 fix api scripts callbacks
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-11-27 10:07:37 -05:00