Skip to content

Commit 69e54ac

Browse files
committed
sync: update ggml
1 parent 29a56f2 commit 69e54ac

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ggml

Submodule ggml updated 62 files

stable-diffusion.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ struct ResidualAttentionBlock {
586586

587587
// layer norm 1
588588
{
589-
x = ggml_norm(ctx, x);
589+
x = ggml_norm(ctx, x, 1e-6f);
590590
x = ggml_add(ctx,
591591
ggml_mul(ctx, ggml_repeat(ctx, ln1_w, x), x),
592592
ggml_repeat(ctx, ln1_b, x));
@@ -636,7 +636,7 @@ struct ResidualAttentionBlock {
636636

637637
// layer norm 2
638638
{
639-
x = ggml_norm(ctx, x);
639+
x = ggml_norm(ctx, x, 1e-6f);
640640

641641
x = ggml_add(ctx, ggml_mul(ctx, ggml_repeat(ctx, ln2_w, x), x),
642642
ggml_repeat(ctx, ln2_b, x));
@@ -766,7 +766,7 @@ struct CLIPTextModel {
766766

767767
// final layer norm
768768
{
769-
x = ggml_norm(ctx, x);
769+
x = ggml_norm(ctx, x, 1e-6f);
770770

771771
x = ggml_add(ctx, ggml_mul(ctx, ggml_repeat(ctx, final_ln_w, x), x),
772772
ggml_repeat(ctx, final_ln_b, x));
@@ -1200,7 +1200,7 @@ struct SpatialTransformer {
12001200
// layer norm 1
12011201
{
12021202
x = ggml_reshape_2d(ctx, x, c, w * h * n);
1203-
x = ggml_norm(ctx, x);
1203+
x = ggml_norm(ctx, x, 1e-6f);
12041204
x = ggml_add(ctx,
12051205
ggml_mul(ctx,
12061206
ggml_repeat(ctx, transformer.norm1_w, x),
@@ -1248,7 +1248,7 @@ struct SpatialTransformer {
12481248

12491249
// layer norm 2
12501250
{
1251-
x = ggml_norm(ctx, x);
1251+
x = ggml_norm(ctx, x, 1e-6f);
12521252
x = ggml_add(ctx,
12531253
ggml_mul(ctx,
12541254
ggml_repeat(ctx, transformer.norm2_w, x), x),
@@ -1299,7 +1299,7 @@ struct SpatialTransformer {
12991299
// layer norm 3
13001300
{
13011301
x = ggml_reshape_2d(ctx, x, c, h * w * n); // [N * h * w, in_channels]
1302-
x = ggml_norm(ctx, x);
1302+
x = ggml_norm(ctx, x, 1e-6f);
13031303
x = ggml_add(ctx,
13041304
ggml_mul(ctx,
13051305
ggml_repeat(ctx, transformer.norm3_w, x), x),

0 commit comments

Comments
 (0)