mirror of
https://github.com/vladmandic/automatic
synced 2026-09-03 11:30:46 +02:00
4c3f4db129
Five if-blocks in lora_load.load_safetensors reduce to one lookup in _NATIVE_DISPATCH, a string -> module-path map keyed by shared.sd_model_type. Each entry's module exposes try_load(name, network_on_disk, lora_scale). flux2 / zimage / chroma / ernie use the umbrella that binds native_loader's generics via try_load_chain. Anima keeps its own try_load (aliased to try_load_lora) since its multi-component routing doesn't fit the shared suffix-table model. New native archs land by adding one entry to the dict and shipping a try_load.