Correct DDIM sampling on GPU (#173)

This commit is contained in:
Patrick von Platen
2023-03-09 04:21:56 +01:00
committed by GitHub
parent a338f74489
commit 2bf4ead3fb

View File

@@ -40,6 +40,7 @@ def discretized_gaussian_log_likelihood(x0, mean, log_scale):
def _i(tensor, t, x):
tensor = tensor.to(x.device)
shape = (x.size(0), ) + (1, ) * (x.ndim - 1)
return tensor[t].view(shape).to(x)