Files
automatic/pipelines/chroma/__init__.py
T
CalamitousFelicitousness cda4822ca0 fix(chroma): route through native_transformer to avoid SDNQ pre-mode crash
Loading a Chroma transformer override via UNET dropdown crashed at
inference with a shape mismatch in unpack_uint4: from_single_file does
not integrate quantization_config the way from_pretrained does, so the
dequantizer state was set up but the .weight tensor was never packed.

CHROMA_SPEC routes through native_transformer with the diffusers
Chroma converter, which loads bare and quantizes explicitly via
sdnq_quantize_model.
2026-05-31 00:24:33 +01:00

19 lines
609 B
Python

"""Chroma pipeline package.
Exports :data:`CHROMA_SPEC`. Chroma community files use BFL-style
``model.diffusion_model.``-prefixed keys that need renaming into the
diffusers naming convention, so the spec plugs in
:func:`convert_chroma_transformer_checkpoint_to_diffusers` explicitly.
"""
import diffusers
from diffusers.loaders.single_file_utils import convert_chroma_transformer_checkpoint_to_diffusers
from pipelines.native_transformer import TransformerSpec
CHROMA_SPEC = TransformerSpec(
cls=diffusers.ChromaTransformer2DModel,
converter=convert_chroma_transformer_checkpoint_to_diffusers,
)