docstr: Initialize pretrained TAESD on the given device from the given checkpoints.
docstr_tok: ["Initialize","pretrained","TAESD","on","the","given","device","from","the","given","checkpoints","."]
code: def __init__(self, encoder_path="taesd_encoder.pth"):
      """Initialize pretrained TAESD on the given device from the given checkpoints."""
      super().__init__()
      self.encoder = encoder()
      self.encoder.load_state_dict(
          torch.load(
              encoder_path,
              map_location="cpu"
              if devices.device.type != "cuda"
              else None,
          )
      )
  
imports: import os
  import torch
  import torch.nn
  from modules import devices, paths_internal, shared
label_desc: Use image node_id 1 to create a new TAESDEncoder object from inherited base classes: nn with example: obj = TAESDEncoder(encoder_path)