Commit Graph

89 Commits

Author SHA1 Message Date
Vladimir Mandic 8be5be487f Merge pull request #5028 from cjmcgee/fix/rocm-disable-mmap
fix(rocm): add option to load models without mmap
2026-08-16 18:19:38 +02:00
Christopher McGee a9b9de63ab fix(rocm): add option to load models without mmap
On ROCm, host-to-device DMA from mmap'd safetensors pages stalls ~1s per
copy, so weights move to the GPU at ~27 MB/s instead of ~28 GB/s. With
offload enabled this re-copies weights every forward, so generation
appears to hang.

Adds `diffusers_disable_mmap` (Settings > Model Loading), off by default,
which makes diffusers read shards into anonymous memory instead. Costs
peak RAM equal to the model size, so it is opt-in.

SD3.5-large on RX 9070 (gfx1201), same prompt and steps:
  off: no image after 120s
  on:  image in 20s

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 11:46:07 -04:00
Dity0 51a598bfc3 Enable smooth_k by default 2026-08-16 12:42:13 +03: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
Vladimir Mandic 0ac89385a0 timers reporting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-14 09:18:24 +02: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
Dity0 251945939b Add Lloyd-Max quantization with use_codebook 2026-08-10 22:51:32 +03:00
Vladimir Mandic 6aa5b45b80 remove directml
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 13:43:45 +02:00
Dity0 2250d8052a remove sdnq_dequantize_compile option
- advanced users should use the env var SDNQ_USE_TORCH_COMPILE instead
2026-08-10 13:30:56 +03:00
Vladimir Mandic c6dc750a81 remove resolution from some reference models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-28 14:18:55 +02:00
Vladimir Mandic 42cb4cf489 explicit seedvr implementation
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-18 10:35:07 +02:00
Disty0 75926e6fc4 Remove sdnq_use_quantized_matmul and use sdnq_quantize_matmul_mode instead 2026-07-15 18:45:30 +03:00
CalamitousFelicitousness 6e63f351eb refactor(ui): drop quicksettings companion machinery for secondary unet
The secondary unet loads from the networks panel toggle or the settings
page; companion ordering and dynamic visibility pushes in ui_settings.py
are not worth their footprint for one setting.
2026-07-12 03:44:20 +01:00
CalamitousFelicitousness 8c884c1e02 feat(model): secondary unet override slot and ideogram4 native loading
One UNET override cannot serve dual-transformer arches: ideogram4
conditional/unconditional and wan combined-stage experts need separate
files, and previously a single override landed on both experts.

- sd_unet_secondary option with per-slot tracking, consumed-state sync,
  arch-change reset, and incompatible-override fallback
- dropdown renders beside the primary, follows it into quicksettings,
  and is visible only for dual-transformer model types
- ideogram4 native single-file spec with a quant-aware fused-qkv
  converter; such converters run before comfy_quant detection via
  TransformerSpec.converter_handles_quant
- quicksettings render in configured order (sort keyed on the option
  object and always fell back to alphabetical)
- post-load dtype warning skips quantized transformers
2026-07-11 06:40:07 +01:00
Vladimir Mandic 2c632bb562 refactor detailer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-04 11:17:56 +02:00
Vladimir Mandic a4d107a919 refactor detailer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-03 21:03:28 +02:00
Vladimir Mandic fcee7e23f2 add experimental pruna
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-02 11:25:33 +02:00
Vladimir Mandic b3cf481c11 Merge pull request #4970 from vladmandic/feat/video-models
Feat/video models
2026-07-01 11:11:57 +02:00
CalamitousFelicitousness 10647c7b67 fix(video): apply Wan 2.2 MoE boundary at runtime in both image and video paths
Wan 2.2 A14B ships a per-model boundary_ratio (0.9 I2V, 0.875 T2V) that selects the high- or low-noise expert per step. The video and base-model image loaders both load the shipped value; the slider override is applied at generation time in set_pipeline_args, the one point both paths pass through before invoking the pipeline.

