mirror of
https://github.com/vladmandic/automatic
synced 2026-08-29 16:41:01 +02:00
b84b782ba4
Group offload hooks report the onload device at module level while the weights rest on cpu, so every native apply took the parameter replacement branch in assign_weight and detached the written layers from the hook's group bookkeeping. The activation and deactivation walks now remove a component's group hooks before its first weight write and reapply offload at the end of the pass: writes land in place on the resting tensors and fresh groups snapshot the result. - hooks come off lazily, only for components with a covered layer or a pending backup or factor-stash restore; repeat activations with an unchanged set leave the hooks untouched - remove_group_offload_component follows wrapper components to the inner model that carries the hooks