mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 06:58:11 -05:00
remove TODO: remove explicit dtypes after broadcast fix in stable_diffusion (#4241)
this is done
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user