The denoising loop reads config.boundary_ratio each call, so tuning takes effect with no reload for video and base-model images alike. The slider defaults to -1, meaning use the model's value; 0 to 1 set the boundary explicitly. Single-expert stages stay load-time because they drop a transformer to free VRAM.
2026-06-30 23:00:26 +01:00
Vladimir Mandic 0e35079f06 attempt to load incomplete model
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-29 13:39:46 +02:00
Vladimir Mandic b61475574e preview check for output panel visibility
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-25 10:54:35 +02:00
Disty0 8029156fa2 SDNQ Atten use simple row-wise quant instead 2026-06-24 17:59:38 +03:00
Disty0 2c44dca2be reduce warp range 2026-06-24 13:23:00 +03:00
Disty0 0af57a0af1 And no quant atten 2026-06-23 20:41:19 +03:00
Disty0 b682d90a4a Fix UI settings 2026-06-23 14:26:24 +03:00
Disty0 72a4d2c2bd Add Hadamard support to SDNQ Atten 2026-06-23 14:17:34 +03:00
Disty0 dfa713e6fc Add SDNQ attention 2026-06-23 08:10:02 +03:00
Vladimir Mandic 6e6ed82732 fix conflciting label
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-22 16:27:31 +02:00
Vladimir Mandic 893c1e702d main panel positioning
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-21 12:52:32 +02:00
Vladimir Mandic 7e51186e60 better handle onnxruntime
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-21 11:19:08 +02:00
Vladimir Mandic 2b81eadecf add force dtype on load
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-20 09:38:50 +02:00
Pablo Hellmann 642a2be76f Add user option to enable/disable not-in-focus live previews 2026-06-17 16:08:37 +02:00
Pablo Hellmann 396b15e567 Revert "Adds per step based live preview as a option"
This reverts commit ecad61ce92.
2026-06-17 16:00:05 +02:00
Pablo Hellmann fbc1f66805 Revert "Ruff fixes"
This reverts commit 10145f7f2b.
2026-06-17 16:00:03 +02:00
Pablo Hellmann 10145f7f2b Ruff fixes 2026-06-16 20:23:06 +02:00
Pablo Hellmann ecad61ce92 Adds per step based live preview as a option 2026-06-16 20:20:18 +02:00
Pablo Hellmann 07d5836679 Revert "Made live preview and progress tracker per step based with new UI setting"
This reverts commit 7bb0b06254.
2026-06-16 16:20:19 +02:00
Pablo Hellmann 653f525ba5 Revert "Better description of setting"
This reverts commit c13f7b174e.
2026-06-16 16:20:11 +02:00
Pablo Hellmann c13f7b174e Better description of setting 2026-06-16 03:28:36 +02:00
Pablo Hellmann 7bb0b06254 Made live preview and progress tracker per step based with new UI setting 2026-06-16 03:18:37 +02:00
Disty0 55f811e837 SDNQ add N4 Hadamard and set Hadamard Group Size to 256 2026-06-13 00:56:50 +03:00
Vladimir Mandic 84228f1657 update sampler behavior and user definable fallback
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-08 17:00:00 +02:00
CalamitousFelicitousness 08b843401e fix(ui): correct schedulers_sigma option choices to match backend
schedulers_sigma is a hidden OptionInfo registration; the visible control is the sampler-accordion dropdown. Its choices still listed the k-diffusion set, including polyexponential (which the diffusers backend does not support) and omitting betas, lambdas, and flowmatch. Align the list with what sd_samplers_diffusers accepts and the dropdown offers. The list feeds warn-only validation, so this clears a dead value and spurious debug logs, not user-facing behavior.
2026-06-07 07:35:56 +01:00
CalamitousFelicitousness f83c1bc731 refactor(sdnq): clean up dynamic loss threshold slider 2026-06-07 00:18:07 +01:00
Vladimir Mandic 78f88ef571 add ideogram4
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-05 20:00:49 +02:00
Vladimir Mandic c319f8f92d refactor shared text encoder
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-01 10:03:10 +02:00
Vladimir Mandic a0531c70fd add new attention dispatcher
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-29 21:10:56 +02:00
Vladimir Mandic d2d9f7caea captioning improvements and cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-29 21:10:56 +02:00
Vladimir Mandic 9fc858d75e add microsoft lens
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-23 09:49:42 +02:00
Vladimir Mandic b35f8fa831 ui fixes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-21 09:23:10 +02:00