Commit Graph

324 Commits (0e0b607cfaabf59167e3ab2a44d491b4e4e1b08e)

Author SHA1 Message Date
vladmandic 64e193b60b merge: cli/hf-search.py 2026-03-12 14:11:47 +01:00
awsr feffbe0851
Update `subprocess.run` usage 2026-03-05 20:06:09 -08:00
Vladimir Mandic 6fdd3a53cf reduce mandatory requirements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-18 17:53:08 +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
vladmandic b4e5b563c6 update lint rules
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-11 10:47:07 +01:00
CalamitousFelicitousness 80014fac7c fix(caption): address PR review feedback
- Remove superfluous SimpleNamespace import in cli/api-caption.py, use Map instead
- Drop _ prefix from internal helper functions in modules/api/caption.py
- Move DeepDanbooru model path to top-level models folder instead of nesting under CLIP
2026-02-11 02:50:06 +00:00
CalamitousFelicitousness 139e331d80 style(caption): fix lint warnings across caption module
- Rename shadowing import in waifudiffusion batch to avoid F823/E0606
- Fix import order in cli/api-caption.py (stdlib before third-party)
- Rename local variable shadowing function name in cli/api-caption.py
- Remove unnecessary global statement in devices.bypass_sdpa_hijacks
2026-02-11 02:50:06 +00:00
CalamitousFelicitousness e2cdbe47fa fix(caption): safetensors-only downloads, model load fixes, UI default, prefill tests
- Add use_safetensors=True to all 16 model from_pretrained calls to
  avoid downloading redundant .bin files alongside safetensors
- Add device property to JoyTag VisionModel so move_model can relocate
  it to CUDA (fixes 'ViT object has no attribute device')
- Fix Pix2Struct dtype mismatch by casting float inputs to model dtype
  while preserving integer tensor types
- Patch AutoConfig.register with exist_ok=True during Ovis loading to
  handle duplicate aimv2 registration on model reload
- Detect Qwen VL fine-tune architecture from config model_type instead
  of repo name, fixing ToriiGate and similar third-party fine-tunes
- Change UI default task from Short Caption to Normal Caption, and
  preserve it on model switch instead of resetting to Use Prompt
- Add dual-prefill testing across 5 VQA test methods using a shared
  _check_prefill helper
- Fix pre-existing ruff W605 in strip_think_xml_tags docstring
2026-02-11 02:48:11 +00:00
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 588222f2d1 test: update caption API tests
Update cli/test-caption-api.py:
- Update test structure for new caption API endpoints
- Fix Moondream gaze detection test prompt to use 'Detect Gaze'
  instead of 'Where is the person looking?' to match handler trigger
- Improve test result categorization and tracking
2026-02-11 02:48:11 +00:00
CalamitousFelicitousness d78c5c1cd0 refactor: update CLI tools for caption module
- Rename cli/api-interrogate.py to cli/api-caption.py
- Update cli/options.py, cli/process.py for new module paths
- Update cli/test-tagger.py for caption module imports
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 3208067259 test(api): improve caption API test coverage and validation
Add model architecture coverage tests:
- VQA model family detection for 19 architectures
- Florence special prompts test (<OD>, <OCR>, <CAPTION>, etc.)
- Moondream detection features test
- VQA architecture capabilities test
- Tagger model types and WD version comparison tests

Improve test validation:
- Add is_meaningful_answer() to reject responses like "."
- Verify parameters have actual effect (not just accepted)
- Show actual output traces in PASS/FAIL messages
- Fix prefill tests to verify keep_prefill behavior

Add configurable timeout:
- Default timeout increased to 300s for slow models
- Add --timeout CLI argument for customization

Other improvements:
- Add JoyCaption to recognized model families
- Reduce BLIP models to avoid reloading large models
- Better detection result validation for annotated images
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 385532154f Merge remote-tracking branch 'origin/dev' into refactor/remove-face-restoration
# Conflicts:
#	.pylintrc
#	.ruff.toml
2026-02-10 14:38:14 +00:00
vladmandic 7eb9b1cc5c create tests folder
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-10 14:31:53 +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 0d2e9fbf62 cleanup and update changelog
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-09 18:20:10 +01:00
CalamitousFelicitousness 3d0edb4f8f refactor: remove face restoration from CLI tools and XYZ grid
- Remove gfpgan/codeformer face template lines from cli/generate.py
- Remove gfpgan_visibility, codeformer_visibility, codeformer_weight
  from cli/generate.json upscale config
- Simplify cli/process.py upscale_restore_image() to remove the
  restore path and codeformer parameters
