Klein shares Flux2Transformer2DModel with full Flux 2 but uses a
smaller config. from_single_file instantiates with the class default
(= Flux 2 full size); loading a Klein-shaped file crashed at
load_model_dict_into_meta with:
Cannot load because double_stream_modulation_img.linear.weight
expected shape (36864, 6144), but got (24576, 4096)
FLUX2_KLEIN_SPEC fetches Klein's transformer/config.json from the base
repo and uses convert_flux2_transformer_checkpoint_to_diffusers
explicitly. Probed against snofsSexNudesAndOtherFunStuff_v14Base:
233/233 keys overlap.
Qwen-Image: diffusers registers a no-op identity lambda for
QwenImageTransformer2DModel; from_single_file silently accepted any
key naming and loaded with mismatches. QWEN_SPEC sets converter=None
to short-circuit the no-op.
Custom transformer classes (Lens, Step1X-Edit, VIBE Sana, f-lite):
runtime-registered onto diffusers, never in SINGLE_FILE_LOADABLE_CLASSES.
Specs land in each arch's existing pipelines/<arch>/__init__.py.
NextStep skipped: loader returns None up front.
CogView3+, CogView4, GLM-Image, HunyuanDiT, Joy, Kandinsky3 UNet,
PixArt, PRX. These classes lack from_single_file entirely; the UNET
dropdown fell through to cls.from_pretrained(local_file), which
decodes the .safetensors header as UTF-8 and crashes "is not a valid
JSON file".
TransformerSpec(cls=...) module-level in each model_<arch>.py.
Kandinsky3 also needs subfolder='unet' since it loads a UNet not a
transformer.
ChronoEdit, HunyuanImage, Kandinsky5, LongCat, Ovis, NucleusMoE, Bria,
BriaFibo. Each inherits from_single_file via FromOriginalModelMixin
but has no SINGLE_FILE_LOADABLE_CLASSES entry; calling it crashed with
"FromOriginalModelMixin is currently only compatible with [...]".
TransformerSpec(cls=...) for each. Bria specs in
pipelines/bria/__init__.py; the rest are module-level in
model_<arch>.py since they have no package directory.
The 40-line hand-rolled loader was generic.load_transformer plus a
VACE/standard class switch and a hardcoded GGUF rejection. Switch moves
to load_wan; GGUF rejection removed (generic handles it via
GGUFQuantizationConfig).
No native_spec passed: WanTransformer3DModel has a working diffusers
converter, so from_single_file via generic stays correct.
ErnieImageTransformer2DModel has no from_single_file; selecting an
Ernie finetune in the UNET dropdown previously crashed with
"is not a valid JSON file" from from_pretrained.
Probe of jibMixErnie_v20.safetensors: 409/409 keys overlap with the
model state dict after stripping model.diffusion_model., zero missing
or unexpected. Spec is the minimum TransformerSpec(cls=...).
New native_spec=None kwarg. When set and the UNET dropdown points at a
.safetensors, dispatches to native_transformer.load (threading
allow_quant/dtype/modules_to_not_convert/modules_dtype_dict). Pipelines
without a spec stay on cls.from_single_file unchanged.
217-line bespoke loader collapses to a 40-line ANIMA_SPEC in
pipelines/anima/__init__.py (Cosmos converter + llm_adapter sibling +
Cosmos 1.0 forbidden marker).
Drop the class-keyed REGISTRY: Anima and raw Cosmos share
CosmosTransformer3DModel but need different specs. Specs pass via
explicit native_spec= kwarg; make_default_spec(cls) covers the
auto-converter case.
Frees the name for pipelines/native_transformer. Module covers the full
LyCORIS adapter family (LoRA/LoKR/LoHA/OFT/IA3/GLoRA/Norm/Full), not
just LoRA.