code: def set_timesteps(self, num_inference_steps):
      self.num_inference_steps = num_inference_steps
      self.timesteps = np.linspace(
          self.num_train_timesteps - 1,
          0,
          num_inference_steps,
          dtype=float,
      )
  
      low_idx = np.floor(self.timesteps).astype(int)
      high_idx = np.ceil(self.timesteps).astype(int)
      frac = np.mod(self.timesteps, 1.0)
      sigmas = np.array(
          ((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5
      )
      sigmas = (1 - frac) * sigmas[low_idx] + frac * sigmas[high_idx]
      self.sigmas = np.concatenate([sigmas, [0.0]])
  
      self.derivatives = []
  
      self.set_format(tensor_format=self.tensor_format)
  
file_path: PaddleHub/modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_lms_discrete.py
imports: from typing import Union
  import numpy
  import paddle
  from scipy import integrate
  from ..configuration_utils import ConfigMixin
  from ..configuration_utils import register_to_config
  from .scheduling_utils import SchedulerMixin
label_desc: Use image node_id 3 for calling the LMSDiscreteScheduler obj's underlying member method code with example usage: obj.set_timesteps(num_inference_steps) without return types