register_state_dict_pre_hook
- UNet.register_state_dict_pre_hook(hook)
- These hooks will be called with arguments: - self,- prefix, and- keep_varsbefore calling- state_dicton- self. The registered hooks can be used to perform pre-processing before the- state_dictcall is made.