Commit Graph

12058 Commits

Author SHA1 Message Date
Disty0 784cda80aa update sdnq 2026-01-14 16:23:26 +03:00
vladmandic 4dbdee10e3 switch lora logic and improve ui networks filter
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-14 10:31:21 +01:00
vladmandic e5176ef1f3 update requirements
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-14 09:03:44 +01:00
Vladimir Mandic ff06011349 Merge pull request #4547 from awsr/typing
Typing and related
2026-01-14 08:38:21 +01:00
awsr 494dd1c4b1 Remove unnecessary typing 2026-01-13 16:54:17 -08:00
awsr 6335130ca5 Rewrite to satisfy type checker 2026-01-13 16:44:54 -08:00
awsr b2798b15db Improved Options init 2026-01-13 16:08:58 -08:00
awsr 071ba20cc3 Trim leading and trailing space from doc 2026-01-13 15:41:30 -08:00
awsr 56d90b629c Reorder imports 2026-01-13 15:33:29 -08:00
awsr de52f6bfda Update ui_models.py 2026-01-13 15:33:18 -08:00
awsr 1dffdc17a9 Revert classvar removal. Simplify and update 2026-01-13 14:30:34 -08:00
Vladimir Mandic 8500156888 improve queue management
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-13 12:58:14 +00:00
awsr cf41ba15d9 More robust type enforcement 2026-01-13 04:10:35 -08:00
awsr 3654d0fa18 Update typing, remove incorrect typing 2026-01-13 04:09:58 -08:00
awsr 6cec9828e8 Fix OptionInfo typing
Warning: This effectively disables type checking for `shared.opts`
2026-01-13 04:08:48 -08:00
awsr 08c871e8d1 Remove unused class vars 2026-01-13 04:08:48 -08:00
awsr a30229c6f0 Type update and minor consolidation 2026-01-13 02:23:19 -08:00
awsr ec86e52ded Correct type enforcement 2026-01-13 02:11:58 -08:00
awsr 2394a7fac1 Ignore false positives with static typing 2026-01-13 02:10:38 -08:00
awsr 1a083a54f4 Use generic type 2026-01-13 02:08:11 -08:00
Vladimir Mandic e7809b11cd reapply offload hooks on diffusers lora load
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-13 10:07:30 +00:00
vladmandic f21a943028 gallery save/delete checks
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-13 09:57:22 +01:00
awsr 3c9e349176 Explicit conversion to list 2026-01-12 14:39:36 -08:00
awsr 8932f11837 Use cast to resolve type error
No impact during runtime
2026-01-12 14:38:30 -08:00
Vladimir Mandic 33e0d0f9ed ltx2 vae fix
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-12 18:40:25 +00:00
vladmandic 5e4ed9c9bb fix ltx2
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-12 17:12:13 +01:00
vladmandic 280da2c10b cleanup
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-12 16:14:32 +01:00
Vladimir Mandic 1cdb46c455 Merge pull request #4538 from CalamitousFelicitousness/state-cleanup-patch
fix(control): ensure state cleanup runs reliably
2026-01-12 16:12:27 +01:00
CalamitousFelicitousness ca3aecef2d Revert: btn_generate.click call removal 2026-01-12 14:12:44 +00:00
CalamitousFelicitousness 9f6e34371f revert: restore state tracking in control/run.py 2026-01-12 14:12:44 +00:00
CalamitousFelicitousness 2fd52ae230 fix(control): ensure state cleanup runs reliably
Fix control tab getting stuck in running state
after generation completes.
2026-01-12 14:12:44 +00:00
vladmandic e4e863fd6d lint and update diffusers
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-12 12:31:29 +01:00
Vladimir Mandic 1f92d7c24c Merge pull request #4544 from CalamitousFelicitousness/feat/prompt-enhance-update
Prompt Enhance Update
2026-01-12 12:00:26 +01:00
CalamitousFelicitousness 86744ebd76 feat(prompt-enhance): add Top-K and Top-P sampler controls
Add Top-K and Top-P sampling parameters to match VQA capabilities:
- Top-K: 0-100 (default 0 = disabled)
- Top-P: 0.0-1.0 (default 0 = disabled)

Parameters are only passed to the model when > 0, matching VQA behavior.
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness e881faa2fb feat(vlm): align default generation settings
Update default settings for both Prompt Enhance and VQA:
- max_tokens: 512 (prompt enhance)
- do_sample: True
- temperature: 0.8

