class_docstr: Context manager that causes all parameters for linear/conv2d/mha layers to be allocated on meta device,
  which results in those parameters having no values and taking no memory. model.to() will be broken and
  will need to be repaired by using LoadStateDictOnMeta below when loading params from state dict.
  
  Usage:
  ```
  with sd_disable_initialization.InitializeOnMeta():
      sd_model = instantiate_from_config(sd_config.model)
  ```
code: def __enter__(self):
      if shared.cmd_opts.disable_model_loading_ram_optimization:
          return
  
      def set_device(x):
          x["device"] = "meta"
          return x
  
      linear_init = self.replace(
          torch.nn.Linear,
          "__init__",
          lambda *args, **kwargs: linear_init(
              *args, **set_device(kwargs)
          ),
      )
      conv2d_init = self.replace(
          torch.nn.Conv2d,
          "__init__",
          lambda *args, **kwargs: conv2d_init(
              *args, **set_device(kwargs)
          ),
      )
      mha_init = self.replace(
          torch.nn.MultiheadAttention,
          "__init__",
          lambda *args, **kwargs: mha_init(*args, **set_device(kwargs)),
      )
      self.replace(torch.nn.Module, "to", lambda *args, **kwargs: None)
  
imports: import ldm.modules.encoders.modules
  import open_clip
  import torch
  import transformers.utils.hub
  from modules import shared
label_desc: Use image node_id 1 for calling the InitializeOnMeta obj's underlying member method code with example usage: obj.__enter__() and returns: x