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
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
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
CalamitousFelicitousness
73588c2000
Comment tweaks
2025-10-26 06:52:39 +00:00
CalamitousFelicitousness
33f335a98c
VQA class fix f-statement fix
2025-10-26 06:39:05 +00:00
CalamitousFelicitousness
1ac4214379
fix cls_name variable
2025-10-26 06:20:14 +00:00
CalamitousFelicitousness
80bb331169
Prompt enhance resizing and Qwen VL fix
2025-10-26 06:01:33 +00:00
CalamitousFelicitousness
c72d993ff4
Prompt enhance update
...
Added Qwen3-VL models to prompt enhance
Added Qwen2.5-VL and Glitter Gemma 4B to
img2img prompt enhance
2025-10-26 03:12:10 +00:00
Vladimir Mandic
5d0a3e5e8a
fix microsoft-florence
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-10-01 10:58:52 -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
33b92d9ad9
improve prompt enhance system prompt
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-08-12 15:09:08 -04:00
Vladimir Mandic
863e172aad
add Qwen/Qwen2.5-VL-3B-Instruct
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-08-12 15:09:08 -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
4b74fd26b5
redesign gpu monitor
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-08-07 13:56:13 -04:00
Vladimir Mandic
e4de0baa6f
prompt enhance improve tokenizer handler
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-07-27 14:22:24 -04:00
Vladimir Mandic
fd722311db
css and logging tweaks
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-07-27 08:17:41 -04:00
Vladimir Mandic
287c3600d7
torch compile for llm
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-07-20 12:07:30 -04:00
Vladimir Mandic
0f2f164245
add smollm3, add auraflow-0.2, enable taesd for auraflox
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-07-14 07:24:20 -04:00
Vladimir Mandic
b625884031
add gemma3n to caption/vlm and promptenhance
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-07-07 10:01:02 -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
7447a79b46
update requirements
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-06-27 17:58:18 -04:00
Disty0
17df7ba83b
Cleanup whitespace
2025-05-26 02:41:29 +03:00
hypercryptoman
ac05b96838
Update prompt_enhance.py
2025-05-19 13:55:16 +10:00
hypercryptoman
05fced7395
Update prompt_enhance.py
2025-05-19 13:53:24 +10:00
hypercryptoman
ba2eaaf295
Fix: Correct model_file parameter usage for custom load button
2025-05-19 13:45:05 +10:00
hypercryptoman
b23162a36b
Fix: Correct arguments for prompt_enhance.py apply method
2025-05-18 23:35:55 +10:00
Vladimir Mandic
39135c1d0a
ui-defaults match correct prompt component
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-05-15 08:51:03 -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
b9bf4e5c0f
prompt-enhance-i2i
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-05-12 09:59:40 -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
15ad788c70
prompt enhance add thinking-mode option
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-04-28 18:51:50 -04:00
Vladimir Mandic
8b0f5f687a
prompt-enhance add qwen3
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-04-28 18:28:37 -04:00
Vladimir Mandic
7bfeabd6a4
fix prompt enhance
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-04-26 14:31:32 -04:00
Vladimir Mandic
ba7120dfc6
prompt enhancer loader fix
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-04-22 12:14:37 -04:00
Vladimir Mandic
79d665e5da
prompt enhance lora extract/recombine
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-04-01 22:16:32 -04:00
Vladimir Mandic
e5a256e74d
prompt enhance add prefix and suffix
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-04-01 21:31:19 -04:00
Vladimir Mandic
b4c9eb193d
cleanup
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-31 11:00:21 -04:00
Vladimir Mandic
5e79cff7a3
prompt enhance rewrite lists
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-31 10:53:35 -04:00
Vladimir Mandic
ff6d5e6e88
prompt enhance clean prompt improvements
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-31 10:29:32 -04:00
Vladimir Mandic
15752f9299
prompt enhance loader exception logging
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-31 09:49:44 -04:00
Vladimir Mandic
68d440af5e
optimize default system prompt
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-29 13:28:14 -04:00
Vladimir Mandic
ac61fce526
prompt enhance add censor detection and debugging
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-29 11:43:22 -04:00
Vladimir Mandic
02f480bf32
add prompt enhance wiki
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-29 09:55:56 -04:00
Vladimir Mandic
f2f0390e9e
prompt enhance custom model loader
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-29 09:18:40 -04:00
Vladimir Mandic
8069c8caa9
add llm to progress
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-28 21:29:18 -04:00
Vladimir Mandic
1969ac96bb
skip prompt enhance on interrupt
...
Signed-off-by: Vladimir Mandic <mandic00@live.com >
2025-03-28 21:24:05 -04:00