The single-file override loaded via from_pretrained(state_dict=...) without a
quantization_config and then relied on do_post_load_quant, which no-ops on a
bare module (it maps Model/TE onto pipeline attributes that a lone encoder does
not have). A custom TE therefore loaded full-precision regardless of the SDNQ
setting. Pass quant_args into from_pretrained like the repo/default path so SDNQ
quantizes during load.
The single-file override path built a T5EncoderModel regardless of the
requested class, so a non-T5 override (Qwen3-VL for Krea2) became a T5 with the
wrong vocab and overflowed its embedding into a CUDA device-side assert. Load
the file as the class the pipeline requests via from_pretrained(state_dict=...),
letting transformers reconcile per-arch key prefixes, and fall back to the base
text encoder on failure.