code: def peft_state_dict(self) -> Dict[str, torch.Tensor]:
      if (
          self.hada_w1_a is None
          or self.hada_w1_b is None
          or self.hada_w2_a is None
          or self.hada_w2_b is None
      ):
          raise ValueError(
              "At least one of hada_w1_a, hada_w1_b, hada_w2_a, hada_w2_b is missing, they all must be provided"
          )
      state_dict = {
          f"base_model.model.{self.peft_key}.hada_w1_a": self.hada_w1_a,
          f"base_model.model.{self.peft_key}.hada_w1_b": self.hada_w1_b,
          f"base_model.model.{self.peft_key}.hada_w2_a": self.hada_w2_a,
          f"base_model.model.{self.peft_key}.hada_w2_b": self.hada_w2_b,
      }
      if not (
          (self.hada_t1 is None and self.hada_t2 is None)
          or (self.hada_t1 is not None and self.hada_t2 is not None)
      ):
          raise ValueError(
              "hada_t1 and hada_t2 must be either both present or not present at the same time"
          )
      if self.hada_t1 is not None and self.hada_t2 is not None:
          state_dict[
              f"base_model.model.{self.peft_key}.hada_t1"
          ] = self.hada_t1
          state_dict[
              f"base_model.model.{self.peft_key}.hada_t2"
          ] = self.hada_t2
      return state_dict
  
imports: import argparse
  import json
  import logging
  import os
  from collections import Counter
  from dataclasses import dataclass
  from operator import attrgetter
  from typing import Dict, List, Optional, Union
  import safetensors
  import torch
  import torch.nn
  from diffusers import UNet2DConditionModel
  from transformers import CLIPTextModel
  from peft import LoHaConfig, LoKrConfig, LoraConfig, PeftType, get_peft_model, set_peft_model_state_dict
  from peft.tuners.lokr.layer import factorization
label_desc: Use image node_id 1 for calling the LoHaInfo obj's underlying member method code with example usage: obj.peft_state_dict() and returns: state_dict