Commit Graph

12387 Commits

Author SHA1 Message Date
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 f3c4fae440 test(api): add caption API test suite
Comprehensive test script for all Caption API endpoints:
- GET/POST /sdapi/v1/interrogate (OpenCLiP/DeepBooru)
- POST /sdapi/v1/vqa (VLM captioning)
- GET /sdapi/v1/vqa/models, /sdapi/v1/vqa/prompts
- POST /sdapi/v1/tagger
- GET /sdapi/v1/tagger/models

Usage: python cli/test-caption-api.py [--url URL] [--image PATH]
2026-02-11 02:47:40 +00:00
CalamitousFelicitousness ef797169a3 refactor(interrogate): use configurable clip_models_path
- Remove unused paths import from deepbooru.py and openclip.py
- Use shared.opts.clip_models_path instead of hardcoded paths
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 6b89cc8463 feat(ui): add tooltips/hints to Caption tab
Add comprehensive tooltips to Caption tab UI elements in locale_en.json:

- Add new "llm" section for shared LLM/VLM parameters:
  System prompt, Prefill, Top-K, Top-P, Temperature, Num Beams,
  Use Samplers, Thinking Mode, Keep Thinking Trace, Keep Prefill

- Add new "caption" section for caption-specific settings:
  VLM, OpenCLiP, Tagger tab labels and all their parameters
  including thresholds, tag formatting, batch options

- Consolidate accordion labels in ui_caption.py:
  "Caption: Advanced Options" and "Caption: Batch" shared across
  VLM, OpenCLiP, and Tagger tabs (localized to "Advanced Options"
  and "Batch" in UI)

- Remove duplicate entries from missing section
2026-02-11 02:47:40 +00:00
vladmandic 7eb9b1cc5c create tests folder
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-10 14:31:53 +01:00
vladmandic d602a093fb lint
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-10 13:54:13 +01:00
vladmandic bd61633e14 switch to pyproject.toml for tool config
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-10 13:51:51 +01:00
vladmandic 684d77d871 update diffusers
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-10 11:49:01 +01:00
vladmandic e907a0a573 update graphics
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-09 22:46:32 +01:00
vladmandic 363cb175aa allow different lora in hires
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-09 22:31:00 +01:00
vladmandic 42d8ad498e add ftfy
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-09 19:54:26 +01:00
Vladimir Mandic 4e7b5c0b70 Merge pull request #4638 from vladmandic/revert-4629-public-re-export
Revert "Mark public re-exports"
2026-02-09 18:30:46 +01:00
Vladimir Mandic e3ca883cbd Revert "Mark public re-exports" 2026-02-09 18:30:18 +01:00
vladmandic 0d2e9fbf62 cleanup and update changelog
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-09 18:20:10 +01:00
Vladimir Mandic d0f9e25906 Merge pull request #4634 from CalamitousFelicitousness/nunchaku-reference
Nunchaku reference
2026-02-09 18:06:34 +01:00
Vladimir Mandic 480b58e994 Merge pull request #4636 from CalamitousFelicitousness/fix/installer-uv-clip
fix(installer): handle setuptools 82 removing pkg_resources and uv broken fallback
2026-02-09 17:52:02 +01:00
Vladimir Mandic b454fa9748 Merge pull request #4633 from awsr/patch-2
Linting rules: TCH -> TC
2026-02-09 17:50:58 +01:00
Vladimir Mandic 175771666b Merge pull request #4632 from awsr/patch-1
Add call to initGalleryAutoRefresh
2026-02-09 17:50:39 +01:00
CalamitousFelicitousness 4162fd84db fix(installer): handle setuptools 82 removing pkg_resources and uv broken fallback
- Build CLIP with --no-build-isolation to use venv's setuptools 69.5.1
  instead of pip pulling setuptools 82.0.0 (which removed pkg_resources)
  into an isolated build environment
- Add cleanup_broken_packages() to remove dist-info directories with
  missing RECORD files before falling back from uv to pip, preventing
  cascading install failures when uv partially installs packages
- Add no_build_isolation parameter to install() function
2026-02-09 01:38:44 +00:00
CalamitousFelicitousness 34a18c9098 fix: skip Nunchaku offloading for SDXL models
Nunchaku's SDXL UNet does not support offloading and raises
NotImplementedError when offload=True is passed. Skip the parameter
for SDXL and log a warning instead of crashing.
2026-02-07 22:27:05 +00:00
CalamitousFelicitousness 5000401647 docs(ui): add tooltips for Nunchaku attention and offload settings 2026-02-07 22:27:05 +00:00
CalamitousFelicitousness 33de04a0c7 feat: add 4-step Nunchaku variants for Qwen-Lightning models
Add 4-step distilled Nunchaku SVDQuant entries for Qwen-Lightning and
Qwen-Lightning-Edit alongside the existing 8-step variants. Step count
is now shown in the reference name (e.g. "Qwen-Lightning (4-step)").

