Skip to content

Commit d2968b1

Browse files
committed
Less broken video decode + remove log spam
1 parent 6795acc commit d2968b1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tae.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ class TinyVideoDecoder : public UnaryBlock {
309309
}
310310

311311
struct ggml_tensor* forward(GGMLRunnerContext* ctx, struct ggml_tensor* z) override {
312-
LOG_DEBUG("Here");
313312
auto first_conv = std::dynamic_pointer_cast<Conv2d>(blocks["1"]);
314313

315314
// Clamp()
@@ -343,8 +342,6 @@ class TinyVideoDecoder : public UnaryBlock {
343342

344343
// shape(W, H, 3, T+3) => shape(W, H, 3, T)
345344
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);
346-
LOG_DEBUG("Here");
347-
print_ggml_tensor(h, true);
348345
return h;
349346
}
350347
};
@@ -370,12 +367,11 @@ class TAEHV : public GGMLBlock {
370367
}
371368

372369
struct ggml_tensor* decode(GGMLRunnerContext* ctx, struct ggml_tensor* z) {
373-
LOG_DEBUG("Decode");
374370
auto decoder = std::dynamic_pointer_cast<TinyVideoDecoder>(blocks["decoder"]);
375371
auto result = decoder->forward(ctx, z);
376-
LOG_DEBUG("Decoded");
377372
if (sd_version_is_wan(version)) {
378-
result = ggml_permute(ctx->ggml_ctx, result, 0, 1, 3, 2);
373+
// (W, H, C, T) -> (W, H, T, C)
374+
result = ggml_cont(ctx->ggml_ctx, ggml_permute(ctx->ggml_ctx, result, 0, 1, 3, 2));
379375
}
380376
return result;
381377
}

0 commit comments

Comments
 (0)