Commit Graph

900 Commits (fb2f9ea650a1c2c7432f41cd74c03be4e6e62d31)

Author SHA1 Message Date
vladmandic 59a07a33cd fix postprocess upscaler refresh
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-18 08:33:42 +01:00
vladmandic 9eced4ff86 cleanup
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-13 15:05:47 +01:00
vladmandic 6821d92a92 use aux for prompt enhance
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-13 13:05:34 +01:00
vladmandic 242325c11d merge: scripts/prompt_enhance.py 2026-03-13 13:04:35 +01:00
vladmandic f9abe07035 cleanup logging and update requirements
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-13 13:02:41 +01:00
vladmandic 9df9ed1b05 update gemini models
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-04 07:31:36 +01:00
vladmandic 04757adc78 lint
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-02 11:09:15 +01:00
vladmandic 1ddd0bf33a add gemini to prompt enhance
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-02 11:01:17 +01:00
vladmandic 2da67ce7d3 cleanup and fix monitor
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-28 12:31:09 +01:00
vladmandic b111e7d782 remove script: xadapter
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-24 18:19:23 +01:00
Vladimir Mandic 9a63ec758a initial pyright lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-21 09:32:36 +01:00
Vladimir Mandic 58fe1f59ff add alternative insightfacex 2026-02-20 21:09:43 +01:00
Vladimir Mandic f78f0eb4a5 refactor imports 2026-02-19 15:28:24 +01:00
Vladimir Mandic 216558185b update installer usage 2026-02-19 12:21:46 +01:00
Vladimir Mandic 4006b3e093 pylint 2026-02-19 11:36:20 +01:00
Vladimir Mandic d65a2d1ebc ruff lint 2026-02-19 11:13:44 +01:00
Vladimir Mandic e5c494f999 cleanup logger 2026-02-19 11:09:13 +01:00
Vladimir Mandic a3074baf8b unified logger 2026-02-19 09:46:42 +01: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 d6bbfe3dc2 experimental python==3.14 support
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-17 22:08:36 +01:00
vladmandic 88db926ecd remove clip as requirement
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-12 08:40:10 +01:00
vladmandic da1cf2f996 refactor image methods
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-11 12:29:00 +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
CalamitousFelicitousness 76aa949a26 refactor: integrate sharpfin for high-quality image resize
Vendor sharpfin library (Apache 2.0) and add centralized wrapper
module (images_sharpfin.py) replacing torchvision tensor/PIL
conversion and resize operations throughout the codebase.

- Add modules/sharpfin/ vendored library with MKS2021, Lanczos3,
  Mitchell, Catmull-Rom kernels and optional Triton sparse acceleration
- Add modules/images_sharpfin.py wrapper with to_tensor(), to_pil(),
  pil_to_tensor(), normalize(), resize(), resize_tensor()
- Add resize_quality and resize_linearize_srgb settings
- Add MKS2021 and Lanczos3 upscaler entries
- Replace torchvision.transforms.functional imports across 18 files
- to_pil() auto-detects HWC/BHWC layout, adds .round() before uint8
- Sparse Triton path falls back to dense GPU on compilation failure
- Mixed-axis resize splits into two single-axis scale() calls
- Masks and non-sRGB data always use linearize=False
2026-02-11 09:57:37 +01: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
CalamitousFelicitousness 54c18d3f32 refactor: convert XYZ grid detailer option to boolean dropdown
- Change AxisOption type from str to bool with [False, True] choices
- Simplify apply_detailer() to accept bool directly
- Fix log message from "face-restore" to "detailer"
2026-02-09 02:16:24 +00: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
CalamitousFelicitousness 1e23495039 refactor: delete CodeFormer, GFPGAN, and face restoration modules
Remove all vendored face restoration code that is no longer maintained:

- modules/postprocess/codeformer_model.py, codeformer_arch.py, vqgan_arch.py
- modules/postprocess/gfpgan_model.py, restorer.py
- modules/face_restoration.py (base class and dispatcher)
- scripts/postprocessing_codeformer.py, postprocessing_gfpgan.py
- modules/facelib/ (vendored face detection/parsing library)

These were the only two backends registered in shared.face_restorers,
making the entire face restoration infrastructure dead code.
2026-02-08 22:58:33 +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
vladmandic 2d6cc5addb metadata restore to always-on scrips
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-05 10:21:49 +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
Vladimir Mandic f5630fdf63 fix typo
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-31 10:30:46 +00:00
vladmandic f9aa2591e5 fix gallery save/delete
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-20 09:53:20 +01:00
vladmandic cc0b0e8e3d cleanup todo
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-19 11:10:05 +01:00
Vladimir Mandic 30da7803b5 futureproof
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-15 09:29:26 +00: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 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
vladmandic ec007a3018 add laplace beta scheduler
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-10 08:41:27 +01:00
awsr 00d3be3dba show_progress requires "full", "minimal", or "hidden" 2025-11-28 02:27:19 -08: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
awsr 2e87e20c30 Allow \, to prevent text splitting 2025-11-15 13:09:05 -08:00
awsr 3d604948ea Allow using `|` as a delimiter instead of `,`
This useful for when you want to test combinations of multiple items that would need to be separated by a comma.
2025-11-15 13:09:04 -08:00
Vladimir Mandic d8eadcb7c1 add warn in animatediff
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-13 10:04:44 -05:00
Vladimir Mandic eebd980b2f fix animatediff
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-13 09:28:08 -05:00