mirror of
https://github.com/vladmandic/automatic
synced 2026-09-04 12:00:46 +02:00
bd60372cc5
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.
20 lines
632 B
Python
20 lines
632 B
Python
"""HunyuanImage pipeline package.
|
|
|
|
Exports :data:`HUNYUANIMAGE_SPEC`. The minimum
|
|
``TransformerSpec(cls=HunyuanImageTransformer2DModel)`` works because
|
|
HunyuanImage 2.1 community files use BFL-style
|
|
``model.diffusion_model.``-prefixed keys whose names match the diffusers
|
|
state_dict verbatim after prefix strip.
|
|
|
|
The HunyuanImage 3 path is a transformers ``AutoModelForCausalLM`` and
|
|
does not go through the native transformer loader, so it does not need a
|
|
spec here.
|
|
"""
|
|
|
|
import diffusers
|
|
|
|
from pipelines.native_transformer import TransformerSpec
|
|
|
|
|
|
HUNYUANIMAGE_SPEC = TransformerSpec(cls=diffusers.HunyuanImageTransformer2DModel)
|