|
@@ -4923,12 +4923,8 @@ struct ggml_tensor * ggml_timestep_embedding(
|
|
|
struct ggml_tensor * timesteps,
|
|
struct ggml_tensor * timesteps,
|
|
|
int dim,
|
|
int dim,
|
|
|
int max_period) {
|
|
int max_period) {
|
|
|
- int actual_dim = dim;
|
|
|
|
|
- if (dim % 2 != 0) {
|
|
|
|
|
- actual_dim = dim + 1;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- struct ggml_tensor * result = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, actual_dim, timesteps->ne[0]);
|
|
|
|
|
|
|
+ struct ggml_tensor * result = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, dim, timesteps->ne[0]);
|
|
|
|
|
|
|
|
ggml_set_op_params_i32(result, 0, dim);
|
|
ggml_set_op_params_i32(result, 0, dim);
|
|
|
ggml_set_op_params_i32(result, 1, max_period);
|
|
ggml_set_op_params_i32(result, 1, max_period);
|