data
DIAMONDOutput
extends
ModelOutputDIAMONDOutput(loss: Tensor, prediction: Tensor, sigma: Tensor)What the world model returns after denoising one step.
Attributes
lossTensorThe reconstruction loss of Algorithm 1,
||D(x_noised) - x||^2.
Scalar.predictionTensorThe denoised next frame,
(B, C, H, W).sigmaTensorThe noise level each element was trained at,
(B,). Carried
because the loss is an average over a distribution of noise
levels, and a run that only ever drew easy ones would report a
falling loss while learning nothing about the hard regime.Examples
>>> import lucid
>>> from lucid.models.generative.diamond._model import DIAMONDOutput
>>> out = DIAMONDOutput(
... loss=lucid.zeros(()),
... prediction=lucid.zeros(1, 3, 64, 64),
... sigma=lucid.zeros(1),
... )
>>> out.prediction.shape
(1, 3, 64, 64)
sigma is carried out with the prediction rather than left behind:
the noise level a denoiser was asked to work at is what the loss has
to weight by, so losing it makes the number meaningless.