These defaults provide better output quality with more creative
variation while maintaining coherent results.
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness 0659759e90 fix(vqa): improve unload logging consistency
Add before/after debug messages when unloading VQA model to match
the pattern used in prompt enhance for better debugging visibility.
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness de1d520929 fix(prompt-enhance): align with VQA approach and fix multiple issues
Thinking mode alignment with VQA:
- Expand is_thinking_model() detection (moondream, mimo patterns)
- Use manual </think> tag approach instead of enable_thinking parameter
- Handle prefill via string concatenation, not assistant message

Bug fixes:
- Fix max_new_tokens (was input_len + tokens, now just tokens)
- Fix vision toggle not disabling vision (wrap image processing in check)
- Fix VL processor error when vision disabled (explicit text= parameter)
- Add error handling when vision enabled but no image provided

Debug logging consistency with VQA:
- Add model_class to entry debug
- Add input_ids_shape to tokenization debug
- Rename raw -> response_before_clean, response -> response_after_clean

UI improvements:
- Make Enhanced prompt textarea scrollable (max_lines=12)
- Remove redundant mode variable from logging
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness d1a08ec801 fix(prompt-enhance): add Kanvas image support and debug logging
Add fallback to ui_control_helpers.input_source when Gradio image
component is empty, which occurs when Kanvas is active (replaces
gr.Image with gr.HTML).

Also standardize debug logging:
- Add debug at enhance() entry, chat template, tokenization
- Change shared.log.trace() calls to use debug_log() for consistency
- All debug output controlled by SD_LLM_DEBUG environment variable
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness 5f1fbbaeca ui(prompt): add descriptive placeholders to text fields
Clarify purpose of empty fields with placeholder text:
- System prompt: explains built-in instructions used when empty
- Prefix/suffix: describe where text is added to result
- Output: indicates where enhanced prompt appears
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness 2b8ecf01e2 docs(i18n): improve prompt enhance hints
Improve formatting and clarity of prompt enhance tooltips:
- Add spacing with <br><br> for better readability
- Clarify that prefix/suffix bypass LLM rewriting
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness 7c8f7fd296 feat(prompt): add prefill and thinking mode handling
Add prefill text support and proper thinking tag handling:
- Prefill text input to pre-fill start of model response
- Keep Prefill toggle to retain/remove prefill from output
- Keep Thinking Trace toggle to format <think> tags as readable output
- Proper <think> tag cleanup: strip or format as "Reasoning:/Answer:"
- Support for prefill + thinking combination via keep_think_block_open()

Chat template uses continue_final_message=True when prefill provided,
allowing model to continue from the prefill text naturally.
2026-01-12 00:17:20 +00:00
CalamitousFelicitousness a77173881f feat(prompt): add vision/reasoning symbols and vision toggle
Add visual capability indicators and user control for image input:
- Vision symbol (eye icon) for VL-capable models in dropdown
- Reasoning symbol (lightbulb) for thinking-capable models
- "Use vision" checkbox to control image input for enhancement
- Toggle dims and unchecks when non-VL model selected
- Vision auto-enables when switching to VL model

Also:
- Rename "Do sample" to "Use samplers" for consistency with VQA
- Add tooltips/hints for all prompt enhance UI elements
- Add CSS styling for dimmed vision toggle appearance
2026-01-12 00:17:20 +00:00
Vladimir Mandic c1f9646eaa Merge pull request #4541 from awsr/save-update
Update config saving
2026-01-11 13:05:29 +01:00
awsr 418134b820 Update default filename handling 2026-01-10 14:53:07 -08:00
awsr 7e947e8150 Update saving 2026-01-10 13:58:13 -08:00
awsr 0faabffc14 Simplify options init/save/load 2026-01-10 13:27:38 -08:00
vladmandic 15ba025044 Merge branch 'dev' of https://github.com/vladmandic/sdnext into dev 2026-01-10 20:50:50 +01:00
vladmandic f5f4c60820 recommend restart on update
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-10 20:50:48 +01:00
Disty0 fa2917a6be cleanup 2026-01-10 20:48:36 +03:00
Disty0 f4d87d6cdf fix ltx2 fp64 on alchemist 2026-01-10 20:46:03 +03:00