- Add subfolder parameter to load_qwen_nunchaku to distinguish
  4-step (nunchaku-4step) from 8-step (nunchaku) variants
- Route to correct safetensors: lightningv1.0-4steps vs
  lightningv1.1-8steps for gen, lightningv1.0-4steps vs
  lightningv1.0-8steps for edit
- Strip nunchaku subfolder before pipeline from_pretrained since
  it does not exist in the base HuggingFace repos
2026-02-07 22:27:05 +00:00
CalamitousFelicitousness c8597ca84e feat: hide Nunchaku reference models on non-CUDA backends
Filter out reference entries tagged "nunchaku" from Extra Networks
when the active backend is not CUDA, since Nunchaku requires NVIDIA
GPUs. Entries remain in shared.reference_models for programmatic
lookup but are not yielded to the UI.
2026-02-07 22:27:05 +00:00
CalamitousFelicitousness a2ee885e28 refactor: update nunchaku repo URLs and version handling
- Rename HuggingFace org from nunchaku-tech to nunchaku-ai across all
  nunchaku model repos (flux, sdxl, sana, z-image, qwen, t5)
- Add per-torch-version nunchaku version mapping instead of single global
  version, with robust torch version parsing
2026-02-07 22:27:05 +00:00
CalamitousFelicitousness 8ff7074da5 feat: add Nunchaku variants for Fill and Depth in Flux Tools
- Add 'Fill (Nunchaku)' and 'Depth (Nunchaku)' options to Flux Tools
  dropdown, loading models with +nunchaku suffix for SVDQuant quantization
- Mark Fill and Depth nunchaku reference entries as hidden so they remain
  available for check_nunchaku() lookup but don't appear in Extra Networks
- Filter hidden reference models in ui_extra_networks_checkpoints
2026-02-07 22:27:05 +00:00
CalamitousFelicitousness 935a4fcb03 feat: add Nunchaku group to reference
Replace manual Model/TE checkboxes in Quantization Settings with a
dedicated "Nunchaku" tab in the Extra Networks menu where users can
directly select nunchaku-quantized model variants. Detection is now
using a +nunchaku path marker for disambiguation.
2026-02-07 22:27:05 +00:00
awsr 3ba1cfb540 Fix typo 2026-02-07 14:25:02 -08:00
awsr 89dd406a1d Add call to initGalleryAutoRefresh 2026-02-07 12:14:02 -08:00
Vladimir Mandic bf1e763156 add attention benchmark
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-07 13:37:09 +00:00
Vladimir Mandic 3aac1f6510 Merge branch 'master' into dev 2026-02-07 13:10:43 +01:00
Vladimir Mandic d8362182bc Merge pull request #4629 from awsr/public-re-export
Mark public re-exports
2026-02-07 13:10:02 +01:00
Vladimir Mandic bf36047ca6 Merge pull request #4630 from Tillerz/dev
test script for (un)weighted wildcards
2026-02-07 13:09:27 +01:00
vladmandic 38e52b8570 update modernui submodule
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-07 13:07:55 +01:00
Vladimir Mandic a0f9447d04 add --remote cmd opt
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-07 10:17:32 +00:00
Vladimir Mandic e8ff09a2d2 fix lora unload and improve preview error handler
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-07 09:07:34 +00:00
Oliver Hertel 9ebd05dc7b test file for weighted lists 2026-02-07 09:57:19 +01:00
Vladimir Mandic 04d7dbc1b8 update model template 2026-02-07 09:16:56 +01:00
Vladimir Mandic 56d0aade56 update gh templates 2026-02-07 08:05:06 +01:00
awsr e199f2d351 Update images.py exports 2026-02-06 14:29:46 -08:00
awsr c288f0de14 Explicitly mark additional items as re-exported 2026-02-06 14:16:46 -08:00
awsr 8e4aa8dbe1 Add comment 2026-02-06 13:42:37 -08:00
awsr 1e668fe86d Mark public re-exports
See: https://typing.python.org/en/latest/spec/distributing.html#import-conventions
2026-02-06 13:28:21 -08:00
Vladimir Mandic 5e2ab3057f Merge pull request #4627 from vladmandic/master
refresh dev
2026-02-06 14:16:01 +01:00
Vladimir Mandic 6eb1d0a2bf Merge pull request #4626 from vladmandic/dev
merge dev
2026-02-06 14:15:10 +01:00
vladmandic ef75acffb4 update changelog
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-06 14:11:46 +01:00
Vladimir Mandic 4db4ff00ca Merge pull request #4625 from awsr/gallery-auto-refresh
Gallery: Add auto-update setting and functionality
2026-02-06 13:07:41 +01:00
Vladimir Mandic 54fac3090c Merge pull request #4624 from awsr/subfolder-fix
Gallery: Restore subfolder handling and fixes
2026-02-06 13:06:54 +01:00
awsr ade7c2e5f9 Add auto-update setting and functionality 2026-02-06 00:50:04 -08:00
awsr f84cb6ac64 Track active gallery element 2026-02-06 00:44:48 -08:00