Commit Graph

14635 Commits

Author SHA1 Message Date
Vladimir Mandic 64b281e4af add dlss to postprocessing
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-09 14:29:41 +02:00
Vladimir Mandic 1cdcdb21b5 dlss initial stable
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-09 14:29:41 +02:00
Vladimir Mandic f51d56ad97 Merge pull request #5081 from liutyi/dev
LLaDA reference images
2026-09-09 13:50:06 +02:00
Oleksandr Liutyi abec701191 LLaDA reference images 2026-09-09 11:15:58 +00:00
Vladimir Mandic 2ef1a0c87b stricter ty
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-08 10:22:42 +02:00
Vladimir Mandic 23b800a99b stricter lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-08 10:18:29 +02:00
Vladimir Mandic 5f127650ea fix test pass
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-08 09:03:14 +02:00
Vladimir Mandic ce01461bf5 update logging
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-08 08:45:53 +02:00
CalamitousFelicitousness c904585f87 fix(prompt): cache list prompts again
0dbe27c37 keyed the prompt cache on the negative prompt and the cfg flag
and hashed both prompts to tuples for it. The positive prompt was hashed
before the list check that builds the key, so a list prompt, which is what
every pipeline passes, was never stored or found and the text encoder ran
on every generation. Only the negative prompt needs hashing.
2026-09-08 03:06:46 +01:00
CalamitousFelicitousness c389ce92d0 fix(models): keep pipelines whose class already serves the requested task
get_diffusers_task reports image-to-image for any class that diffusers
registers under both the text-to-image and image-to-image tables, so every
text-to-image generation on such a model (Klein, FLUX.2, Kontext,
Qwen-Image-Edit, LongCat) went through AutoPipeline.from_pipe and came back
as a new object. The prompt cache is keyed on the pipeline identity, so the
text encoder ran again on every image. set_diffuser_pipe now returns the
pipeline unchanged when its class is registered for the requested task.
2026-09-08 03:06:33 +01:00
CalamitousFelicitousness fa7243b239 fix(processing): round init images to a pipeline-declared multiple
The init-image snap rounds to the VAE factor, but the LLaDA pipeline needs
16 for its transformer patch and 32 when editing, since the source image is
halved for the semantic encoder. The pipeline now declares patch_size for
the shared rounding and init_image_multiple for input images, and
get_vae_scale_factor honours the latter when an init image is present.
check_inputs reads the same attributes.
2026-09-08 02:32:47 +01:00
CalamitousFelicitousness 51320d0289 fix(llada): initialize the rotary frequency buffer after loading
Transformers recreates non-persistent buffers with torch.empty_like during
the meta-device load and leaves them to _init_weights, which here covered
only Linear and Embedding. The text encoder therefore ran with uninitialized
memory as its rotary frequencies: a different table on every load, and
non-finite embeddings whenever the garbage overflowed at longer positions.
The initializer now recomputes inv_freq for the rotary module.
2026-09-08 01:24:51 +01:00
CalamitousFelicitousness 619a25eea6 fix(offload): key the group stats report by component
A checkpoint-name key survives unload, so a reload of the same checkpoint
never printed the per-module stats block again, even with a different
quantization. Each component now carries its own reported stamp: a task
switch rebuilds the pipe around the same modules and stays quiet, while a
reload or a component swap brings new modules and reports them.
2026-09-07 22:35:38 +01:00
CalamitousFelicitousness 8619dbc0af test(offload): address the split offload modules in the placement role tests
The group offload functions live in sd_offload_group, sd_offload_utils and
sd_offload_state rather than modules.sd_offload, so the tests and their
monkeypatches now import and patch those modules directly.
2026-09-07 22:32:54 +01:00
Vladimir Mandic fe03d7b38e add grok to cloud models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-07 09:20:58 +02:00
Vladimir Mandic 0a94b2d8ae update changelog/todo
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-07 07:38:03 +02:00
Vladimir Mandic 5c88e16222 Merge pull request #5079 from ryanmeador/dev
fix: honor offline mode in model loaders
2026-09-07 05:50:14 +02:00
Vladimir Mandic 92e2229cd9 Merge pull request #5078 from Anai-Guo/fix/todo-dead-mps-branch
fix(todo): drop the unreachable duplicate cuda branch in init_generator
2026-09-07 05:49:30 +02:00
Ryan Meador 6013110e96 fix: honor offline mode in model loaders 2026-09-06 10:10:36 -04:00
CalamitousFelicitousness ddec927c90 fix(vae): read the scale factor off the autoencoder instance
get_vae_scale_factor knew the ratio only for the pipeline and VAE class
names in its table and fell back to 8 for everything else. A repo that
subclasses a video autoencoder misses the table, so the request size was
rounded to a smaller multiple than the pipeline uses and the latent
preview unpack failed on heights that are not a multiple of 32.
diffusers video autoencoders carry spatial_compression_ratio on the
instance; use it before the default.
2026-09-06 07:08:24 +01:00
Tai An 8b738636d0 fix(todo): drop the unreachable duplicate branch in init_generator
The third branch repeats `device.type == "cuda"`, so it can never run, and
it cannot be enabled by correcting the condition either: the Generator API
rejects MPS outright. The repo's other copy of this helper,
modules/hidiffusion/utils.py, has cpu/cuda/else and no third branch.
2026-09-05 21:22:27 -07:00
CalamitousFelicitousness b434eb0c1b refactor(lora): route every bare key through the resolver
The parser no longer takes reference-name prefixes to tell bare
reference keys from bare diffusers keys. Any bare key carries the
sentinel and the arch resolver renames what it knows and passes the rest
through. Flux2 keeps its list for file-format detection only.
2026-09-06 04:25:44 +01:00
CalamitousFelicitousness 8b93d20b1a refactor(lora): drive the minimax mapping from one vocabulary
Block leaves and standalone renames each live in one table; the block
resolver and the musubi unflatten patterns are derived from them.
2026-09-06 04:25:44 +01:00
CalamitousFelicitousness 783b66c3be refactor(lora): offer unknown bare keys to the resolver
A bare key that matches no known prefix is parsed with the
bare-diffusers sentinel and handed to the resolver instead of being
dropped at parse time. The per-arch lists of bare diffusers prefixes are
gone, and a path that names no live module counts as unmapped.
2026-09-06 04:25:44 +01:00
CalamitousFelicitousness 1c91fb2047 refactor(lora): make the fused row reorder a chunk capability
A ChunkSpec can reorder equal row blocks of the rows it selects, so an
arch declares a swapped SwiGLU projection on the target instead of
permuting the state dict first. Only the LoRA family applies it; the
others skip a reordered target with a warning.
2026-09-06 04:25:44 +01:00
CalamitousFelicitousness 4a5dc98cb2 fix(lora): match the diffusers minimax lora converter
The reference fc1 is a fused [gate; value] SwiGLU projection and the
diffusers port stores [value; gate]. The native mapping did not swap the
halves, so gate and value deltas landed on each other's rows. The
mapping now also renames the standalone projections, reads a
metadata-only alpha, and accepts the musubi, peft dit and diffusers-named
layouts.
2026-09-06 04:25:44 +01:00
Vladimir Mandic e0a23b0c6e handle scipy
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 23:00:34 +02:00
Vladimir Mandic f446cca02d installer handler for numpy
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 22:54:56 +02:00
Vladimir Mandic 29de324ff7 update all google stuff
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 21:53:29 +02:00
CalamitousFelicitousness cd88d2ae34 fix(lora): route codebook layers on the mean level gap
SDNQ codebook layers keep their Lloyd levels in the scale slot, so reading
scale.mean() as the grid step returned the levels' near-zero mean and sent
sub-step deltas to requantize, where the grid erases them. grid_step returns
the mean adjacent-level gap for those layers and the plain scale mean otherwise.
2026-09-05 18:39:04 +01:00
Vladimir Mandic b59e693364 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 13:43:09 +02:00
Vladimir Mandic 9b06cfef80 add llada editing
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 13:36:18 +02:00
Vladimir Mandic cb0aea8eb5 llada t2i
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 13:01:36 +02:00
Vladimir Mandic 6333be7b83 cleanups
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 12:42:01 +02:00
Vladimir Mandic 7b6a967203 explicit init api limiter
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 11:58:32 +02:00
Vladimir Mandic 58e72f50cc sort reference models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 11:57:53 +02:00
Vladimir Mandic 14fd01f606 modular pipelines exception logging
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 10:14:23 +02:00
Vladimir Mandic 1e5592ba2e cleanup logging
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 10:01:55 +02:00
Vladimir Mandic 0455a9acaf reorder startup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-05 09:49:28 +02:00
CalamitousFelicitousness 5875cdd29e feat(lora): remap anima 1.0 lora block indices onto depth-expanded checkpoints
Anima 2.9B interleaves twelve new blocks among the 28 of Anima 1.0, so a block
index trained against 1.0 names a different block on the expanded model. Every
such key still resolves, since blocks 0 to 27 exist either way, so the
mismatch was silent. The Anima loader now shifts base-depth indices onto the
blocks that carry those weights, keyed by (base depth, expanded depth) and
applied only when the transformer is expanded and the LoRA stays inside the
base depth. Transformer keys move; llm_adapter and text encoder keys keep
their own numbering.
2026-09-05 02:24:04 +01:00
CalamitousFelicitousness 6b92f2ba03 feat(model): add anima 2.9b as a base reference model
Anima-2.9B is a depth-expanded finetune of Anima 1.0 Base carrying 40
transformer blocks against the base repo's 28. The reference entry points at
the Diffusers conversion. Single-file releases load through the native loader:
TransformerSpec gains an infer_config hook, the Anima spec uses it to size
num_layers to the block indices in the file, and model_anima routes a
checkpoint-selected safetensors through the loader with the remaining
components from the base repo.
2026-09-05 01:45:49 +01:00
Vladimir Mandic 0dbe27c371 fix prompt caching
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-04 15:47:06 +02:00
Vladimir Mandic 653fbf4d51 update cuda backend to torch==2.14+cuda==13.2
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-04 10:08:07 +02:00
Vladimir Mandic 32852b006b fix lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-04 09:54:19 +02:00
Vladimir Mandic 1a47736c66 fix model-recompile keep state
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-04 09:49:12 +02:00
Vladimir Mandic b57d526b5b update numpy/scripy and add SD_SKIP_AUTOTUNE
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-04 07:52:46 +02:00
Vladimir Mandic 186afd4bac update openvino, refactor compile overrides, fix lora load
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-02 10:58:59 +02:00
Vladimir Mandic c06aa5b8c3 update changelog and todo
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-01 20:26:52 +02:00
Vladimir Mandic 1ae9f81fc5 Merge pull request #5076 from zjn20030811/fix/vdm-trailing-timesteps
Fix VDM trailing timestep spacing
2026-09-01 20:25:07 +02:00
nan f895b72863 Fix VDM trailing timestep spacing 2026-09-02 00:13:20 +08:00