Skip to content

Commit d04fd90

Browse files
committed
Taehv fixes
Co-authored-by: madebyollin <[email protected]>
1 parent d2968b1 commit d04fd90

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tae.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ class MemBlock : public GGMLBlock {
224224
h = conv1->forward(ctx, h);
225225
h = ggml_relu_inplace(ctx->ggml_ctx, h);
226226
h = conv2->forward(ctx, h);
227-
h = ggml_relu_inplace(ctx->ggml_ctx, h);
228227

229228
auto skip = x;
230229
if (has_skip_conv) {
@@ -323,7 +322,7 @@ class TinyVideoDecoder : public UnaryBlock {
323322
for (int i = 0; i < num_layers; i++) {
324323
for (int j = 0; j < num_blocks; j++) {
325324
auto block = std::dynamic_pointer_cast<MemBlock>(blocks[std::to_string(index++)]);
326-
auto mem = ggml_pad(ctx->ggml_ctx, h, 0, 0, 0, 1);
325+
auto mem = ggml_pad_ext(ctx->ggml_ctx, h, 0, 0, 0, 0, 0, 0, 1,0);
327326
mem = ggml_view_4d(ctx->ggml_ctx, mem, h->ne[0], h->ne[1], h->ne[2], h->ne[3], h->nb[1], h->nb[2], h->nb[3], 0);
328327
h = block->forward(ctx, h, mem);
329328
}
@@ -341,7 +340,7 @@ class TinyVideoDecoder : public UnaryBlock {
341340
h = last_conv->forward(ctx, h);
342341

343342
// shape(W, H, 3, T+3) => shape(W, H, 3, T)
344-
h = ggml_view_4d(ctx->ggml_ctx, h, h->ne[0], h->ne[1], h->ne[2], h->ne[3] - 3, h->nb[1], h->nb[2], h->nb[3], 0);
343+
h = ggml_view_4d(ctx->ggml_ctx, h, h->ne[0], h->ne[1], h->ne[2], h->ne[3] - 3, h->nb[1], h->nb[2], h->nb[3], 3 * h->nb[3]);
345344
return h;
346345
}
347346
};

0 commit comments

Comments
 (0)