def log_laplace_preprocess(inputs, laplace_eps=0.1):
  """Preprocesses input images for log-laplace loss.

  Args:
    inputs: images of range [0, 1).
    laplace_eps: epsilon as used in log-laplace distribution.

  Returns:
    Preprocessed images for log-laplace modeling.
  """
  img = jnp.clip(inputs, 0.0, 1.0)
  # Convert images to [laplace_eps, 1.0 - laplace_eps).
  return img * (1.0 - 2 * laplace_eps) + laplace_eps
Preprocesses input images for log-laplace loss.

  Args:
    inputs: images of range [0, 1).
    laplace_eps: epsilon as used in log-laplace distribution.

  Returns:
    Preprocessed images for log-laplace modeling.
  
videogvt/train_lib/losses.py