code: def sample_progdist(
      denoiser,
      x,
      sigmas,
      generator=None,
      progress=False,
      callback=None,
  ):
      s_in = x.new_ones([x.shape[0]])
      sigmas = sigmas[:-1]  # skip the zero sigma
  
      indices = range(len(sigmas) - 1)
      if progress:
          from tqdm.auto import tqdm
  
          indices = tqdm(indices)
  
      for i in indices:
          sigma = sigmas[i]
          denoised = denoiser(x, sigma * s_in)
          d = to_d(x, sigma, denoised)
          if callback is not None:
              callback(
                  {
                      "x": x,
                      "i": i,
                      "sigma": sigma,
                      "denoised": denoised,
                  }
              )
          dt = sigmas[i + 1] - sigma
          x = x + d * dt
  
      return x
  
imports: import random
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from piq import LPIPS
  from torchvision.transforms import RandomCrop
  from .None import dist_util
  from .nn import mean_flat, append_dims, append_zero
  from .random_util import get_generator
label_desc: Use image node_id 13 for calling a global function with example usage: sample_progdist(denoiser, x, sigmas, generator, progress, callback) and returns: x