Commit Graph

117 Commits

Author SHA1 Message Date
Vladimir Mandic 79a843474d Merge branch 'dev' into feat/attention-core 2026-08-26 15:59:28 +02:00
Vladimir Mandic d0cceefd0f Merge pull request #5064 from vladmandic/dev
refresh branch
2026-08-26 15:48:41 +02:00
Vladimir Mandic acb4e758d3 add heif/heic support
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-26 10:24:17 +02:00
CalamitousFelicitousness 4ae6515163 feat(lora): quantized apply method setting
New lora_sdnq_apply radio (exact, requantize) in the lora settings.
requantize keeps the previous behavior: every quantized layer takes the
dequantize-add-requantize path, with factor attach and svd hosting gated
off. A settings-only flip re-applies loaded networks: the mechanism
rides a per-module apply stamp and the network-changed signature, and
the activate fallthrough strips factors a closed gate leaves attached.
Requantize chosen by the setting logs as info instead of the
reduced-fidelity warning.

- locale hint covers fidelity and memory tradeoffs of both methods
- suite: gate, legacy routing and flip-transition tests
2026-08-25 00:25:22 +01:00
CalamitousFelicitousness 8c377aeeee refactor(settings): dedicated lora settings tab
The lora block moves out of Networks into its own settings tab, with
header groups by what each option acts on: loading, prompt, application,
quantized models and metadata. Locale hints follow to the new section.
2026-08-25 00:25:22 +01:00
CalamitousFelicitousness 82a7e94450 feat(lora): activation-weighted hosting via per-checkpoint calibration
Plain svd truncation of hosted deltas is optimal in weight space but not
in output space: activations concentrate energy in a few input channels,
so scaling the delta by per-channel input RMS before the svd spends the
rank budget on output error instead. Statistics stream from the model's
own forwards on sub-8-bit SDNQ checkpoints and cache per checkpoint;
measured on real LoKR files this raises output-delta retention by ~0.05
at rank 256 and ~0.09 at rank 64, most on MLP down projections.

- modules/lora/lora_calib.py: capture hooks, per-checkpoint cache under
  data/sdnq-calib, statistics land on layers as sdnq_calib_rms; gated by
  lora_sdnq_host_calib, skipped when the model is compiled
- lora_sdnq.apply_hosted: weighted truncation when statistics exist,
  calib count in the load summary
- cli/sdnq-calibrate.py: complete calibration now against a live server
- cli/lora-quant-fidelity.py --calib: hosted rho scored in the
  activation-weighted norm
- test/test-sdnq-lora-factors.py: calibration category, 5 tests
2026-08-25 00:25:22 +01:00
CalamitousFelicitousness 6c0dd0b15f feat(lora): host non-factorable adapters on the sdnq side-channel
Non-additive families (lokr, loha, oft, dora, full) merged into the
quantized weight and lost most of their delta on low-bit formats. On
sub-8-bit layers the set's calc_updown delta now rides the svd
side-channel as its top singular directions instead: factorable members
are subtracted out and appended exactly, so only the non-factorable
remainder is truncated. Truncation keeps the dominant part of the
effect and drops an orthogonal residual, where requantize keeps the
grid extrema and adds grid-shift noise of the delta's own magnitude;
on real lokr files retention rises from 0.04 to about 0.5 at the
default rank.

Hosted layers take no weight backup and unload bit-exactly. The svd
runs under a forked rng so generation seeds are unaffected. At 8 bits
and above requantize retains most of the delta and remains the path.
lora_sdnq_host_rank caps the hosted rank; 0 disables hosting.
2026-08-25 00:25:22 +01:00
CalamitousFelicitousness 10771bd123 Merge branch 'dev' into feat/attention-core
dev added sdnq_attention_quantize_fp32 to modules/attention.py, which this
branch replaced with the modules/attention package. The option moves to the
sdnq backend in two places: the options dict the prepared call captures, and
the options tuple that rebuilds the chain when a captured option changes.
Reading it in only the first place would leave a setting that takes effect on
the next model load and not before.

The new option gets a hint alongside the rest of the section.
2026-08-24 22:54:59 +01:00
CalamitousFelicitousness fcadb4fa9b docs(settings): hint the attention settings
Everything under Cross Attention, SDNQ Attention and Attention Dispatcher
shipped with no hint, which left the layering invisible: the SDP kernel boxes
are candidates torch chooses from per call rather than a selection, and the
Flash box is torch's own build of the kernel rather than the flash-attn package
that the Flash attention override installs.

- cover attention method, sdp kernels, sdp overrides and attention slicing
- give the dynamic attention rates their unit and the estimate they compare against
- cover the sdnq attention kernel settings, including the head dimension clamp
  that the hadamard group size resolves through
