Spaces:
Running on Zero
Running on Zero
File size: 724 Bytes
8a28a8d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """Small checkpoint-level capability guards layered over architecture YAML."""
from __future__ import annotations
_EDIT_ONLY_CHAINS = {
"qwen_image_edit",
"boogu_image_edit",
"reference_image", # Mage-Flow edit checkpoints
}
def supports_chain_for_model(model_name: str, chain_name: str) -> bool:
"""Return whether a concrete checkpoint is known to support a chain.
Most capabilities apply to every checkpoint of an architecture. Qwen,
Boogu, and Mage-Flow register generation and edit checkpoints together, so
their reference injectors require the concrete Edit variant.
"""
if chain_name in _EDIT_ONLY_CHAINS:
return "edit" in str(model_name).casefold()
return True
|