mirror of https://github.com/commaai/tinygrad.git
remove TODO: remove explicit dtypes after broadcast fix in stable_diffusion (#4241)
this is done
This commit is contained in:
parent
a1940ced77
commit
30fc1ad415
|
@ -250,8 +250,7 @@ class Upsample:
|
|||
|
||||
def timestep_embedding(timesteps, dim, max_period=10000):
|
||||
half = dim // 2
|
||||
# TODO: remove explicit dtypes after broadcast fix
|
||||
freqs = (-math.log(max_period) * Tensor.arange(half, dtype=dtypes.float32) / half).exp()
|
||||
freqs = (-math.log(max_period) * Tensor.arange(half) / half).exp()
|
||||
args = timesteps * freqs
|
||||
return Tensor.cat(args.cos(), args.sin()).reshape(1, -1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue