We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4c05d9 commit 8914625Copy full SHA for 8914625
vae.hpp
@@ -56,7 +56,7 @@ class ResnetBlock : public UnaryBlock {
56
x = nin_shortcut->forward(ctx, x); // [N, out_channels, h, w]
57
}
58
59
- h = ggml_add(ctx, h, x);
+ h = ggml_add_inplace(ctx, h, x);
60
return h; // [N, out_channels, h, w]
61
62
};
@@ -109,7 +109,7 @@ class AttnBlock : public UnaryBlock {
109
110
h_ = proj_out->forward(ctx, h_); // [N, in_channels, h, w]
111
112
- h_ = ggml_add(ctx, h_, x);
+ h_ = ggml_add_inplace(ctx, h_, x);
113
return h_;
114
115
@@ -206,7 +206,7 @@ class VideoResnetBlock : public ResnetBlock {
206
x = time_stack->forward(ctx, x); // b t c (h w)
207
208
float alpha = get_alpha();
209
- x = ggml_add(ctx,
+ x = ggml_add_inplace(ctx,
210
ggml_scale(ctx, x, alpha),
211
ggml_scale(ctx, x_mix, 1.0f - alpha));
212
0 commit comments