K3 and K5 share only the marketing name: different diffusers pipeline
classes (Kandinsky3Pipeline vs Kandinsky5T2I/I2IPipeline), different
denoiser classes (Kandinsky3UNet vs Kandinsky5Transformer3DModel), no
shared scaffolding. Separate packages so each spec lives next to the
arch it serves.
K2.1 and K2.2 stay outside both packages since they go through
KandinskyCombinedPipeline.from_pretrained directly with no spec.
Specs for chrono, cogview, flux2_klein, glm, hunyuandit, hyimage, joy,
kandinsky, longcat, nucleus, ovis, pixart and prx lived module-level in
model_<arch>.py. Move each into pipelines/<arch>/__init__.py to match
the layout used by anima, bria, ernie, f_lite, lens, qwen, step1x and
vibe.
Each model_<arch>.py now imports its spec lazily inside the load
function, so the package only gets pulled in when that arch is actually
loaded (kandinsky 2.x never goes through native dispatch and stays
untouched).
Also drop the "without this spec..." crash paragraph from the new
package docstrings plus ernie/__init__.py and bria/__init__.py.
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.