mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
4c85a60c3e
create_module built each up/down module with the default constructor, which kaiming-initializes the parameter, then copied the stored weight over the whole thing. The init is thrown away every time and costs about four times the copy: 22.1ms per module against 2.5ms, or 5.8s against 0.7s over a 264-module lora, on every load. skip_init constructs on meta and materializes uninitialized, so the copy still fully defines the parameter. Dtype, device and values are unchanged, including the fp32 upcast of bf16 files that the copy performs.