code: def load_config_and_state_from_nemo(self, nemo_path):
      if torch.cuda.is_available():
          map_location = torch.device("cuda")
      else:
          map_location = torch.device("cpu")
      save_restore_connector = NLPSaveRestoreConnector()
      cwd = os.getcwd()
  
      with tempfile.TemporaryDirectory() as tmpdir:
          try:
              save_restore_connector._unpack_nemo_file(
                  path2file=nemo_path, out_folder=tmpdir
              )
  
              # Change current working directory to
              os.chdir(tmpdir)
              config_yaml = os.path.join(
                  tmpdir, save_restore_connector.model_config_yaml
              )
              cfg = OmegaConf.load(config_yaml)
  
              model_weights = os.path.join(
                  tmpdir, save_restore_connector.model_weights_ckpt
              )
              state_dict = (
                  save_restore_connector._load_state_dict_from_disk(
                      model_weights, map_location=map_location
                  )
              )
          finally:
              os.chdir(cwd)
  
      return cfg, state_dict
  
file_path: NeMo/nemo/collections/multimodal/modules/nerf/guidance/stablediffusion_nemo_pipeline.py
imports: import os
  import tempfile
  import torch
  import torch.nn.functional
  from omegaconf import OmegaConf
  from nemo.collections.multimodal.models.text_to_image.stable_diffusion.ldm.ddpm import LatentDiffusion
  from nemo.collections.multimodal.modules.nerf.guidance.txt2img_guidance_base import Txt2ImgGuidanceBase
  from nemo.collections.multimodal.modules.stable_diffusion.distributions.distributions import DiagonalGaussianDistribution
  from nemo.collections.nlp.parts.nlp_overrides import NLPSaveRestoreConnector
label_desc: Use image node_id 6 for calling the StableDiffusion obj's underlying member method code with example usage: obj.load_config_and_state_from_nemo(nemo_path) and returns: cfg,  state_dict