def load_state_dict(self, state_dict):
        """Loads the loss_scaler state dict.

        Args:
           state_dict (dict): scaler state.
        """
        self.cur_scale = state_dict['cur_scale']
        self.cur_iter = state_dict['cur_iter']
        self.mode = state_dict['mode']
        self.last_overflow_iter = state_dict['last_overflow_iter']
        self.scale_factor = state_dict['scale_factor']
        self.scale_window = state_dict['scale_window']
Loads the loss_scaler state dict.

        Args:
           state_dict (dict): scaler state.
        
ControlNet-v1-1-nightly/annotator/uniformer/mmcv/runner/fp16_utils.py