- Remove codeformer/gfpgan special cases from xyz_grid_shared.py
  apply_detailer(), keep generic boolean parsing
- Remove p.restore_faces assignment from xyz_grid_on.py
2026-02-08 23:00:05 +00:00
Vladimir Mandic bf1e763156 add attention benchmark
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-07 13:37:09 +00:00
Oliver Hertel 9ebd05dc7b test file for weighted lists 2026-02-07 09:57:19 +01:00
vladmandic 605d87cb2d reorg cli
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-05 10:33:42 +01:00
vladmandic 2d6cc5addb metadata restore to always-on scrips
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-05 10:21:49 +01:00
vladmandic 2ec79a1807 update changelog and todo
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-04 14:10:17 +01: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
CalamitousFelicitousness 26c679f9e7 refactor(caption): remove unused _device tracking property 2026-01-21 11:56:07 +00:00
CalamitousFelicitousness 6b10f0df4f refactor(caption): address PR review feedback
Rename WD14 module and settings to WaifuDiffusion:
- Rename wd14.py to waifudiffusion.py
- Rename WD14Tagger class to WaifuDiffusionTagger
- Rename WD14_MODELS constant to WAIFUDIFFUSION_MODELS
- Rename settings: wd14_model -> waifudiffusion_model,
  wd14_character_threshold -> waifudiffusion_character_threshold
- Update all log messages from "WD14" to "WaifuDiffusion"

Code quality improvements:
- Simplify threshold parameter defaulting using `or` operator
- Extract save_output logic into _save_tags_to_file() helper with
  isolated error handling to prevent single file failures from
  impacting entire batch
- Fix timing log format consistency (remove 's' suffix)
2026-01-21 11:56:07 +00:00
CalamitousFelicitousness 5abb794462 style(test): remove unused imports in test-tagger.py 2026-01-21 11:56:07 +00:00
CalamitousFelicitousness becb19319d refactor(caption): unify tagger settings and reorganize Caption Tab UI
Consolidate WD14 and DeepBooru tagger settings into unified options:
- Merge wd14_general_threshold + deepbooru_score_threshold → tagger_threshold
- Merge wd14_include_rating + deepbooru_include_rating → tagger_include_rating
- Rename interrogate_score → tagger_show_scores
- Rename tagger_escape → tagger_escape_brackets
- Rename CLiP → OpenCLiP in caption type choices

UI reorganization:
- Add Interrogate tab to Caption Tab with default caption type selector
- Move interrogate_offload to Model Offloading section as "Offload caption models"
- Hide Interrogate settings section (all settings now in Caption Tab UI)
- Update locale_en.json for OpenCLiP naming

Code improvements:
- DeepBooru tag_multi() now accepts same parameters as WD14 for unified interface
- Fix setting references in interrogate.py for consolidated settings
- Add comprehensive tagger test suite (cli/test-tagger.py)
2026-01-21 11:56:07 +00:00
vladmandic 8cf27dffdb allow unsafe ssl context for downloads
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-19 17:36:01 +01:00
vladmandic 0d90d95bf6 lint and safeguard glm
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-16 09:40:48 +01:00
awsr 6d4b79659e
Linting 2026-01-02 18:47:46 -08:00
Vladimir Mandic 0b1e6d2d3c improve offloading
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-12-25 10:24:02 +00: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 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 3ae10dd0e1 add nvidia-chronoedit
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-30 19:52:29 -04:00
Vladimir Mandic 4033567d4f controlnet fixes and validation
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-30 13:36:58 -04:00
Vladimir Mandic 203e46af0c update reference sizes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-25 12:18:52 -04:00
Vladimir Mandic ae25cb8880 linting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-25 14:33:21 -04:00
Vladimir Mandic 70319ee7db lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-27 09:52:28 -04:00
Vladimir Mandic 74da5095f0 fix and regenerate locales
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-20 14:40:39 -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 28ad5bb0c3 image download use real filename
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-12 08:15:29 -04:00
Vladimir Mandic 6312b3d0ac add Qwen3-4B-Instruct-2507 llm and Flash-FlowMatch scheduler
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:35:16 -04:00
Vladimir Mandic 601645fa8f fix hunyuandit
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:05:39 -04:00
Vladimir Mandic 87bd347116 cleanup flux loader
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:05:39 -04:00
Vladimir Mandic c92e329234 fix cosmos-t2i
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:05:39 -04:00
Vladimir Mandic dc8a72947d fix meissonic
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:05:39 -04:00
Vladimir Mandic e42a27a0e4 fix chroma
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:05:39 -04:00