- cover the diffusers attention dispatcher and the backend names it takes
- record the constraints each override serves, leaving the throughput comparison
  to the workload rather than naming a winner
2026-08-24 21:59:58 +01:00
CalamitousFelicitousness 4d6f2b65c8 chore(settings): remove the bmm attention methods
Batch matrix-matrix and Dynamic Attention BMM applied a legacy Attention
processor to pipe.unet, which a diffusion transformer does not have, so
they served unet models alone and said nothing elsewhere. The choices, the
processor and its slice helper are removed, an unrecognized method now
warns rather than selecting nothing, and a stored value is rewritten to
Scaled-Dot-Product on load.
2026-08-24 19:59:41 +01:00
Vladimir Mandic 3d7c138a83 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-19 19:02:39 +02:00
Vladimir Mandic c66342e2e6 fallback unpack-latents, log client auth, update login page
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-19 18:03:39 +02:00
Vladimir Mandic 9f650367cb multiple cleanups
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-17 09:35:07 +02:00
Vladimir Mandic 7172fd3eb2 api auth for ws and api validate allowed paths
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 18:57:26 +02:00
Vladimir Mandic f30e6baa67 codespell
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 12:45:50 +02:00
Vladimir Mandic 84eda5b9cf Merge branch 'dev' into fix/group-offload-roles 2026-08-16 09:06:01 +02:00
Vladimir Mandic a6a6fb2aaa add minimax interpolation, video shift, audio shift
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-15 18:35:17 +02:00
Vladimir Mandic 87824ad0a3 update video codecs
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-15 14:23:18 +02:00
CalamitousFelicitousness 09eeff30c7 refactor(settings): reorganize the offload settings by mode
The offload section interleaved shared and mode-specific options. The
page now reads top down: general options, an Offload Overrides section
holding the exclusions shared by balanced and group offload, then one
tuning section per mode. Use torch streams becomes Prefetch with streams
and Record torch streams becomes Overlap stream transfers, the section
headers carry hints, and the hints reflect live behavior, including
dropping the model-reload badge from options that apply on change.
2026-08-14 23:59:55 +01:00
CalamitousFelicitousness 5814d5c4b3 feat(ltx): add the ltx-2.5 model family
2.5 reuses the LTX-2 pipeline classes, so it is described through the
capability table: Gemma 4 text encoder, cross-timestep conditioning, and the
upsampler and stage 2 LoRA that now ship inside the model repo. The repo
carries the distilled scheduler config, so Dev rows restore the terminal
shift, and the Dev transformer sits in transformer_full.

Distilled rows stop forcing dynamic shifting on, which remapped their sigma
schedule. Auto duration hands the clip length to the duration head.
2026-08-14 03:39:01 +01:00
Vladimir Mandic ad6f3d3e11 minimax ui
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-13 15:33:47 +02:00
Vladimir Mandic 1ca694aa26 Merge pull request #5017 from vladmandic/feat/minimax-h3
Feat/minimax h3
2026-08-11 13:34:36 +02:00
Vladimir Mandic ed6eb2ea0a Merge pull request #5016 from vladmandic/feat/offload-engine
feat(offload): per-component group offload engine and memory observability
2026-08-11 11:26:56 +02:00
Vladimir Mandic 431774e6e2 fix progress in legacy tabs
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-11 10:41:34 +02:00
CalamitousFelicitousness ca9495cbe2 fix(ui): show the reported stage in generation progress
The progress response carries a stage label in textinfo, but the
button and hint composed their text from the job name alone, so
staged pipelines sat on a bare inference label. The stage now takes
precedence in the button label and appears next to the job in the
performance hint.
2026-08-10 22:11:57 +01:00
CalamitousFelicitousness c9e1398c71 feat(video): add minimax h3 joint video and audio model
First natively modular model: the pipeline is driven directly through
ModularPipeline, with components fetched per workflow (fl2va covers
text and first/last-frame conditioning).

- per-generation overrides snap the canvas to /32, align frames to
  the 17n+5 grid and duration window, and keep the bespoke scheduler
  pair
- group offload for modular pipelines applied per component in
  sd_offload; re-application is a guarded no-op
- audio checkbox pops the audio decode block so decode and muxing are
  skipped
- frames=1 renders a single still image: the duration floor lifts per
  instance and sub-floor latents pad at the vae decoder
