code: def set_timesteps(self, num_inference_steps, offset=0):
      self.num_inference_steps = num_inference_steps
      self._timesteps = list(
          range(
              0,
              self.config.num_train_timesteps,
              self.config.num_train_timesteps // num_inference_steps,
          )
      )
      self._offset = offset
      self._timesteps = [t + self._offset for t in self._timesteps]
  
      if self.config.skip_prk_steps:
          # for some models like stable diffusion the prk steps can/should be skipped to
          # produce better results. When using PNDM with `self.config.skip_prk_steps` the implementation
          # is based on crowsonkb's PLMS sampler implementation: https://github.com/CompVis/latent-diffusion/pull/51
          self.prk_timesteps = []
          self.plms_timesteps = list(
              reversed(
                  self._timesteps[:-1]
                  + self._timesteps[-2:-1]
                  + self._timesteps[-1:]
              )
          )
      else:
          prk_timesteps = np.array(
              self._timesteps[-self.pndm_order :]
          ).repeat(2) + np.tile(
              np.array(
                  [
                      0,
                      self.config.num_train_timesteps
                      // num_inference_steps
                      // 2,
                  ]
              ),
              self.pndm_order,
          )
          self.prk_timesteps = list(
              reversed(prk_timesteps[:-1].repeat(2)[1:-1])
          )
          self.plms_timesteps = list(reversed(self._timesteps[:-3]))
  
      self.timesteps = self.prk_timesteps + self.plms_timesteps
  
      self.ets = []
      self.counter = 0
      self.set_format(tensor_format=self.tensor_format)
  
file_path: PaddleHub/modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_pndm.py
imports: import math
  from typing import Union
  import numpy
  import paddle
  from ..configuration_utils import ConfigMixin
  from ..configuration_utils import register_to_config
  from .scheduling_utils import SchedulerMixin
label_desc: Use image node_id 2 for calling the PNDMScheduler obj's underlying member method code with example usage: obj.set_timesteps(num_inference_steps, offset) without return types