Files
automatic/pipelines/glm/__init__.py
T
CalamitousFelicitousness bd60372cc5 refactor(pipelines): move per-arch transformer specs into packages
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.
2026-05-31 00:24:33 +01:00

16 lines
452 B
Python

"""GLM-Image pipeline package.
Exports :data:`GLM_IMAGE_SPEC`. The minimum
``TransformerSpec(cls=GlmImageTransformer2DModel)`` works because
GLM-Image community files use BFL-style ``model.diffusion_model.``
prefixed keys whose names match the diffusers state_dict verbatim after
prefix strip.
"""
import diffusers
from pipelines.native_transformer import TransformerSpec
GLM_IMAGE_SPEC = TransformerSpec(cls=diffusers.GlmImageTransformer2DModel)