- progress and interrupt handling via a transformer forward pre-hook
- vae scale factor override, tuple-safe patch size
2026-08-10 22:11:57 +01:00
CalamitousFelicitousness abfb5ac3ed feat(offload): on-demand vae under group offload
Vae-class components never take group hooks, so group mode kept them
resident on the gpu; a MiniMax-class video vae holds about 10GB that
way while running only seconds per generation. Components above 1GB
now rest in system memory: the apply_forward_hook bridge on encode and
decode fires an on-demand hook that moves the whole module to the
device, so tiled calls find every weight already loaded, and the
processing seams return it to cpu once outputs are materialized. Small
vaes stay resident since the transfer would cost more than it frees.

- placement is decided per component by measured size and requires the
  entry bridge; components without it stay resident
- move_model no longer forces on-demand vaes to the gpu for
  non-txt2img tasks, and full_vae_encode onloads before binding the
  input, which otherwise lands on the resting device
- mode switches clear the stamp and hook in both directions
2026-08-10 22:10:42 +01:00
CalamitousFelicitousness 46c30a00f2 feat(offload): per-component group offload engine
Group offload is applied per component through one engine shared by
regular and modular pipelines. Each component carries a config
signature: re-application with unchanged settings is a no-op instead
of raising before the first forward or silently keeping a stale
config, and changed settings remove the hooks and reapply. Switching
offload modes cleans up the previous mode's hooks in both directions.

- text encoders always offload at leaf level without streams, so
  their weights are never held in pinned host memory
- the vae never takes group hooks and stays resident: the hooks are
  forward-scoped, while pipelines enter through encode/decode and
  tiled calls re-enter per tile
- new pin offload memory option: disabled pins one group at a time
  instead of holding the whole module in non-pageable memory, and
  modules larger than half of system memory degrade automatically
- record stream is clamped to stream mode; the standalone
  combination is rejected upstream
2026-08-10 22:10:42 +01:00
CalamitousFelicitousness 248c5c6b7b feat(offload): match balanced offload lists by component name
Entries in the always and never lists are matched against the pipeline
component name (text_encoder, vae) as well as the model class name, so
one entry covers every architecture instead of needing a new class name
per model. Class entries keep working unchanged.

Never is still tested first, so a class entry there exempts a single
model from a component entry in the always list.
2026-08-10 22:10:42 +01:00
Vladimir Mandic 8b1f0d60b5 cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 11:13:28 +02:00
Vladimir Mandic 40fb45a546 improve handling of hf auth
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 10:55:25 +02:00
Vladimir Mandic de4b4b2c62 Merge pull request #5013 from awsr/gallery-fix
Remove incorrect gallery cleanup check
2026-08-10 08:47:12 +02:00
awsr d20ee5f26b Partial revert "Remove incorrect gallery cleanup check"
This partially reverts commit 8a66206023.
2026-08-09 16:09:25 -07:00
awsr 788d05db6c Revert "Rerun UI compile"
This reverts commit 6bc43ef20c.
2026-08-09 16:07:48 -07:00
Vladimir Mandic ca955ba1c2 update handlers for all authenticated workflows
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-09 22:47:17 +02:00
awsr 6bc43ef20c Rerun UI compile
No idea why the `.map` file is the only change, but I ran this after the rebase just in case.
2026-08-08 19:20:08 -07:00
awsr 8a66206023 Remove incorrect gallery cleanup check
This line resulted in the cleanup check never running if the current gallery has fewer than 1000 files, no matter how many excess entries there are in the cache.
2026-08-08 19:08:08 -07:00
Vladimir Mandic e10ec40e2c detailer enable vl models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-08 16:24:00 +02:00
Vladimir Mandic 48cf0166f3 separate progress monitoring from live preview, live preview improvements, progress details
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-07 11:41:40 +02:00
Vladimir Mandic 0efd18aed5 skip sdnq openvino on non-cpu devices
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-05 20:10:51 +02:00
Vladimir Mandic 84905f77da improve server monitor and profiling
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-05 12:19:07 +02:00
Vladimir Mandic 514a68b1af add storage analyzer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-02 11:22:12 +02:00
Vladimir Mandic 9dec85040e video: support for scripts/extensions
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-28 10:43:58 +02:00
Vladimir Mandic 66f90eb31e fix stuck live preview
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-22 21:08:56 +02:00
Vladimir Mandic 203ed183f2 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-22 10:01:19 +02:00
Vladimir Mandic f4ee2c22c1 process button busy tracking
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-22 09:39:55 +02:00
Vladimir Mandic e503d88934 fix hotkeys
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-22 08:43:10 +02:00
Vladimir Mandic 1281cf8132 add process video
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-20 21:44:43 +02:00
Vladimir Mandic 903ed868ce networks multi-string search
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-20 09:34:13 +02:00
Vladimir Mandic 326fa643fc preview fix cache
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-20 09:05:07 +02:00