docstr: Load a model checkpoints from a directory. This model is with multiple checkpoint files and it
  expects to have all the files to be under the given `checkpoint_dir` with the rigth names.
  If eval is True, set the model to eval mode.
  
  Args:
      config (TortoiseConfig): The model config.
      checkpoint_dir (str): The directory where the checkpoints are stored.
      ar_checkpoint_path (str, optional): The path to the autoregressive checkpoint. Defaults to None.
      diff_checkpoint_path (str, optional): The path to the diffusion checkpoint. Defaults to None.
      clvp_checkpoint_path (str, optional): The path to the CLVP checkpoint. Defaults to None.
      vocoder_checkpoint_path (str, optional): The path to the vocoder checkpoint. Defaults to None.
      eval (bool, optional): Whether to set the model to eval mode. Defaults to False.
      strict (bool, optional): Whether to load the model strictly. Defaults to True.
docstr_tok: ["Load","a","model","checkpoints","from","a","directory",".","This","model","is","with","multiple","checkpoint","files","and","it","expects","to","have","all","the","files","to","be","under","the","given","`","checkpoint_dir","`","with","the","rigth","names",".","If","eval","is","True",",","set","the","model","to","eval","mode",".","Args",":","config","(","TortoiseConfig",")",":","The","model","config",".","checkpoint_dir","(","str",")",":","The","directory","where","the","checkpoints","are","stored",".","ar_checkpoint_path","(","str",",","optional",")",":","The","path","to","the","autoregressive","checkpoint",".","Defaults","to","None",".","diff_checkpoint_path","(","str",",","optional",")",":","The","path","to","the","diffusion","checkpoint",".","Defaults","to","None",".","clvp_checkpoint_path","(","str",",","optional",")",":","The","path","to","the","CLVP","checkpoint",".","Defaults","to","None",".","vocoder_checkpoint_path","(","str",",","optional",")",":","The","path","to","the","vocoder","checkpoint",".","Defaults","to","None",".","eval","(","bool",",","optional",")",":","Whether","to","set","the","model","to","eval","mode",".","Defaults","to","False",".","strict","(","bool",",","optional",")",":","Whether","to","load","the","model","strictly",".","Defaults","to","True","."]
code: def load_checkpoint(
      self,
      config,
      checkpoint_dir,
      text_model_path=None,
      coarse_model_path=None,
      fine_model_path=None,
      hubert_model_path=None,
      hubert_tokenizer_path=None,
      eval=False,
      strict=True,
      **kwargs,
  ):
      """Load a model checkpoints from a directory. This model is with multiple checkpoint files and it
      expects to have all the files to be under the given `checkpoint_dir` with the rigth names.
      If eval is True, set the model to eval mode.
  
      Args:
          config (TortoiseConfig): The model config.
          checkpoint_dir (str): The directory where the checkpoints are stored.
          ar_checkpoint_path (str, optional): The path to the autoregressive checkpoint. Defaults to None.
          diff_checkpoint_path (str, optional): The path to the diffusion checkpoint. Defaults to None.
          clvp_checkpoint_path (str, optional): The path to the CLVP checkpoint. Defaults to None.
          vocoder_checkpoint_path (str, optional): The path to the vocoder checkpoint. Defaults to None.
          eval (bool, optional): Whether to set the model to eval mode. Defaults to False.
          strict (bool, optional): Whether to load the model strictly. Defaults to True.
      """
      text_model_path = text_model_path or os.path.join(
          checkpoint_dir, "text_2.pt"
      )
      coarse_model_path = coarse_model_path or os.path.join(
          checkpoint_dir, "coarse_2.pt"
      )
      fine_model_path = fine_model_path or os.path.join(
          checkpoint_dir, "fine_2.pt"
      )
      hubert_model_path = hubert_model_path or os.path.join(
          checkpoint_dir, "hubert.pt"
      )
      hubert_tokenizer_path = hubert_tokenizer_path or os.path.join(
          checkpoint_dir, "tokenizer.pth"
      )
  
      self.config.LOCAL_MODEL_PATHS["text"] = text_model_path
      self.config.LOCAL_MODEL_PATHS["coarse"] = coarse_model_path
      self.config.LOCAL_MODEL_PATHS["fine"] = fine_model_path
      self.config.LOCAL_MODEL_PATHS["hubert"] = hubert_model_path
      self.config.LOCAL_MODEL_PATHS[
          "hubert_tokenizer"
      ] = hubert_tokenizer_path
  
      self.load_bark_models()
  
      if eval:
          self.eval()
  
imports: import os
  from dataclasses import dataclass
  from typing import Optional
  import numpy
  from coqpit import Coqpit
  from encodec import EncodecModel
  from transformers import BertTokenizer
  from TTS.tts.layers.bark.inference_funcs import codec_decode, generate_coarse, generate_fine, generate_text_semantic, generate_voice, load_voice
  from TTS.tts.layers.bark.load_model import load_model
  from TTS.tts.layers.bark.model import GPT
  from TTS.tts.layers.bark.model_fine import FineGPT
  from TTS.tts.models.base_tts import BaseTTS
label_desc: Use image node_id 15 for calling the Bark obj's underlying member method code with example usage: obj.load_checkpoint(config, checkpoint_dir, text_model_path, coarse_model_path, fine_model_path, hubert_model_path, hubert_tokenizer_path, eval, strict) without return types