Add h3lora/sidecars.py to peel adaln_basis, adaln_mean, and silu_t_emb_grid from checkpoint state dicts and stash them on model/patcher objects so ComfyUI doesn't drop them. Install a load_model_weights wrapper (ensure_load_hook) in __init__.py and call it from h3lora.apply; use sidecar collect when creating AdalnContext. Include unit tests (tests/test_sidecars.py) for peel/attach/collect and the wrapper. Also update README with no attribution by proxy. Thanks pl0x
13 lines
505 B
Python
13 lines
505 B
Python
"""ComfyUI-H3-PowerLoraStack: stacked multi-LoRA loading for MiniMax H3."""
|
|
|
|
from .h3lora import server as _server
|
|
from .h3lora.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
|
from .h3lora.sidecars import ensure_load_hook
|
|
|
|
WEB_DIRECTORY = "./web"
|
|
|
|
_server.register() # /h3_power_lora_stack/balance, for the auto-balance button
|
|
ensure_load_hook() # peel adaln_basis/adaln_mean before Comfy drops them
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|