3 Commits
Author SHA1 Message Date
BobsBlazed 3c7fd499b6 Add a Universal loader covering every supported architecture (#5)
The FLUX and SDXL loaders know their architecture's block names up front, which
does not scale across ComfyUI's ~99 model configs. The new Universal node
discovers a model's block layout at runtime instead: stack names, stack sizes
and their execution order all come from the loaded model, so pruned, distilled
and brand-new architectures work without a code change.

Concatenating the discovered stacks puts every block on one normalised depth
axis, split into five buckets, alongside embeddings, output head and text
encoder. Covers SD1.5/2/3, SDXL, FLUX, Chroma, AuraFlow, PixArt, HiDream,
Qwen-Image, Wan, LTX-Video, Mochi, HunyuanVideo/DiT, Lumina and Cosmos.

Verified against real ComfyUI: models built from ComfyUI's own configs on the
meta device plus its *_to_diffusers key tables, 8000+ authentic state-dict keys
across 11 architectures, none falling through to "Other Tensors". That pass
found and fixed real gaps: SD3's negative "joint_blocks.-1" index, Lumina's
noise_refiner/context_refiner stacks, AuraFlow's native double_layers naming,
several conditioning embedders, and FLUX's ControlNet pos_embed_input.

No widget was added, removed or reordered on the FLUX or SDXL nodes, so
existing workflows are unaffected.

Bumps version to 1.2.0.
2026-07-28 20:04:26 -04:00
BobsBlazed a297e24319 Fix block classification and overhaul the loader (#4)
The per-block sliders were not targeting the blocks they named. ComfyUI's
key_map maps a LoRA key name to the model state-dict key string the patch
targets (or a (key, offset) tuple for fused FLUX qkv/linear1 weights), but
_invert_key_map treated those values as nn.Module objects and indexed [0] on
them -- on a string that is its first character. Every patch then resolved
through one arbitrary lookup, so all weights were bucketed together.

Classify patches directly on the canonical target key instead, which also makes
the mapping dialect-proof. Fused (key, offset) patches are unpacked correctly.

Also fixes SDXL patches that matched no stage being silently discarded, FLUX
pushing every group into both the model and CLIP patchers, dead double_blocks
19-28 ranges, and bare torch.load on non-safetensors LoRAs.

Adds LoRA file caching, an "info" output with a per-block report, optional clip
input, tooltips, a "Detail & Texture" preset, and unit tests with CI.

Bumps version to 1.1.0.
2026-07-28 12:19:12 -04:00
BobsBlazed 907113b105 Add files via upload 2025-06-26 21:19:27 -04:00