text
stringlengths
0
5.54k
gamma_cum_end (float) —
The ending cumulative gamma value.
The VQ-diffusion transformer outputs predicted probabilities of the initial unnoised image.
The VQ-diffusion scheduler converts the transformer’s output into a sample for the unnoised image at the previous
diffusion timestep.
~ConfigMixin takes care of storing all config attributes that are passed in the scheduler’s __init__
function, such as num_train_timesteps. They can be accessed via scheduler.config.num_train_timesteps.
SchedulerMixin provides general loading and saving functionality via the SchedulerMixin.save_pretrained() and
from_pretrained() functions.
For more details, see the original paper: https://arxiv.org/abs/2111.14822
log_Q_t_transitioning_to_known_class
<
source
>
(
t: torch.int32
x_t: LongTensor
log_onehot_x_t: FloatTensor
cumulative: bool
)
torch.FloatTensor of shape (batch size, num classes - 1, num latent pixels)
Parameters
t (torch.Long) —
The timestep that determines which transition matrix is used.
x_t (torch.LongTensor of shape (batch size, num latent pixels)) —
The classes of each latent pixel at time t.
log_onehot_x_t (torch.FloatTensor of shape (batch size, num classes, num latent pixels)) —
The log one-hot vectors of x_t
cumulative (bool) —
If cumulative is False, we use the single step transition matrix t-1->t. If cumulative is True,
we use the cumulative transition matrix 0->t.
Returns
torch.FloatTensor of shape (batch size, num classes - 1, num latent pixels)
Each column of the returned matrix is a row of log probabilities of the complete probability
transition matrix.
When non cumulative, returns self.num_classes - 1 rows because the initial latent pixel cannot be
masked.
Where:
q_n is the probability distribution for the forward process of the nth latent pixel.
C_0 is a class of a latent pixel embedding
C_k is the class of the masked latent pixel
non-cumulative result (omitting logarithms):
_0(x_t | x_{t-1\} = C_0) ... q_n(x_t | x_{t-1\} = C_0)
. . .
. . .
. . .
q_0(x_t | x_{t-1\} = C_k) ... q_n(x_t | x_{t-1\} = C_k)`}
/>
cumulative result (omitting logarithms):
_0_cumulative(x_t | x_0 = C_0) ... q_n_cumulative(x_t | x_0 = C_0)
. . .
. . .
. . .
q_0_cumulative(x_t | x_0 = C_{k-1\}) ... q_n_cumulative(x_t | x_0 = C_{k-1\})`}
/>
Returns the log probabilities of the rows from the (cumulative or non-cumulative) transition matrix for each
latent pixel in x_t.
See equation (7) for the complete non-cumulative transition matrix. The complete cumulative transition matrix
is the same structure except the parameters (alpha, beta, gamma) are the cumulative analogs.
q_posterior
<
source
>
(
log_p_x_0
x_t
t
)
torch.FloatTensor of shape (batch size, num classes, num latent pixels)