class_docstr: ### Image to image class
docstr: :param checkpoint_path: is the path of the checkpoint
  :param ddim_steps: is the number of sampling steps
  :param ddim_eta: is the [DDIM sampling](../sampler/ddim.html) $\eta$ constant
code: def __init__(
      self,
      *,
      checkpoint_path: Path,
      ddim_steps: int = 50,
      ddim_eta: float = 0.0,
  ):
      """
      :param checkpoint_path: is the path of the checkpoint
      :param ddim_steps: is the number of sampling steps
      :param ddim_eta: is the [DDIM sampling](../sampler/ddim.html) $\eta$ constant
      """
      self.ddim_steps = ddim_steps
  
      # Load [latent diffusion model](../latent_diffusion.html)
      self.model = load_model(checkpoint_path)
      # Get device
      self.device = (
          torch.device("cuda:0")
          if torch.cuda.is_available()
          else torch.device("cpu")
      )
      # Move the model to device
      self.model.to(self.device)
  
      # Initialize [DDIM sampler](../sampler/ddim.html)
      self.sampler = DDIMSampler(
          self.model, n_steps=ddim_steps, ddim_eta=ddim_eta
      )
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/diffusion/stable_diffusion/scripts/image_to_image.py
imports: import argparse
  from pathlib import Path
  import torch
  from labml import lab, monit
  from labml_nn.diffusion.stable_diffusion.sampler.ddim import DDIMSampler
  from labml_nn.diffusion.stable_diffusion.util import load_model, load_img, save_images, set_seed
label_desc: Use image node_id 1 to create a new Img2Img object  with example: obj = Img2Img()