code: def __init__(self, net: Network, weights: NetworkWeights):
      self.network = net
      self.network_key = weights.network_key
      self.sd_key = weights.sd_key
      self.sd_module = weights.sd_module
  
      if hasattr(self.sd_module, "weight"):
          self.shape = self.sd_module.weight.shape
  
      self.dim = None
      self.bias = weights.w.get("bias")
      self.alpha = (
          weights.w["alpha"].item() if "alpha" in weights.w else None
      )
      self.scale = (
          weights.w["scale"].item() if "scale" in weights.w else None
      )
  
imports: from __future__ import annotations
  import os
  from collections import namedtuple
  import enum
  from modules import sd_models, cache, errors, hashes, shared
label_desc: Use image node_id 1 to create a new NetworkModule object  with example: obj = NetworkModule(net, weights)