def get_timesteps(self, num_inference_steps: int, strength: float):
        """Get scheduler timesteps for generation.

        In case of image-to-image generation, it updates number of steps according to strength

        Args:
           num_inference_steps (int):
              number of inference steps for generation
           strength (float):
               value between 0.0 and 1.0, that controls the amount of noise that is added to the input image.
               Values that approach 1.0 enable lots of variations
               but will also produce images that are not semantically consistent with the input.

        """
        # get the original timestep using init_timestep
        init_timestep = min(int(num_inference_steps * strength), num_inference_steps)

        t_start = max(num_inference_steps - init_timestep, 0)
        timesteps = self.scheduler.timesteps[t_start:]

        return timesteps, num_inference_steps - t_start
Get scheduler timesteps for generation.

        In case of image-to-image generation, it updates number of steps according to strength

        Args:
           num_inference_steps (int):
              number of inference steps for generation
           strength (float):
               value between 0.0 and 1.0, that controls the amount of noise that is added to the input image.
               Values that approach 1.0 enable lots of variations
               but will also produce images that are not semantically consistent with the input.

        
examples/stable_diffusion/sd_utils/ov.py