Commit Graph

930 Commits (f5c037a7350a8a778e412ced3e53fec8dccb60ce)

Author SHA1 Message Date
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
Vladimir Mandic 2612ad95a9 fix stable-video-diffusion dtype mismatch
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-13 08:56:14 -05:00
Vladimir Mandic f4b0656dbb reduce requirements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-12 19:24:47 -05:00
Vladimir Mandic b045d72670 remove obsolete video scripts
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-09 09:54:17 -05:00
Vladimir Mandic 2c8cbf70a2 inline wildcard obey seed
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-04 20:50:13 -05: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 299c22ee91 fix nudenet
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-29 20:42:00 -04:00
Vladimir Mandic d43091f1fa lint set minimum to py310 and update rules
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-29 11:28:09 -04: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 0b346ec1ce add base and max shift parameters for flow-matching samplers
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-19 14:11:41 -04:00
Vladimir Mandic 4b95d72d45 video tab layout
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-18 14:07:52 -04:00
Vladimir Mandic 95217d48c1 xyz add guidance params
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-04 18:32:56 -04:00
Vladimir Mandic 8b698ed67f upadte qwen pruning and allow hf models in subfolders
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-04 15:49:20 -04: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 eb025eaf31 remove split-attention and add attention slicing option
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-28 18:01:34 -04:00
Vladimir Mandic 3275535867 update loopback and note changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-28 09:09:19 -04:00
Raphael Stoeckli a1214bfe30 Added option to randomize loopback iterations 2025-09-28 02:32:08 +02:00
Vladimir Mandic ae25cb8880 linting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-25 14:33:21 -04:00
Vladimir Mandic 7a3001170b add daam script
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-24 20:16:07 -04:00
Vladimir Mandic 696a41fd42 fix prompts-from-file state check
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-23 15:33:52 -04:00
Vladimir Mandic 2ac299a5a4 nunchaku flux.1-pulid
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-21 12:33:54 -04:00
Vladimir Mandic 47cba6b0a7 fix xyz with random seed
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-19 09:24:49 -04:00
Vladimir Mandic f8f958244f use new pydantic/albumentations/insightface
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-16 10:17:33 -04:00
Vladimir Mandic 8cd5fbc926 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-12 16:28:53 -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 aec30cc063 add --new flag
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-04 16:07:03 -04:00
Vladimir Mandic cda545ce18 fix process tab
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-03 17:08:18 -04:00
Vladimir Mandic 9743c8e4bf keep previous processed state
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-31 15:20:15 -04:00
Vladimir Mandic b2dbef53e5 restyled all toolbuttons to be modernui native
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-31 15:01:50 -04:00
Vladimir Mandic 29b081f032 fix infiniteyou offloading
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-29 13:36:37 -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 2a85c05689 refactor pipeline loaders to generic methods and introduce `te_shared_t5` option
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-11 16:05:39 -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 fa44521ea3 offload-never and offload-always per-module and new highvram profile
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-31 11:40:24 -04:00
Vladimir Mandic 8dae6d0c6d lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-29 09:24:23 -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 cf09227b7e more css
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-27 13:57:18 -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 ffcb102ce5 fix instantir
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-25 08:12:04 -04:00
Vladimir Mandic 7365b2e632 unique ui labels
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-24 09:14:22 -04:00
Vladimir Mandic 36c356785e modernui updates
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-22 10:07:17 -04:00
Vladimir Mandic a852d1cea9 add detailer expert mode
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-21 10:39:19 -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 3bf31eb4fd linting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-19 11:33:16 -04:00
Vladimir Mandic 74d3f0bdd5 integrate nudenet
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-19 11:17:10 -04:00
Vladimir Mandic e576ea4319 cn always generate blended processed image
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-18 18:19:56 -04:00
Vladimir Mandic da90c0c7ff reduce memory leak on control unit change
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-18 09:50:36 -04:00
Vladimir Mandic ee57eb6b45 fix control handling of init images
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-18 07:31:59 -04:00
Vladimir Mandic 54bdf011ed more linting and update diffusers
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-16 13:12:40 -04:00
Vladimir Mandic 17b8fcd902 lint fixes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-16 12:59:40 -04:00
Vladimir Mandic e2a443c885 control xyz support
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-16 12:07:43 -04:00
Vladimir Mandic 878fda65ab refactor control processing
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-16 11:04:48 -04:00
Vladimir Mandic cd84cfec11 xyzgrid with control tab
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-15 14:35:27 -04:00
Vladimir Mandic a77975165c fix xyz with control enabled
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-15 09:11:54 -04:00
Vladimir Mandic 79d0fb81af fix inpainting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-14 09:11:17 -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 c7ef692563 replace boundry with boundary
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-10 14:26:16 -04:00
Vladimir Mandic c559e26616 add builtin framepack
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-08 15:47:07 -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
Disty0 148b011692 IPEX fix bicubic upsample with torchvision 2025-07-06 18:19:55 +03:00
Disty0 526976eb64
Merge pull request #4019 from vladmandic/master
PixelArt
2025-07-06 14:19:19 +03:00
Disty0 d5d857aa96 Add sharpen filter to pixelart 2025-07-06 03:17:54 +03:00
Disty0 e255d89fd8 Add PixelArt filter to postprocess 2025-07-06 02:30:55 +03:00
Vladimir Mandic 8c676d0a61 lint formatting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-05 17:13:31 -04:00
Vladimir Mandic a5b77b8ee2 remove dead code
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-05 16:47:25 -04:00